public class GrailsDomainBinder extends java.lang.Object implements org.hibernate.boot.spi.AdditionalMappingContributor, org.hibernate.boot.model.TypeContributor
Handles the binding Grails domain classes and properties to the Hibernate runtime meta model. Based on the HbmBinder code in Hibernate core and influenced by AnnotationsBinder.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
DEFAULT_DISCRIMINATOR_COLUMN_NAME |
The name of the discriminator column of a table-per-hierarchy tree that does not map one. |
static java.lang.String |
EMPTY_PATH |
|
static java.lang.String |
ENUM_CLASS_PROP |
|
static java.lang.String |
FOREIGN_KEY_SUFFIX |
|
static org.slf4j.Logger |
LOG |
|
static char |
UNDERSCORE |
| Constructor and description |
|---|
GrailsDomainBinder(java.lang.String dataSourceName, java.lang.String sessionFactoryName, HibernateMappingContext hibernateMappingContext) |
GrailsDomainBinder(java.lang.String dataSourceName, java.lang.String sessionFactoryName, HibernateMappingContext hibernateMappingContext, NamingStrategyProvider namingStrategyProvider, MappingCacheHolder mappingCacheHolder) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
configureNamingStrategy(java.lang.String datasourceName, java.lang.Object strategy)Override the default naming strategy given a Class or a full class name, or an instance of a PhysicalNamingStrategy. |
|
public void |
contribute(org.hibernate.boot.spi.AdditionalMappingContributions contributions, org.hibernate.boot.spi.InFlightMetadataCollector metadataCollector, org.hibernate.boot.ResourceStreamLocator resourceStreamLocator, org.hibernate.boot.spi.MetadataBuildingContext buildingContext) |
|
public void |
contribute(org.hibernate.boot.model.TypeContributions typeContributions, org.hibernate.service.ServiceRegistry serviceRegistry) |
|
public void |
contribute(org.hibernate.boot.spi.InFlightMetadataCollector metadataCollector)Manually triggers the contribution process. |
|
public java.lang.String |
getContributorName() |
|
public org.hibernate.engine.jdbc.env.spi.JdbcEnvironment |
getJdbcEnvironment() |
|
public MappingCacheHolder |
getMappingCacheHolder() |
|
public org.hibernate.boot.spi.MetadataBuildingContext |
getMetadataBuildingContext() |
|
public PersistentEntityNamingStrategy |
getNamingStrategy() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The name of the discriminator column of a table-per-hierarchy tree that does not map one.
Override the default naming strategy given a Class or a full class name, or an instance of a PhysicalNamingStrategy.
datasourceName - the datasource namestrategy - the class, name, or instanceManually triggers the contribution process. Useful for unit testing where the full Hibernate bootstrap is not invoked.