Class PhysicalNamingStrategyImpl

java.lang.Object
org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
org.duracloud.common.db.hibernate.PhysicalNamingStrategyImpl
All Implemented Interfaces:
Serializable, org.hibernate.boot.model.naming.PhysicalNamingStrategy

public class PhysicalNamingStrategyImpl extends org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl implements Serializable
In the move from hibernate 4.x to 5.x the naming strategies changed and are no longer backwards compatible. This fix is based on the solution provided by Samuel Andres here: http://stackoverflow.com/questions/32437202/improvednamingstrategy-no-longer-working-in-hibernate-5
Author:
Daniel Bernstein
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
     
    org.hibernate.boot.model.naming.Identifier
    toPhysicalColumnName(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
     
    org.hibernate.boot.model.naming.Identifier
    toPhysicalTableName(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
     

    Methods inherited from class org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

    toPhysicalCatalogName, toPhysicalSchemaName, toPhysicalSequenceName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • PhysicalNamingStrategyImpl

      public PhysicalNamingStrategyImpl()
  • Method Details

    • toPhysicalTableName

      public org.hibernate.boot.model.naming.Identifier toPhysicalTableName(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
      Specified by:
      toPhysicalTableName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      Overrides:
      toPhysicalTableName in class org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
    • toPhysicalColumnName

      public org.hibernate.boot.model.naming.Identifier toPhysicalColumnName(org.hibernate.boot.model.naming.Identifier name, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment context)
      Specified by:
      toPhysicalColumnName in interface org.hibernate.boot.model.naming.PhysicalNamingStrategy
      Overrides:
      toPhysicalColumnName in class org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
    • addUnderscores

      protected static String addUnderscores(String name)