|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.ddl.GenericDDLGenerator
ca.sqlpower.architect.ddl.HSQLDBDDLGenerator
public class HSQLDBDDLGenerator
Implements the quirks required for successful DDL generation that targets HSQLDB versions 1.8 and newer.
Sorry about the class name.. we kind of got painted into a corner with our naming convention, and by the time HSQLDB support came along, it was too late to change it.
| Field Summary |
|---|
| Fields inherited from class ca.sqlpower.architect.ddl.GenericDDLGenerator |
|---|
allowConnection, con, EOL, GENERATOR_VERSION, profileFunctionMap, targetCatalog, targetSchema, topLevelNames, typeMap, warnings |
| Constructor Summary | |
|---|---|
HSQLDBDDLGenerator()
|
|
| Method Summary | |
|---|---|
java.lang.String |
columnType(SQLColumn c)
Columnn type |
protected void |
createTypeMap()
Creates and populates typeMap using
DatabaseMetaData. |
java.lang.String |
getCatalogTerm()
The name that the target database gives to the JDBC idea of "catalog." For Oracle, this would be null (no catalogs) and for SQL Server it would be "Database". |
java.lang.String |
getDeferrabilityClause(SQLRelationship r)
Returns the correct syntax for setting the deferrability of a foreign key relationship on this DDL Generator's target platform. |
java.lang.String |
getDeleteActionClause(SQLRelationship r)
Returns the ON DELETE clause for the given relationship, with no extra whitespace or newline characters around it. |
java.lang.String |
getName()
Returns the name of this DDL Generator, which should be a human-readable string with the vendor and/or product name (and version if the generator doesn't work with all versions) of the database platform this generator targets. |
java.lang.String |
getSchemaTerm()
The name that the target database gives to the JDBC idea of "schema." For Oracle, this would be "Schema" and for SQL Server it would be "Owner". |
java.lang.String |
getUpdateActionClause(SQLRelationship r)
Returns the ON UPDATE clause for the given relationship, with no extra whitespace or newline characters around it. |
boolean |
supportsDeferrabilityPolicy(SQLRelationship r)
Returns true if the platform supports the deferrability policy of the given relationship, false otherwise. |
boolean |
supportsDeleteAction(SQLRelationship r)
Returns true if this DDL generator supports the given relationship's delete action. |
boolean |
supportsUpdateAction(SQLRelationship r)
Returns true if this DDL generator supports the given relationship's update action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HSQLDBDDLGenerator()
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public java.lang.String getName()
DDLGenerator
getName in interface DDLGeneratorgetName in class GenericDDLGeneratorpublic java.lang.String getCatalogTerm()
GenericDDLGenerator
getCatalogTerm in interface DDLGeneratorgetCatalogTerm in class GenericDDLGeneratorpublic java.lang.String getSchemaTerm()
GenericDDLGenerator
getSchemaTerm in interface DDLGeneratorgetSchemaTerm in class GenericDDLGeneratorpublic java.lang.String columnType(SQLColumn c)
GenericDDLGenerator
columnType in interface DDLGeneratorcolumnType in class GenericDDLGeneratorpublic java.lang.String getDeferrabilityClause(SQLRelationship r)
GenericDDLGeneratorUnsupportedOperationException if the platform does not
support the given relationship's deferrability policy.
getDeferrabilityClause in class GenericDDLGeneratorr - The relationship the deferrability clause is for
public boolean supportsDeferrabilityPolicy(SQLRelationship r)
GenericDDLGenerator
supportsDeferrabilityPolicy in class GenericDDLGenerator
protected void createTypeMap()
throws java.sql.SQLException
GenericDDLGeneratortypeMap using
DatabaseMetaData. Subclasses for specific DB platforms will be
able to override this implementation with one that uses a
static, pre-defined type map.
createTypeMap in class GenericDDLGeneratorjava.sql.SQLExceptionpublic boolean supportsUpdateAction(SQLRelationship r)
GenericDDLGenerator
supportsUpdateAction in class GenericDDLGeneratorpublic java.lang.String getUpdateActionClause(SQLRelationship r)
GenericDDLGeneratorIf you are overriding this method for a platform-specific DDL generator and you need this clause to be empty, return the empty string--not null.
getUpdateActionClause in class GenericDDLGeneratorr - The relationship whose update action clause to generate
public boolean supportsDeleteAction(SQLRelationship r)
GenericDDLGenerator
supportsDeleteAction in class GenericDDLGeneratorpublic java.lang.String getDeleteActionClause(SQLRelationship r)
GenericDDLGeneratorIf you are overriding this method for a platform-specific DDL generator and you need this clause to be empty, return the empty string--not null.
getDeleteActionClause in class GenericDDLGeneratorr - The relationship whose delete action clause to generate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||