org.melati.poem.prepro
Class TableDef
java.lang.Object
org.melati.poem.prepro.TableDef
public class TableDef
- extends Object
A Table Definition holding information from a DSD.
The SQL table naming convention is enforced here:
the name given in the DSD is forced to lowercase.
This could be changed to enable mixed case names in
jdbc names by simply not forcing to lowercase,
but the JavaName has first letter capitalised.
The way around this is to have a separate jdbc name,
but this would be a lot of redundancy for a small use case.
The use case is actually broken: MySQL allows significant
table name case, but only on operating systems where
file name case is significant, and the manual advises against.
The solution is to add the following to /etc/mysqld/my.cnf
[mysqld]
lower_case_table_names=1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableDef
public TableDef(DSD dsd,
StreamTokenizer tokens,
int displayOrder,
boolean isAbstract,
TableNamingStore nameStore)
throws org.melati.poem.prepro.ParsingDSDException,
IOException,
org.melati.poem.prepro.IllegalityException
- Constructor.
- Parameters:
dsd
- the DSD
this is a member oftokens
- a stream of tokensdisplayOrder
- the ordering within the DSDisAbstract
- whether this is an abstract tablenameStore
- where to put our names
- Throws:
ParsingDSDException
- if an unexpected token is encountered
IllegalityException
- if a semantic incoherence is detected
IOException
- if a problem with the file system is encountered
generateTableDeclJava
public void generateTableDeclJava(Writer w)
throws IOException
- Parameters:
w
- DatabaseBase
- Throws:
IOException
- if a problem with the file system is encountered
generateTableDefnJava
public void generateTableDefnJava(Writer w)
throws IOException
- Parameters:
w
- DatabaseBase
- Throws:
IOException
- if a problem with the file system is encountered
generateTableAccessorJava
public void generateTableAccessorJava(Writer w)
throws IOException
- Parameters:
w
- DatabaseBase
- Throws:
IOException
- if a problem with the file system is encountered
generateTableAccessorDefnJava
public void generateTableAccessorDefnJava(Writer w)
throws IOException
- Parameters:
w
- DatabaseTablesBase
- Throws:
IOException
- if a problem with the file system is encountered
generatePersistentBaseJava
public void generatePersistentBaseJava(Writer w)
throws IOException
- Parameters:
w
- Persistent Base writer
- Throws:
IOException
- if a problem with the file system is encountered
generatePersistentJava
public void generatePersistentJava(Writer w)
throws IOException
- Parameters:
w
- Persistent writer
- Throws:
IOException
- if a problem with the file system is encountered
generateTableBaseJava
public void generateTableBaseJava(Writer w)
throws IOException
- Parameters:
w
- TableBase
- Throws:
IOException
- if a problem with the file system is encountered
generateTableJava
public void generateTableJava(Writer w)
throws IOException
- Parameters:
w
- Table
- Throws:
IOException
- if a problem with the file system is encountered
generateJava
public void generateJava()
throws IOException,
org.melati.poem.prepro.IllegalityException
- Generate the 4 files.
- Throws:
IOException
- if a problem with the file system is encountered
IllegalityException
- if a semantic incoherence is detected
Copyright © 2000-2010 PanEris. All Rights Reserved.