Class AbstractNamingStrategy

java.lang.Object
com.querydsl.sql.codegen.AbstractNamingStrategy
All Implemented Interfaces:
NamingStrategy
Direct Known Subclasses:
DefaultNamingStrategy, OriginalNamingStrategy

public abstract class AbstractNamingStrategy extends Object implements NamingStrategy
AbstractNamingStrategy is an abstract base class for NamingStrategy implementations
Author:
tiwe
  • Field Details

    • foreignKeysClassName

      protected String foreignKeysClassName
    • foreignKeysVariable

      protected String foreignKeysVariable
    • primaryKeysClassName

      protected String primaryKeysClassName
    • primaryKeysVariable

      protected String primaryKeysVariable
    • reservedSuffix

      protected String reservedSuffix
  • Constructor Details

    • AbstractNamingStrategy

      public AbstractNamingStrategy()
  • Method Details

    • appendSchema

      public String appendSchema(String packageName, String schemaName)
      Description copied from interface: NamingStrategy
      Normalizes and appends the given schema name to the package name
      Specified by:
      appendSchema in interface NamingStrategy
      Returns:
    • escape

      protected String escape(EntityType entityType, String name)
    • 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:
    • 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:
    • normalizeSQLName

      protected String normalizeSQLName(String name)
    • normalizeJavaName

      protected String normalizeJavaName(String name)
    • 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)
    • getPackage

      public String getPackage(String basePackage, SchemaAndTable schemaAndTable)
      Description copied from interface: NamingStrategy
      Returns the package where the class of the table will be generated.
      Specified by:
      getPackage in interface NamingStrategy
      Parameters:
      basePackage - the base package of the class generation
      schemaAndTable - the schema and table
      Returns:
    • shouldGenerateClass

      public boolean shouldGenerateClass(SchemaAndTable schemaAndTable)
      Description copied from interface: NamingStrategy
      Returns true if the class generation of the table is required, otherwise false.
      Specified by:
      shouldGenerateClass in interface NamingStrategy
      Parameters:
      schemaAndTable - the schema and table
      Returns:
    • shouldGenerateForeignKey

      public boolean shouldGenerateForeignKey(SchemaAndTable schemaAndTable, ForeignKeyData foreignKeyData)
      Description copied from interface: NamingStrategy
      Returns true if the foreign key reference should be generated in the table, otherwise false.
      Specified by:
      shouldGenerateForeignKey in interface NamingStrategy
      Parameters:
      schemaAndTable - the schema and table
      foreignKeyData - the foreign key in the table
      Returns:
    • getClassName

      public String getClassName(SchemaAndTable schemaAndTable)
      Description copied from interface: NamingStrategy
      Convert the given schema and table name to a simple class name.
      Specified by:
      getClassName in interface NamingStrategy