public abstract class AbstractNamingStrategy extends Object implements NamingStrategy
AbstractNamingStrategy is an abstract base class for NamingStrategy implementations| Modifier and Type | Field and Description |
|---|---|
protected String |
foreignKeysClassName |
protected String |
foreignKeysVariable |
protected String |
primaryKeysClassName |
protected String |
primaryKeysVariable |
protected String |
reservedSuffix |
| Constructor and Description |
|---|
AbstractNamingStrategy() |
| Modifier and Type | Method and Description |
|---|---|
String |
appendSchema(String packageName,
String schemaName)
Normalizes and appends the given schema name to the package name
|
protected String |
escape(EntityType entityType,
String name) |
String |
getClassName(SchemaAndTable schemaAndTable)
Convert the given schema and table name to a simple class name.
|
String |
getForeignKeysClassName()
Get the class name for the foreign keys inner class
|
String |
getForeignKeysVariable(EntityType entityType)
Get the field name for the foreign keys class instance
|
String |
getPackage(String basePackage,
SchemaAndTable schemaAndTable)
Returns the package where the class of the table will be generated.
|
String |
getPrimaryKeysClassName()
Get the class name for the primary keys inner class
|
String |
getPrimaryKeysVariable(EntityType entityType)
Get the field name for the primary keys class instance
|
String |
normalizeColumnName(String columnName)
Convert the given column name and provide the opportunity to add quoted identifiers
|
protected String |
normalizeJavaName(String name) |
String |
normalizeSchemaName(String schemaName)
Convert the given schema name and provide the opportunity to add quoted identifiers
|
protected String |
normalizeSQLName(String name) |
String |
normalizeTableName(String tableName)
Convert the given table name and provide the opportunity to add quoted identifiers
|
void |
setForeignKeysClassName(String foreignKeysClassName) |
void |
setForeignKeysVariable(String foreignKeysVariable) |
void |
setPrimaryKeysClassName(String primaryKeysClassName) |
void |
setPrimaryKeysVariable(String primaryKeysVariable) |
void |
setReservedSuffix(String reservedSuffix) |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassName, getDefaultAlias, getDefaultVariableName, getPropertyName, getPropertyNameForForeignKey, getPropertyNameForInverseForeignKey, getPropertyNameForPrimaryKeyprotected String foreignKeysClassName
protected String foreignKeysVariable
protected String primaryKeysClassName
protected String primaryKeysVariable
protected String reservedSuffix
public String appendSchema(String packageName, String schemaName)
NamingStrategyappendSchema in interface NamingStrategyprotected String escape(EntityType entityType, String name)
public String getForeignKeysClassName()
NamingStrategygetForeignKeysClassName in interface NamingStrategypublic String getForeignKeysVariable(EntityType entityType)
NamingStrategygetForeignKeysVariable in interface NamingStrategypublic String getPrimaryKeysClassName()
NamingStrategygetPrimaryKeysClassName in interface NamingStrategypublic String getPrimaryKeysVariable(EntityType entityType)
NamingStrategygetPrimaryKeysVariable in interface NamingStrategypublic String normalizeColumnName(String columnName)
NamingStrategynormalizeColumnName in interface NamingStrategypublic String normalizeTableName(String tableName)
NamingStrategynormalizeTableName in interface NamingStrategypublic String normalizeSchemaName(String schemaName)
NamingStrategynormalizeSchemaName in interface NamingStrategypublic void setForeignKeysClassName(String foreignKeysClassName)
public void setForeignKeysVariable(String foreignKeysVariable)
public void setPrimaryKeysClassName(String primaryKeysClassName)
public void setPrimaryKeysVariable(String primaryKeysVariable)
public void setReservedSuffix(String reservedSuffix)
public String getPackage(String basePackage, SchemaAndTable schemaAndTable)
NamingStrategygetPackage in interface NamingStrategybasePackage - the base package of the class generationschemaAndTable - the schema and tablepublic boolean shouldGenerateClass(SchemaAndTable schemaAndTable)
NamingStrategytrue if the class generation of the table is required, otherwise
false.shouldGenerateClass in interface NamingStrategyschemaAndTable - the schema and tablepublic boolean shouldGenerateForeignKey(SchemaAndTable schemaAndTable, ForeignKeyData foreignKeyData)
NamingStrategytrue if the foreign key reference should be generated in the table,
otherwise false.shouldGenerateForeignKey in interface NamingStrategyschemaAndTable - the schema and tableforeignKeyData - the foreign key in the tablepublic String getClassName(SchemaAndTable schemaAndTable)
NamingStrategygetClassName in interface NamingStrategyCopyright © 2007–2020 Querydsl. All rights reserved.