com.mysema.query.sql
Class OriginalNamingStrategy

java.lang.Object
  extended by com.mysema.query.sql.OriginalNamingStrategy
All Implemented Interfaces:
NamingStrategy

public class OriginalNamingStrategy
extends Object
implements NamingStrategy

OriginalNamingStrategy preserves the table and column names in the conversion

Author:
tiwe

Constructor Summary
OriginalNamingStrategy()
           
 
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 foreignKeyName, EntityType entityType)
          Convert the given foreign key name to a foreign key property name
 String getPropertyNameForPrimaryKey(String primaryKeyName, EntityType model)
          Convert the given primary key name to a primary key property name
 String getReservedSuffix()
           
 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
 void setForeignKeysClassName(String foreignKeysClassName)
           
 void setForeignKeysVariable(String foreignKeysVariable)
           
 void setPrimaryKeysClassName(String primaryKeysClassName)
           
 void setPrimaryKeysVariable(String primaryKeysVariable)
           
 void setReservedSuffix(String reservedSuffix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OriginalNamingStrategy

public OriginalNamingStrategy()
Method Detail

getClassName

public String getClassName(String tableName)
Description copied from interface: NamingStrategy
Convert the given tableName to a simple class name

Specified by:
getClassName in interface NamingStrategy
Returns:

getDefaultAlias

public String getDefaultAlias(EntityType entityType)
Description copied from interface: NamingStrategy
Get the default alias for the given EntityType

Specified by:
getDefaultAlias in interface NamingStrategy
Returns:

getDefaultVariableName

public String getDefaultVariableName(EntityType entityType)
Description copied from interface: NamingStrategy
Get the default variable name for the given EntityType

Specified by:
getDefaultVariableName in interface NamingStrategy
Returns:

getForeignKeysClassName

public String getForeignKeysClassName()
Description copied from interface: NamingStrategy
Get the class name for the foreign keys inner class

Specified by:
getForeignKeysClassName in interface NamingStrategy
Returns:

getForeignKeysVariable

public String getForeignKeysVariable(EntityType entityType)
Description copied from interface: NamingStrategy
Get the field name for the foreign keys class instance

Specified by:
getForeignKeysVariable in interface NamingStrategy
Returns:

getPrimaryKeysClassName

public String getPrimaryKeysClassName()
Description copied from interface: NamingStrategy
Get the class name for the primary keys inner class

Specified by:
getPrimaryKeysClassName in interface NamingStrategy
Returns:

getPrimaryKeysVariable

public String getPrimaryKeysVariable(EntityType entityType)
Description copied from interface: NamingStrategy
Get the field name for the primary keys class instance

Specified by:
getPrimaryKeysVariable in interface NamingStrategy
Returns:

getPropertyName

public String getPropertyName(String columnName,
                              EntityType entityType)
Description copied from interface: NamingStrategy
Convert the given column name to a property name

Specified by:
getPropertyName in interface NamingStrategy
Returns:

getPropertyNameForForeignKey

public String getPropertyNameForForeignKey(String foreignKeyName,
                                           EntityType entityType)
Description copied from interface: NamingStrategy
Convert the given foreign key name to a foreign key property name

Specified by:
getPropertyNameForForeignKey in interface NamingStrategy
Returns:

getPropertyNameForInverseForeignKey

public String getPropertyNameForInverseForeignKey(String foreignKeyName,
                                                  EntityType entityType)
Description copied from interface: NamingStrategy
Convert the given foreign key name to a foreign key property name

Specified by:
getPropertyNameForInverseForeignKey in interface NamingStrategy
Returns:

getPropertyNameForPrimaryKey

public String getPropertyNameForPrimaryKey(String primaryKeyName,
                                           EntityType model)
Description copied from interface: NamingStrategy
Convert the given primary key name to a primary key property name

Specified by:
getPropertyNameForPrimaryKey in interface NamingStrategy
Returns:

getReservedSuffix

public String getReservedSuffix()

normalizeColumnName

public String normalizeColumnName(String columnName)
Description copied from interface: NamingStrategy
Convert the given column name and provide the opportunity to add quoted identifiers

Specified by:
normalizeColumnName in interface NamingStrategy
Returns:

normalizeTableName

public String normalizeTableName(String tableName)
Description copied from interface: NamingStrategy
Convert the given table name and provide the opportunity to add quoted identifiers

Specified by:
normalizeTableName in interface NamingStrategy
Returns:

normalizeSchemaName

public String normalizeSchemaName(String schemaName)
Description copied from interface: NamingStrategy
Convert the given schema name and provide the opportunity to add quoted identifiers

Specified by:
normalizeSchemaName in interface NamingStrategy
Returns:

setForeignKeysClassName

public void setForeignKeysClassName(String foreignKeysClassName)

setForeignKeysVariable

public void setForeignKeysVariable(String foreignKeysVariable)

setPrimaryKeysClassName

public void setPrimaryKeysClassName(String primaryKeysClassName)

setPrimaryKeysVariable

public void setPrimaryKeysVariable(String primaryKeysVariable)

setReservedSuffix

public void setReservedSuffix(String reservedSuffix)


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