Class PhysicalNamingStrategyShogunCore

  • All Implemented Interfaces:
    Serializable, org.hibernate.boot.model.naming.PhysicalNamingStrategy
    Direct Known Subclasses:
    OracleNamingStrategyShogunCore

    public class PhysicalNamingStrategyShogunCore
    extends Object
    implements org.hibernate.boot.model.naming.PhysicalNamingStrategy, Serializable
    Limits identifier length if necessary.
    Author:
    Nils Bühner
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.hibernate.boot.model.naming.Identifier convertToLimitedLowerCase​(org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context, org.hibernate.boot.model.naming.Identifier identifier, String prefix)
      Converts a given Identifier to the lower case representation.
      protected Integer getIdentifierLengthLimit​(org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
      Determines the identifier length limit for the given JDBC context.
      String getTablePrefix()  
      void setTablePrefix​(String tablePrefix)  
      org.hibernate.boot.model.naming.Identifier toPhysicalCatalogName​(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)  
      org.hibernate.boot.model.naming.Identifier toPhysicalColumnName​(org.hibernate.boot.model.naming.Identifier columnIdentifier, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
      Converts column names to lower case and limits the length if necessary.
      org.hibernate.boot.model.naming.Identifier toPhysicalSchemaName​(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)  
      org.hibernate.boot.model.naming.Identifier toPhysicalSequenceName​(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)  
      org.hibernate.boot.model.naming.Identifier toPhysicalTableName​(org.hibernate.boot.model.naming.Identifier tableIdentifier, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
      Converts table names to lower case and limits the length if necessary.
    • Constructor Detail

      • PhysicalNamingStrategyShogunCore

        public PhysicalNamingStrategyShogunCore()
    • Method Detail

      • toPhysicalSequenceName

        public org.hibernate.boot.model.naming.Identifier toPhysicalSequenceName​(org.hibernate.boot.model.naming.Identifier name,
                                                                                 org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)
        Specified by:
        toPhysicalSequenceName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      • toPhysicalCatalogName

        public org.hibernate.boot.model.naming.Identifier toPhysicalCatalogName​(org.hibernate.boot.model.naming.Identifier name,
                                                                                org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)
        Specified by:
        toPhysicalCatalogName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      • toPhysicalSchemaName

        public org.hibernate.boot.model.naming.Identifier toPhysicalSchemaName​(org.hibernate.boot.model.naming.Identifier name,
                                                                               org.hibernate.engine.jdbc.env.spi.JdbcEnvironment jdbcEnvironment)
        Specified by:
        toPhysicalSchemaName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      • toPhysicalTableName

        public org.hibernate.boot.model.naming.Identifier toPhysicalTableName​(org.hibernate.boot.model.naming.Identifier tableIdentifier,
                                                                              org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
        Converts table names to lower case and limits the length if necessary.
        Specified by:
        toPhysicalTableName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      • toPhysicalColumnName

        public org.hibernate.boot.model.naming.Identifier toPhysicalColumnName​(org.hibernate.boot.model.naming.Identifier columnIdentifier,
                                                                               org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
        Converts column names to lower case and limits the length if necessary.
        Specified by:
        toPhysicalColumnName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      • convertToLimitedLowerCase

        protected org.hibernate.boot.model.naming.Identifier convertToLimitedLowerCase​(org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context,
                                                                                       org.hibernate.boot.model.naming.Identifier identifier,
                                                                                       String prefix)
        Converts a given Identifier to the lower case representation. If the given context has a character limit for identifiers, this will be respected.
        Parameters:
        context - The JDBC context
        identifier - The identifier
        prefix - Optional prefix to use for the idenifiert. Will be ignored, if null
        Returns:
      • getIdentifierLengthLimit

        protected Integer getIdentifierLengthLimit​(org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
        Determines the identifier length limit for the given JDBC context. Returns null if no limitation is necessary.
        Parameters:
        context - The current JDBC context
        Returns:
        The identifier length limit for the given context. null otherwise.
      • getTablePrefix

        public String getTablePrefix()
        Returns:
        the tablePrefix
      • setTablePrefix

        public void setTablePrefix​(String tablePrefix)
        Parameters:
        tablePrefix - the tablePrefix to set