Public Types | |
enum | CascadeType { NONE, AGGREGATION, AGGREGATION_INVERSE, COMPOSITION, COMPOSITION_INVERSE } |
Public Member Functions | |
String | getSuperTable (String table) |
String | getKeynameLowercase (String table) |
boolean | isKeyPiece (String table, String column) |
List< String > | getPkFkCombinationColumns (String table) |
boolean | isSuperClass (String table) |
CascadeType | getCascadeTypeForForeigKey (String name) |
boolean | hasXmlClobType (String tableName) |
boolean | isXmlClobType (String tableName, String columnName) |
String | getSequenceForTable (String tableName) |
boolean | generateInverseCollection (String tableName, String columnName) |
String | getEnumTypeForColumn (String tableName, String columnName) |
Map< String, String > | getEnumTypesForTable (String tableName) |
Protected Attributes | |
Map< String, String > | map |
Map< String, String > | keymap |
Map< String, List< String > > | keyColumnsMap |
Map< String, List< String > > | keyPiecesMap |
Map< String, CascadeType > | cascadingTypes |
Map< String, List< String > > | xmlClobTableColumns |
Map< String, String > | sequences |
Map< String, String > | duplicatedForeignKeys |
Map< String, Map< String, String > > | checkConstraints |
boolean alma.acs.tmcdb.translator.AbstractTableInheritance.generateInverseCollection | ( | String | tableName, | |
String | columnName | |||
) |
Check if the given column in the given table should generate an inverse collection in the referenced table class or not. This is necessary for the case that we have A extends B, and C referencing A and B. This would lead to the generation of Set<C> in both A and B, which translates into an error when hibernate is starting
tableName | The table | |
columnName | The column |
References alma.acs.tmcdb.translator.AbstractTableInheritance.duplicatedForeignKeys.
CascadeType alma.acs.tmcdb.translator.AbstractTableInheritance.getCascadeTypeForForeigKey | ( | String | name | ) |
Checks which is the cascading options for the given foreign key
name | The foreign key name |
References alma.acs.tmcdb.translator.AbstractTableInheritance.cascadingTypes.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.foreignKeyToAssociationInfo(), and alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.foreignKeyToInverseAssociationInfo().
String alma.acs.tmcdb.translator.AbstractTableInheritance.getEnumTypeForColumn | ( | String | tableName, | |
String | columnName | |||
) |
Returns all the columns, and their associated enum classes, that exist in a given table
tableName | The table name |
References alma.acs.tmcdb.translator.AbstractTableInheritance.checkConstraints.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.columnToHibernateTypeName().
Map<String, String> alma.acs.tmcdb.translator.AbstractTableInheritance.getEnumTypesForTable | ( | String | tableName | ) |
Returns all the columns, and their associated enum classes, that exist in a given table
tableName | The table name |
References alma.acs.tmcdb.translator.AbstractTableInheritance.checkConstraints.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.tableToMetaAttributes().
String alma.acs.tmcdb.translator.AbstractTableInheritance.getKeynameLowercase | ( | String | table | ) |
Returns the name for the key defined in the parent table for a given table.
table | The name of the table |
References alma.acs.tmcdb.translator.AbstractTableInheritance.keymap.
List<String> alma.acs.tmcdb.translator.AbstractTableInheritance.getPkFkCombinationColumns | ( | String | table | ) |
Returns a Map containing all the columns that are part of the PK/FK combination of a child table. Since they are defined in the parent class, the child class should not redefine them.
table | The name of the table |
References alma.acs.tmcdb.translator.AbstractTableInheritance.keyColumnsMap.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.columnToMetaAttributes().
String alma.acs.tmcdb.translator.AbstractTableInheritance.getSequenceForTable | ( | String | tableName | ) |
Returns the name of the Oracle sequence for the given table
tableName | The name of the table |
null
if table doesn't have a generated ID References alma.acs.tmcdb.translator.AbstractTableInheritance.sequences.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.tableToMetaAttributes().
String alma.acs.tmcdb.translator.AbstractTableInheritance.getSuperTable | ( | String | table | ) |
Returns the Java table name for the given sql-short table name
table | The child table name, in the sql-short form |
References alma.acs.tmcdb.translator.AbstractTableInheritance.map.
Referenced by alma.acs.tmcdb.translator.AbstractReverseEngineeringStrategy.tableToMetaAttributes().
boolean alma.acs.tmcdb.translator.AbstractTableInheritance.hasXmlClobType | ( | String | tableName | ) |
Checks if a table contains at least one column of type XMLCLOB
tableName | Name of the table |
References alma.acs.tmcdb.translator.AbstractTableInheritance.xmlClobTableColumns.
boolean alma.acs.tmcdb.translator.AbstractTableInheritance.isKeyPiece | ( | String | table, | |
String | column | |||
) |
Checks whether the indicated column of the given table is part of the pieces that are supposed to generate the primary key. In the grammar, these are written after the GENERATED FROM statement of the key declaration, if any
table | The table | |
column | The columns |
References alma.acs.tmcdb.translator.AbstractTableInheritance.keyPiecesMap.
boolean alma.acs.tmcdb.translator.AbstractTableInheritance.isSuperClass | ( | String | table | ) |
Checks if a table is parent of another one or not
table | The name of the table, lowercased |
References alma.acs.tmcdb.translator.AbstractTableInheritance.map.
boolean alma.acs.tmcdb.translator.AbstractTableInheritance.isXmlClobType | ( | String | tableName, | |
String | columnName | |||
) |
Checks if a column of a given table is of type XMLCLOB
tableName | Name of the table | |
columnName | Name of the column |
References alma.acs.tmcdb.translator.AbstractTableInheritance.xmlClobTableColumns.
Map<String, CascadeType> alma.acs.tmcdb.translator.AbstractTableInheritance.cascadingTypes [protected] |
Map<String, Map<String, String> > alma.acs.tmcdb.translator.AbstractTableInheritance.checkConstraints [protected] |
Map<String, String> alma.acs.tmcdb.translator.AbstractTableInheritance.duplicatedForeignKeys [protected] |
Map<String, List<String> > alma.acs.tmcdb.translator.AbstractTableInheritance.keyColumnsMap [protected] |
Map<String, String> alma.acs.tmcdb.translator.AbstractTableInheritance.keymap [protected] |
Map<String, List<String> > alma.acs.tmcdb.translator.AbstractTableInheritance.keyPiecesMap [protected] |
Map<String, String> alma.acs.tmcdb.translator.AbstractTableInheritance.map [protected] |
Map<String, String> alma.acs.tmcdb.translator.AbstractTableInheritance.sequences [protected] |
Map<String, List<String> > alma.acs.tmcdb.translator.AbstractTableInheritance.xmlClobTableColumns [protected] |