|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.interactive_instruments.ShapeChange.Target.SQL.SqlDdl
public class SqlDdl
Creates SQL DDL for an application schema.
Field Summary | |
---|---|
static String |
CRLF
|
static String |
DEFAULT_FOREIGN_KEY_COLUMN_SUFFIX
|
static String |
DEFAULT_ID_COLUMN_NAME
|
static int |
DEFAULT_SIZE
|
static int |
DEFAULT_SRID
|
static String |
IDT
|
static String |
MAP_PARAM_GEOMETRY
|
static String |
MAP_TARGETTYPE_COND_PART
|
static String |
MAP_TARGETTYPE_COND_TEXTORCHARACTERVARYING
|
static String |
PARAM_CREATE_DOCUMENTATION
Flag to indicate that model documentation shall be added to the DDL via comments; default is true. |
static String |
PARAM_CREATE_REFERENCES
Flag to indicate that foreign key creation is desired (true); default is false. |
static String |
PARAM_DATABASE_SYSTEM
Identifier of the database system for which SQL DDL shall be created. |
static String |
PARAM_FOREIGN_KEY_COLUMN_DATA_TYPE
|
static String |
PARAM_FOREIGN_KEY_COLUMN_SUFFIX
Suffix to append to the name of columns that contain foreign keys. |
static String |
PARAM_ID_COLUMN_NAME
Name for the identifier column when generating table creation statements. |
static String |
PARAM_SIZE
Size for fields representing textual properties with limited length, to be used in case that the property represented by the field does not have a 'size' tagged value; default is 1024 |
static String |
PARAM_SRID
EPSG code of the spatial reference system to use for geometries; default is 4326 |
static String |
PLATFORM
|
static String |
RULE_TGT_SQL_CLS_FEATURE_TYPES
Ensures that table creation statements are generated for feature types. |
static String |
RULE_TGT_SQL_CLS_OBJECT_TYPES
Ensures that table creation statements are generated for object types. |
static String |
RULE_TGT_SQL_CLS_REFERENCES_TO_EXTERNAL_TYPES
If this rule is enabled, then a property whose type is a type with identity but that type is not contained in the currently processed schema ... is still encoded as a field with a foreign key - if other rules allow table creation for this type. |
static int |
TARGET_SQLDDL
|
Constructor Summary | |
---|---|
SqlDdl()
|
Method Summary | |
---|---|
void |
createAlterTableStatementForReverseProperty(PropertyInfo pi)
|
void |
createForeignKeyDefinition(String className,
PropertyInfo pi)
|
void |
generateTableCreationStatement(ClassInfo ci,
List<PropertyInfo> propertyInfosForColumns)
|
int |
getTargetID()
|
void |
initialise(PackageInfo pi,
Model m,
Options o,
ShapeChangeResult r,
boolean diagOnly)
Allows a target to perform the necessary initialization routines before processing. |
String |
message(int mnr)
Return a message for a message number. |
void |
process(ClassInfo ci)
The converter will call this method for each class belonging to the package given during initialization (see Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean) ). |
boolean |
refersToOtherFeatureOrObjectRepresentedByTable(PropertyInfo pi)
|
void |
write()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TARGET_SQLDDL
public static final String PLATFORM
public static final String PARAM_ID_COLUMN_NAME
public static final String PARAM_FOREIGN_KEY_COLUMN_SUFFIX
public static final String PARAM_FOREIGN_KEY_COLUMN_DATA_TYPE
public static final String PARAM_SIZE
public static final String PARAM_SRID
public static final String PARAM_CREATE_REFERENCES
public static final String PARAM_CREATE_DOCUMENTATION
public static final String PARAM_DATABASE_SYSTEM
public static final String RULE_TGT_SQL_CLS_FEATURE_TYPES
public static final String RULE_TGT_SQL_CLS_OBJECT_TYPES
public static final String RULE_TGT_SQL_CLS_REFERENCES_TO_EXTERNAL_TYPES
public static final String DEFAULT_ID_COLUMN_NAME
public static final String DEFAULT_FOREIGN_KEY_COLUMN_SUFFIX
public static final int DEFAULT_SIZE
public static final int DEFAULT_SRID
public static final String MAP_PARAM_GEOMETRY
public static final String MAP_TARGETTYPE_COND_PART
public static final String MAP_TARGETTYPE_COND_TEXTORCHARACTERVARYING
public static final String CRLF
public static final String IDT
Constructor Detail |
---|
public SqlDdl()
Method Detail |
---|
public void initialise(PackageInfo pi, Model m, Options o, ShapeChangeResult r, boolean diagOnly) throws ShapeChangeAbortException
Target
Will be called by the Converter
for each selected schema (see
Model.selectedSchemas()
and PackageInfo.isSchema()
).
initialise
in interface Target
pi
- a schema from the model selected via the configuration (see
Model.selectedSchemas()
) - not necessarily always an
application schema
ShapeChangeAbortException
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo,
de.interactive_instruments.ShapeChange.Model.Model,
de.interactive_instruments.ShapeChange.Options,
de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)
public void process(ClassInfo ci)
Target
Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)
).
NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!
process
in interface Target
public void createForeignKeyDefinition(String className, PropertyInfo pi)
public void generateTableCreationStatement(ClassInfo ci, List<PropertyInfo> propertyInfosForColumns)
public void createAlterTableStatementForReverseProperty(PropertyInfo pi)
public boolean refersToOtherFeatureOrObjectRepresentedByTable(PropertyInfo pi)
pi
-
public void write()
write
in interface Target
Target.write()
public int getTargetID()
getTargetID
in interface Target
public String message(int mnr)
MessageSource
message
in interface MessageSource
MessageSource.message(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |