org.ephman.abra.tools
Class SchemaGenerator
java.lang.Object
org.ephman.abra.tools.GenericSchemaGenerator
org.ephman.abra.tools.SchemaGenerator
- public class SchemaGenerator
- extends GenericSchemaGenerator
given a base output directory
generate a schema file
Sybase specific one !!
- Version:
- 0.0.2
- Author:
- Paul M. Bethe
Fields inherited from class org.ephman.abra.tools.GenericSchemaGenerator |
cleanup, cleanupConstraints, cleanupFile, constraintList, constraints, END_DATE, END_DATE_TYPE, fileSeperator, outdir, schemaFile, VERSION_NUMBER |
Methods inherited from class org.ephman.abra.tools.GenericSchemaGenerator |
addConstraint, addIndex, cleanUpConstraint, cleanUpIndex, convertFields, getDropSeqStmt, inlineField, jToSql, makeConstraintName, writeFieldSchema, writeUniqueConstraint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dbPackageName
public static java.lang.String dbPackageName
SchemaGenerator
public SchemaGenerator(java.lang.String outFileName)
throws java.io.IOException,
SchemaException
close
public void close()
throws java.io.IOException,
SchemaException
- Description copied from class:
GenericSchemaGenerator
- generic close if you want to write constraints -- override (see Oracle version)
- Overrides:
close
in class GenericSchemaGenerator
- Throws:
java.io.IOException
SchemaException
generate
public void generate(JClass currentClass)
throws java.io.IOException,
SchemaException
- Overrides:
generate
in class GenericSchemaGenerator
- Throws:
java.io.IOException
SchemaException
writeCheckConstraint
protected void writeCheckConstraint(JClass currentClass,
java.lang.String cons_name,
JField jf)
throws java.io.IOException
- Overrides:
writeCheckConstraint
in class GenericSchemaGenerator
- Throws:
java.io.IOException
writePrimaryKey
protected void writePrimaryKey(JClass currentClass,
java.lang.String sqlName)
throws java.io.IOException
- generic primary in table creation..
- Overrides:
writePrimaryKey
in class GenericSchemaGenerator
- Throws:
java.io.IOException
writeForeignKey
protected void writeForeignKey(JClass currentClass,
java.lang.String cons_name,
JField jf,
JClass foreignClass)
throws java.io.IOException
- Overrides:
writeForeignKey
in class GenericSchemaGenerator
- Throws:
java.io.IOException
getSqlOutType
protected java.lang.String getSqlOutType(JClass currentClass,
JField jf)
throws SchemaException
- Overrides:
getSqlOutType
in class GenericSchemaGenerator
- Throws:
SchemaException
getDbSpecificOptions
protected java.lang.String getDbSpecificOptions(JClass currentClass,
JField jf,
java.lang.String primaryKey)
throws SchemaException
- Description copied from class:
GenericSchemaGenerator
- Return any required DB specific field options. Override as needed.
- Overrides:
getDbSpecificOptions
in class GenericSchemaGenerator
- Throws:
SchemaException
needsSequence
boolean needsSequence()
- Overrides:
needsSequence
in class GenericSchemaGenerator