|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReverseEngineeringStrategy
Method Summary | |
---|---|
String |
classNameToCompositeIdName(String className)
Given a class name return the name for its composite id if it will have one. |
void |
close()
Close any resources this strategy might have used. |
String |
columnToHibernateTypeName(TableIdentifier table,
String columnName,
int sqlType,
int length,
int precision,
int scale,
boolean nullable,
boolean generatedIdentifier)
Gets the preferred Hibernate type for an SQL type. |
Map |
columnToMetaAttributes(TableIdentifier identifier,
String column)
Return the list of metaattributes to assign to properties created based on the given column |
String |
columnToPropertyName(TableIdentifier table,
String column)
Return a property name for a Column. |
void |
configure(ReverseEngineeringRuntimeInfo runtimeInfo)
Configure the reverse engineering strategy. |
boolean |
excludeColumn(TableIdentifier identifier,
String columnName)
|
boolean |
excludeForeignKeyAsCollection(String keyname,
TableIdentifier fromTable,
List fromColumns,
TableIdentifier referencedTable,
List referencedColumns)
Should this foreignkey be excluded as a oneToMany |
boolean |
excludeForeignKeyAsManytoOne(String keyname,
TableIdentifier fromTable,
List fromColumns,
TableIdentifier referencedTable,
List referencedColumns)
Should this foreignkey be excluded as a many-to-one |
boolean |
excludeTable(TableIdentifier ti)
|
AssociationInfo |
foreignKeyToAssociationInfo(org.hibernate.mapping.ForeignKey foreignKey)
|
String |
foreignKeyToCollectionName(String keyname,
TableIdentifier fromTable,
List fromColumns,
TableIdentifier referencedTable,
List referencedColumns,
boolean uniqueReference)
Return a collection role name for a Collection based on the foreignkey. |
String |
foreignKeyToEntityName(String keyname,
TableIdentifier fromTable,
List fromColumnNames,
TableIdentifier referencedTable,
List referencedColumnNames,
boolean uniqueReference)
|
AssociationInfo |
foreignKeyToInverseAssociationInfo(org.hibernate.mapping.ForeignKey foreignKey)
|
String |
foreignKeyToInverseEntityName(String keyname,
TableIdentifier fromTable,
List fromColumnNames,
TableIdentifier referencedTable,
List referencedColumnNames,
boolean uniqueReference)
Used to rename the inverse one-to-one properties. |
String |
foreignKeyToManyToManyName(org.hibernate.mapping.ForeignKey fromKey,
TableIdentifier middleTable,
org.hibernate.mapping.ForeignKey toKey,
boolean uniqueReference)
|
List |
getForeignKeys(TableIdentifier referencedTable)
Gets the user defined foreign keys. |
String |
getOptimisticLockColumnName(TableIdentifier identifier)
Return explicit which column name should be used for optimistic lock |
List |
getPrimaryKeyColumnNames(TableIdentifier identifier)
If a table does not have any primarykey columns reported, this method is called. |
List |
getSchemaSelections()
Return list of SchemaSelctors to be used when asking MetaDataDialect for metadata. |
Properties |
getTableIdentifierProperties(TableIdentifier identifier)
|
String |
getTableIdentifierStrategyName(TableIdentifier identifier)
|
boolean |
isForeignKeyCollectionInverse(String name,
TableIdentifier foreignKeyTable,
List columns,
TableIdentifier foreignKeyReferencedTable,
List referencedColumns)
is the collection inverse or not ? |
boolean |
isForeignKeyCollectionLazy(String name,
TableIdentifier foreignKeyTable,
List columns,
TableIdentifier foreignKeyReferencedTable,
List referencedColumns)
is the collection lazy or not ? |
boolean |
isManyToManyTable(org.hibernate.mapping.Table table)
|
boolean |
isOneToOne(org.hibernate.mapping.ForeignKey foreignKey)
|
void |
setSettings(ReverseEngineeringSettings settings)
Generic method used to initialize the reverse engineering strategy. |
String |
tableToClassName(TableIdentifier tableIdentifier)
|
String |
tableToCompositeIdName(TableIdentifier identifier)
Given a table name, return the wanted name for a composite identifier. |
String |
tableToIdentifierPropertyName(TableIdentifier tableIdentifier)
Given a table name, return the wanted name for the identifier. |
Map |
tableToMetaAttributes(TableIdentifier tableIdentifier)
Return the list of metaattributes to assign to classes created based on the given table |
boolean |
useColumnForOptimisticLock(TableIdentifier identifier,
String column)
|
Method Detail |
---|
void setSettings(ReverseEngineeringSettings settings)
settings
- used for thisvoid configure(ReverseEngineeringRuntimeInfo runtimeInfo)
runtimeInfo
- void close()
String tableToClassName(TableIdentifier tableIdentifier)
String columnToPropertyName(TableIdentifier table, String column)
column
- a columnname
boolean excludeTable(TableIdentifier ti)
boolean excludeColumn(TableIdentifier identifier, String columnName)
String columnToHibernateTypeName(TableIdentifier table, String columnName, int sqlType, int length, int precision, int scale, boolean nullable, boolean generatedIdentifier)
table
- name of the table, can be nullcolumnName
- name of the column, can be nullsqlType
- The sql type.length
- The length of the column.precision
- The number of decimal digits, if applicable.scale
- The scale, if applicable.nullable
- The nullability of the columngeneratedIdentifier
- true if for a column used in an identifier that is not "assigned", false otherwise.
List getForeignKeys(TableIdentifier referencedTable)
referencedTable
- TODOidentifier
-
String getTableIdentifierStrategyName(TableIdentifier identifier)
identifier
- the table to look up for
Properties getTableIdentifierProperties(TableIdentifier identifier)
List getPrimaryKeyColumnNames(TableIdentifier identifier)
String classNameToCompositeIdName(String className)
className
-
String getOptimisticLockColumnName(TableIdentifier identifier)
boolean useColumnForOptimisticLock(TableIdentifier identifier, String column)
List getSchemaSelections()
MetaDataDialect
for metadata.
SchemaSelection
instancesString tableToIdentifierPropertyName(TableIdentifier tableIdentifier)
tableIdentifier
-
String tableToCompositeIdName(TableIdentifier identifier)
identifier
-
Map tableToMetaAttributes(TableIdentifier tableIdentifier)
tableIdentifier
-
MetaAttribute
Map columnToMetaAttributes(TableIdentifier identifier, String column)
tableIdentifier
- column
-
MetaAttribute
boolean excludeForeignKeyAsCollection(String keyname, TableIdentifier fromTable, List fromColumns, TableIdentifier referencedTable, List referencedColumns)
boolean excludeForeignKeyAsManytoOne(String keyname, TableIdentifier fromTable, List fromColumns, TableIdentifier referencedTable, List referencedColumns)
boolean isForeignKeyCollectionInverse(String name, TableIdentifier foreignKeyTable, List columns, TableIdentifier foreignKeyReferencedTable, List referencedColumns)
boolean isForeignKeyCollectionLazy(String name, TableIdentifier foreignKeyTable, List columns, TableIdentifier foreignKeyReferencedTable, List referencedColumns)
String foreignKeyToCollectionName(String keyname, TableIdentifier fromTable, List fromColumns, TableIdentifier referencedTable, List referencedColumns, boolean uniqueReference)
fromColumns
- list of Column instances on the fromTable. Only col.getName() should be assumed to be correctreferencedColumns
- list of Column instances on the referenced Table. Only col.getName() should be assumed to be correctuniqueReference
- true if there is no other references to the same table
String foreignKeyToEntityName(String keyname, TableIdentifier fromTable, List fromColumnNames, TableIdentifier referencedTable, List referencedColumnNames, boolean uniqueReference)
fromColumns
- list of Column instances on the fromTable. Only col.getName() should be assumed to be correctreferencedColumns
- list of Column instances on the referenced Table. Only col.getName() should be assumed to be correctuniqueReference
- true if there is no other references to the same table
String foreignKeyToInverseEntityName(String keyname, TableIdentifier fromTable, List fromColumnNames, TableIdentifier referencedTable, List referencedColumnNames, boolean uniqueReference)
fromColumns
- list of Column instances on the fromTable. Only col.getName() should be assumed to be correctreferencedColumns
- list of Column instances on the referenced Table. Only col.getName() should be assumed to be correctuniqueReference
- true if there is no other references to the same table
boolean isManyToManyTable(org.hibernate.mapping.Table table)
table
-
String foreignKeyToManyToManyName(org.hibernate.mapping.ForeignKey fromKey, TableIdentifier middleTable, org.hibernate.mapping.ForeignKey toKey, boolean uniqueReference)
middleTable
- uniqueReference
- true if there is no other references to the same tablefromColumns
- list of Column instances on the fromTable. Only col.getName() should be assumed to be correctreferencedColumns
- list of Column instances on the referenced Table. Only col.getName() should be assumed to be correct
boolean isOneToOne(org.hibernate.mapping.ForeignKey foreignKey)
AssociationInfo foreignKeyToAssociationInfo(org.hibernate.mapping.ForeignKey foreignKey)
AssociationInfo foreignKeyToInverseAssociationInfo(org.hibernate.mapping.ForeignKey foreignKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |