Top Description Methods
org.hibernate.boot.model.naming

public Interface NamingStrategyHelper

Known Direct Implementers
org.hibernate.boot.model.internal.EntityBinder.EntityTableNamingStrategyHelper
Imports
org.hibernate.boot.spi.MetadataBuildingContext

Helper contract for dealing with naming strategies.

Method Summary

Modifier and TypeMethod and Description
public Identifier

Returns:

The implicit name
determineImplicitName
(MetadataBuildingContext
The building context in which this is called.
buildingContext
)

Called when the user supplied no explicit name/identifier for the given database object.

public Identifier

Returns:

The strategy-handled name.
handleExplicitName
(String
The explicit object name.
explicitName
,
MetadataBuildingContext
The building context in which this is called.
buildingContext
)

Called when the user has supplied an explicit name for the database object.

public Identifier

Returns:

The physical name
toPhysicalName
(Identifier
The logical name to convert to a physical name
logicalName
,
MetadataBuildingContext
The building context in which this is called.
buildingContext
)

Handle converting a logical name to a physical name

Typically implementations will access the PhysicalNamingStrategy via MetadataBuildingContext#getBuildingOptions() to org.hibernate.boot.spi.MetadataBuildingOptions#getPhysicalNamingStrategy()

For proper quoting, org.hibernate.boot.model.relational.Database#toIdentifier(String) should be used via MetadataBuildingContext#getMetadataCollector() to org.hibernate.boot.spi.InFlightMetadataCollector#getDatabase()

Method Detail

determineImplicitNameback to summary
public Identifier determineImplicitName(MetadataBuildingContext buildingContext)

Called when the user supplied no explicit name/identifier for the given database object.

Typically, implementations will access the ImplicitNamingStrategy via MetadataBuildingContext#getBuildingOptions() to org.hibernate.boot.spi.MetadataBuildingOptions#getImplicitNamingStrategy()

For proper quoting, org.hibernate.boot.model.relational.Database#toIdentifier(String) should be used via MetadataBuildingContext#getMetadataCollector() to org.hibernate.boot.spi.InFlightMetadataCollector#getDatabase()

Parameters
buildingContext:MetadataBuildingContext

The building context in which this is called.

Returns:Identifier

The implicit name

handleExplicitNameback to summary
public Identifier handleExplicitName(String explicitName, MetadataBuildingContext buildingContext)

Called when the user has supplied an explicit name for the database object.

Typically implementations will access the ImplicitNamingStrategy via MetadataBuildingContext#getBuildingOptions() to org.hibernate.boot.spi.MetadataBuildingOptions#getImplicitNamingStrategy()

For proper quoting, org.hibernate.boot.model.relational.Database#toIdentifier(String) should be used via MetadataBuildingContext#getMetadataCollector() to org.hibernate.boot.spi.InFlightMetadataCollector#getDatabase()

Parameters
explicitName:String

The explicit object name.

buildingContext:MetadataBuildingContext

The building context in which this is called.

Returns:Identifier

The strategy-handled name.

toPhysicalNameback to summary
public Identifier toPhysicalName(Identifier logicalName, MetadataBuildingContext buildingContext)

Handle converting a logical name to a physical name

Typically implementations will access the PhysicalNamingStrategy via MetadataBuildingContext#getBuildingOptions() to org.hibernate.boot.spi.MetadataBuildingOptions#getPhysicalNamingStrategy()

For proper quoting, org.hibernate.boot.model.relational.Database#toIdentifier(String) should be used via MetadataBuildingContext#getMetadataCollector() to org.hibernate.boot.spi.InFlightMetadataCollector#getDatabase()

Parameters
logicalName:Identifier

The logical name to convert to a physical name

buildingContext:MetadataBuildingContext

The building context in which this is called.

Returns:Identifier

The physical name