Package org.hibernate.boot.model.naming
Interface NamingStrategyHelper
-
public interface NamingStrategyHelper
Helper contract for dealing with naming strategies.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identifier
determineImplicitName(MetadataBuildingContext buildingContext)
Called when the user supplied no explicit name/identifier for the given database object.Identifier
handleExplicitName(java.lang.String explicitName, MetadataBuildingContext buildingContext)
Called when the user has supplied an explicit name for the database object.Identifier
toPhysicalName(Identifier logicalName, MetadataBuildingContext buildingContext)
Handle converting a logical name to a physical name
-
-
-
Method Detail
-
determineImplicitName
Identifier determineImplicitName(MetadataBuildingContext buildingContext)
Called when the user supplied no explicit name/identifier for the given database object. Typically implementations will access theImplicitNamingStrategy
viaMetadataBuildingContext.getBuildingOptions()
->MetadataBuildingOptions.getImplicitNamingStrategy()
For proper quoting,Database.toIdentifier(String)
should be used viaMetadataBuildingContext.getMetadataCollector()
->Metadata.getDatabase()
- Parameters:
buildingContext
- The building context in which this is called.- Returns:
- The implicit name
-
handleExplicitName
Identifier handleExplicitName(java.lang.String explicitName, MetadataBuildingContext buildingContext)
Called when the user has supplied an explicit name for the database object. Typically implementations will access theImplicitNamingStrategy
viaMetadataBuildingContext.getBuildingOptions()
->MetadataBuildingOptions.getImplicitNamingStrategy()
For proper quoting,Database.toIdentifier(String)
should be used viaMetadataBuildingContext.getMetadataCollector()
->Metadata.getDatabase()
- Parameters:
explicitName
- The explicit object name.buildingContext
- The building context in which this is called.- Returns:
- The strategy-handled name.
-
toPhysicalName
Identifier toPhysicalName(Identifier logicalName, MetadataBuildingContext buildingContext)
Handle converting a logical name to a physical name Typically implementations will access thePhysicalNamingStrategy
viaMetadataBuildingContext.getBuildingOptions()
->MetadataBuildingOptions.getPhysicalNamingStrategy()
For proper quoting,Database.toIdentifier(String)
should be used viaMetadataBuildingContext.getMetadataCollector()
->Metadata.getDatabase()
- Parameters:
logicalName
- The logical name to convert to a physical namebuildingContext
- The building context in which this is called.- Returns:
- The physical name
-
-