alma::acs::tmcdb::translator::AbstractTableInheritance Class Reference

Collaboration diagram for alma::acs::tmcdb::translator::AbstractTableInheritance:
Collaboration graph
[legend]

List of all members.

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)

Protected Attributes

Map< String, String > map
Map< String, String > keymap
Map< String, List< String > > keyColumnsMap
Map< String, List< String > > keyPiecesMap
Map< String, CascadeTypecascadingTypes
Map< String, List< String > > xmlClobTableColumns
Map< String, String > sequences
Map< String, String > duplicatedForeignKeys

Member Enumeration Documentation

Enumerator:
NONE 
AGGREGATION 
AGGREGATION_INVERSE 
COMPOSITION 
COMPOSITION_INVERSE 

Member Function Documentation

boolean alma::acs::tmcdb::translator::AbstractTableInheritance::generateInverseCollection ( String  tableName,
String  columnName 
) [inline]

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

Parameters:
tableName The table
columnName The column
Returns:
Whether the generator should generate the inverse collection for the table

References duplicatedForeignKeys.

CascadeType alma::acs::tmcdb::translator::AbstractTableInheritance::getCascadeTypeForForeigKey ( String  name  )  [inline]

Checks which is the cascading options for the given foreign key

Parameters:
name The foreign key name
Returns:
The cascading type for the foreign key

References cascadingTypes.

Referenced by alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::foreignKeyToAssociationInfo(), and alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::foreignKeyToInverseAssociationInfo().

String alma::acs::tmcdb::translator::AbstractTableInheritance::getKeynameLowercase ( String  table  )  [inline]

Returns the name for the key defined in the parent table for a given table.

Parameters:
table The name of the table
Returns:
The name (in lowercase) of the key column of the supertable, otherwise null

References keymap.

Referenced by alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::excludeForeignKey().

List<String> alma::acs::tmcdb::translator::AbstractTableInheritance::getPkFkCombinationColumns ( String  table  )  [inline]

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.

Parameters:
table The name of the table
Returns:
A java.util.List with the column names (lowercase) of the PK/FK

References keyColumnsMap.

Referenced by alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::columnToMetaAttributes().

String alma::acs::tmcdb::translator::AbstractTableInheritance::getSequenceForTable ( String  tableName  )  [inline]

Returns the name of the Oracle sequence for the given table

Parameters:
tableName The name of the table
Returns:
The name of the sequence, null if table doesn't have a generated ID

References sequences.

Referenced by alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::tableToMetaAttributes().

String alma::acs::tmcdb::translator::AbstractTableInheritance::getSuperTable ( String  table  )  [inline]

Returns the Java table name for the given sql-short table name

Parameters:
table The child table name, in the sql-short form
Returns:
The parent full original name, null if is has no parents.

References map.

Referenced by alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::excludeForeignKey(), and alma::acs::tmcdb::translator::AbstractReverseEngineeringStrategy::tableToMetaAttributes().

boolean alma::acs::tmcdb::translator::AbstractTableInheritance::hasXmlClobType ( String  tableName  )  [inline]

Checks if a table contains at least one column of type XMLCLOB

Parameters:
tableName Name of the table
Returns:
Whether the table defines a column of type XMLCLOB in the model

References xmlClobTableColumns.

boolean alma::acs::tmcdb::translator::AbstractTableInheritance::isKeyPiece ( String  table,
String  column 
) [inline]

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

Parameters:
table The table
column The columns
Returns:
Whether the given column participates in the creation of the PK of the mentioned table

References keyPiecesMap.

boolean alma::acs::tmcdb::translator::AbstractTableInheritance::isSuperClass ( String  table  )  [inline]

Checks if a table is parent of another one or not

Parameters:
table The name of the table, lowercased
Returns:
If the table is super class of another one or not

References map.

boolean alma::acs::tmcdb::translator::AbstractTableInheritance::isXmlClobType ( String  tableName,
String  columnName 
) [inline]

Checks if a column of a given table is of type XMLCLOB

Parameters:
tableName Name of the table
columnName Name of the column
Returns:
Whether the column of the given table is of type XMLCLOB or not

References xmlClobTableColumns.


Member Data Documentation

Referenced by getKeynameLowercase().

Referenced by isKeyPiece().

Referenced by getSuperTable(), and isSuperClass().

Referenced by getSequenceForTable().

Referenced by hasXmlClobType(), and isXmlClobType().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2