|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder
public final class GrailsDomainBinder extends java.lang.Object
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.
Field Summary | |
---|---|
static java.util.Map |
NAMING_STRATEGIES
Overrideable naming strategy. |
Method Summary | |
---|---|
static void
|
bindClass(GrailsDomainClass domainClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
|
protected static void
|
bindNumericColumnConstraints(org.hibernate.mapping.Column column, ConstrainedProperty constrainedProperty)
|
static void
|
bindRoot(GrailsDomainClass domainClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
|
protected static void
|
bindStringColumnConstraints(org.hibernate.mapping.Column column, ConstrainedProperty constrainedProperty)
@return the maximum length of the strings in the specified list |
static void
|
clearMappingCache()
|
static void
|
clearMappingCache(java.lang.Class theClass)
|
static void
|
configureNamingStrategy(java.lang.Object strategy)
Override the default naming strategy for the default datasource given a Class or a full class name. |
static 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 NamingStrategy. |
protected static void
|
createClassProperties(GrailsDomainClass domainClass, org.hibernate.mapping.PersistentClass persistentClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
|
static Mapping
|
evaluateMapping(GrailsDomainClass domainClass)
|
static Mapping
|
evaluateMapping(GrailsDomainClass domainClass, groovy.lang.Closure defaultMapping)
|
static Mapping
|
evaluateMapping(GrailsDomainClass domainClass, groovy.lang.Closure defaultMapping, boolean cache)
|
static Mapping
|
getMapping(java.lang.Class theClass)
Obtains a mapping object for the given domain class nam |
static Mapping
|
getMapping(GrailsDomainClass domainClass)
|
static PropertyConfig
|
getPropertyConfig(GrailsDomainClassProperty property)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static java.util.Map NAMING_STRATEGIES
ImprovedNamingStrategy
but can
be configured in DataSource.groovy via hibernate.naming_strategy = ...
.
Method Detail |
---|
public static void bindClass(GrailsDomainClass domainClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
protected static void bindNumericColumnConstraints(org.hibernate.mapping.Column column, ConstrainedProperty constrainedProperty)
public static void bindRoot(GrailsDomainClass domainClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
protected static void bindStringColumnConstraints(org.hibernate.mapping.Column column, ConstrainedProperty constrainedProperty)
public static void clearMappingCache()
public static void clearMappingCache(java.lang.Class theClass)
public static void configureNamingStrategy(java.lang.Object strategy)
strategy
- the class or name
public static void configureNamingStrategy(java.lang.String datasourceName, java.lang.Object strategy)
datasourceName
- the datasource namestrategy
- the class, name, or instance
protected static void createClassProperties(GrailsDomainClass domainClass, org.hibernate.mapping.PersistentClass persistentClass, org.hibernate.cfg.Mappings mappings, java.lang.String sessionFactoryBeanName)
public static Mapping evaluateMapping(GrailsDomainClass domainClass)
public static Mapping evaluateMapping(GrailsDomainClass domainClass, groovy.lang.Closure defaultMapping)
public static Mapping evaluateMapping(GrailsDomainClass domainClass, groovy.lang.Closure defaultMapping, boolean cache)
public static Mapping getMapping(java.lang.Class theClass)
theClass
- The domain class in question
public static Mapping getMapping(GrailsDomainClass domainClass)
public static PropertyConfig getPropertyConfig(GrailsDomainClassProperty property)
Groovy Documentation