public interface NamingStrategy
NamingStrategy
defines a conversion strategy from table to class and column
to property namesModifier and Type | Method and Description |
---|---|
java.lang.String |
appendSchema(java.lang.String packageName,
java.lang.String schema)
Deprecated.
Use
getPackage(String, SchemaAndTable) instead. |
java.lang.String |
getClassName(SchemaAndTable schemaAndTable)
Convert the given schema and table name to a simple class name.
|
java.lang.String |
getClassName(java.lang.String tableName)
Deprecated.
Use
getClassName(SchemaAndTable) instead. |
java.lang.String |
getDefaultAlias(EntityType entityType)
Get the default alias for the given EntityType
|
java.lang.String |
getDefaultVariableName(EntityType entityType)
Get the default variable name for the given EntityType
|
java.lang.String |
getForeignKeysClassName()
Get the class name for the foreign keys inner class
|
java.lang.String |
getForeignKeysVariable(EntityType entityType)
Get the field name for the foreign keys class instance
|
java.lang.String |
getPackage(java.lang.String basePackage,
SchemaAndTable schemaAndTable)
Returns the package where the class of the table will be generated.
|
java.lang.String |
getPrimaryKeysClassName()
Get the class name for the primary keys inner class
|
java.lang.String |
getPrimaryKeysVariable(EntityType entityType)
Get the field name for the primary keys class instance
|
java.lang.String |
getPropertyName(java.lang.String columnName,
EntityType entityType)
Convert the given column name to a property name
|
java.lang.String |
getPropertyNameForForeignKey(java.lang.String foreignKeyName,
EntityType entityType)
Convert the given foreign key name to a foreign key property name
|
java.lang.String |
getPropertyNameForInverseForeignKey(java.lang.String name,
EntityType model)
Convert the given foreign key name to a foreign key property name
|
java.lang.String |
getPropertyNameForPrimaryKey(java.lang.String name,
EntityType model)
Convert the given primary key name to a primary key property name
|
java.lang.String |
normalizeColumnName(java.lang.String columnName)
Convert the given column name and provide the opportunity to add quoted identifiers
|
java.lang.String |
normalizeSchemaName(java.lang.String schemaName)
Convert the given schema name and provide the opportunity to add quoted identifiers
|
java.lang.String |
normalizeTableName(java.lang.String tableName)
Convert the given table name and provide the opportunity to add quoted identifiers
|
boolean |
shouldGenerateClass(SchemaAndTable schemaAndTable)
Returns
true if the class generation of the table is required, otherwise
false . |
boolean |
shouldGenerateForeignKey(SchemaAndTable schemaAndTable,
ForeignKeyData foreignKeyData)
Returns
true if the foreign key reference should be generated in the table,
otherwise false . |
@Deprecated java.lang.String appendSchema(java.lang.String packageName, java.lang.String schema)
getPackage(String, SchemaAndTable)
instead.packageName
- schema
- @Deprecated java.lang.String getClassName(java.lang.String tableName)
getClassName(SchemaAndTable)
instead.java.lang.String getClassName(SchemaAndTable schemaAndTable)
java.lang.String getDefaultAlias(EntityType entityType)
entityType
- java.lang.String getDefaultVariableName(EntityType entityType)
entityType
- java.lang.String getForeignKeysClassName()
java.lang.String getForeignKeysVariable(EntityType entityType)
java.lang.String getPrimaryKeysClassName()
java.lang.String getPrimaryKeysVariable(EntityType entityType)
java.lang.String getPropertyName(java.lang.String columnName, EntityType entityType)
columnName
- entityType
- java.lang.String getPropertyNameForForeignKey(java.lang.String foreignKeyName, EntityType entityType)
foreignKeyName
- entityType
- java.lang.String getPropertyNameForInverseForeignKey(java.lang.String name, EntityType model)
name
- model
- java.lang.String getPropertyNameForPrimaryKey(java.lang.String name, EntityType model)
name
- model
- java.lang.String normalizeColumnName(java.lang.String columnName)
columnName
- java.lang.String normalizeTableName(java.lang.String tableName)
tableName
- java.lang.String normalizeSchemaName(java.lang.String schemaName)
schemaName
- boolean shouldGenerateClass(SchemaAndTable schemaAndTable)
true
if the class generation of the table is required, otherwise
false
.schemaAndTable
- the schema and tableboolean shouldGenerateForeignKey(SchemaAndTable schemaAndTable, ForeignKeyData foreignKeyData)
true
if the foreign key reference should be generated in the table,
otherwise false
.schemaAndTable
- the schema and tableforeignKeyData
- the foreign key in the tablejava.lang.String getPackage(java.lang.String basePackage, SchemaAndTable schemaAndTable)
basePackage
- the base package of the class generationschemaAndTable
- the schema and tableCopyright © 2007–2021 Querydsl. All rights reserved.