com.mysema.query.sql
Interface NamingStrategy

All Known Implementing Classes:
DefaultNamingStrategy, OriginalNamingStrategy

public interface NamingStrategy

NamingStrategy defines a conversion strategy from table to class and column to property names

Author:
tiwe

Method Summary
 String getClassName(String tableName)
          Convert the given tableName to a simple class name
 String getDefaultAlias(EntityType entityType)
          Get the default alias for the given EntityType
 String getDefaultVariableName(EntityType entityType)
          Get the default variable name for the given EntityType
 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 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 getPropertyName(String columnName, EntityType entityType)
          Convert the given column name to a property name
 String getPropertyNameForForeignKey(String foreignKeyName, EntityType entityType)
          Convert the given foreign key name to a foreign key property name
 String getPropertyNameForInverseForeignKey(String name, EntityType model)
          Convert the given foreign key name to a foreign key property name
 String getPropertyNameForPrimaryKey(String name, EntityType model)
          Convert the given primary key name to a primary key property name
 String normalizeColumnName(String columnName)
          Convert the given column name and provide the opportunity to add quoted identifiers
 String normalizeSchemaName(String schemaName)
          Convert the given schema name and provide the opportunity to add quoted identifiers
 String normalizeTableName(String tableName)
          Convert the given table name and provide the opportunity to add quoted identifiers
 

Method Detail

getClassName

String getClassName(String tableName)
Convert the given tableName to a simple class name

Returns:

getDefaultAlias

String getDefaultAlias(EntityType entityType)
Get the default alias for the given EntityType

Parameters:
entityType -
Returns:

getDefaultVariableName

String getDefaultVariableName(EntityType entityType)
Get the default variable name for the given EntityType

Parameters:
entityType -
Returns:

getForeignKeysClassName

String getForeignKeysClassName()
Get the class name for the foreign keys inner class

Returns:

getForeignKeysVariable

String getForeignKeysVariable(EntityType entityType)
Get the field name for the foreign keys class instance

Returns:

getPrimaryKeysClassName

String getPrimaryKeysClassName()
Get the class name for the primary keys inner class

Returns:

getPrimaryKeysVariable

String getPrimaryKeysVariable(EntityType entityType)
Get the field name for the primary keys class instance

Returns:

getPropertyName

String getPropertyName(String columnName,
                       EntityType entityType)
Convert the given column name to a property name

Parameters:
columnName -
entityType -
Returns:

getPropertyNameForForeignKey

String getPropertyNameForForeignKey(String foreignKeyName,
                                    EntityType entityType)
Convert the given foreign key name to a foreign key property name

Parameters:
foreignKeyName -
entityType -
Returns:

getPropertyNameForInverseForeignKey

String getPropertyNameForInverseForeignKey(String name,
                                           EntityType model)
Convert the given foreign key name to a foreign key property name

Parameters:
name -
model -
Returns:

getPropertyNameForPrimaryKey

String getPropertyNameForPrimaryKey(String name,
                                    EntityType model)
Convert the given primary key name to a primary key property name

Parameters:
name -
model -
Returns:

normalizeColumnName

String normalizeColumnName(String columnName)
Convert the given column name and provide the opportunity to add quoted identifiers

Parameters:
columnName -
Returns:

normalizeTableName

String normalizeTableName(String tableName)
Convert the given table name and provide the opportunity to add quoted identifiers

Parameters:
tableName -
Returns:

normalizeSchemaName

String normalizeSchemaName(String schemaName)
Convert the given schema name and provide the opportunity to add quoted identifiers

Parameters:
schemaName -
Returns:


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.