org.codehaus.groovy.grails.orm.hibernate.cfg
Class GrailsDomainBinder

java.lang.Object
  extended by org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder
      extended by org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder

public class GrailsDomainBinder
extends org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

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.

Since:
0.1

Field Summary
 
Fields inherited from class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder
BACKTICK, CASCADE_ALL, CASCADE_ALL_DELETE_ORPHAN, CASCADE_NONE, CASCADE_SAVE_UPDATE, CT, DEFAULT_ENUM_TYPE, EMPTY_PATH, ENUM_CLASS_PROP, ENUM_TYPE_CLASS, ENUM_TYPE_PROP, FOREIGN_KEY_SUFFIX, LOG, MAPPING_CACHE, NAMING_STRATEGIES, STRING_TYPE, UNDERSCORE
 
Constructor Summary
GrailsDomainBinder()
           
 
Method Summary
protected  java.lang.Class<?> getGroovyAwareJoinedSubclassEntityPersisterClass()
           
protected  java.lang.Class<?> getGroovyAwareSingleTableEntityPersisterClass()
           
protected  void handleLazyProxy(org.codehaus.groovy.grails.commons.GrailsDomainClass domainClass, org.codehaus.groovy.grails.commons.GrailsDomainClassProperty grailsProperty)
           
protected  void handleUniqueConstraint(org.codehaus.groovy.grails.commons.GrailsDomainClassProperty property, org.hibernate.mapping.Column column, java.lang.String path, org.hibernate.mapping.Table table, java.lang.String columnName, java.lang.String sessionFactoryBeanName)
           
protected  boolean identityEnumTypeSupports(java.lang.Class<?> propertyType)
           
protected  boolean isNotEmpty(java.lang.String s)
           
protected  java.lang.String qualify(java.lang.String prefix, java.lang.String name)
           
protected  java.lang.String unqualify(java.lang.String qualifiedName)
           
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder
addUnderscore, bindClass, bindClass, bindCollection, bindCollectionForPropertyConfig, bindCollectionSecondPass, bindCollectionTable, bindCollectionWithJoinTable, bindColumn, bindColumnConfigToColumn, bindComponent, bindComponentProperty, bindCompositeId, bindCompositeIdentifierToManyToOne, bindDependentKeyValue, bindDiscriminatorProperty, bindEnumType, bindEnumType, bindIdentity, bindIndex, bindJoinedSubClass, bindListSecondPass, bindManyToMany, bindManyToOne, bindManyToOneValues, bindMapSecondPass, bindNaturalIdentifier, bindNumericColumnConstraints, bindOneToMany, bindOneToOne, bindProperty, bindRoot, bindRootPersistentClassCommonValues, bindSimpleId, bindSimpleValue, bindSimpleValue, bindSimpleValue, bindSimpleValue, bindStringColumnConstraints, bindSubClass, bindSubClass, bindSubClasses, bindUnidirectionalOneToMany, bindUnidirectionalOneToManyInverseValues, bindUnionSubclass, bindVersion, buildDiscriminatorSet, buildOrderByClause, calculateTableForMany, canBindOneToOneWithSingleColumnAndForeignKey, clearMappingCache, clearMappingCache, configureDerivedProperties, configureNamingStrategy, configureNamingStrategy, countDigits, createClassProperties, createKeyForProps, createPrimaryKeyValue, createProperty, createUniqueKeyForColumns, evaluateMapping, evaluateMapping, evaluateMapping, getAssociationDescription, getColumnForSimpleValue, getColumnNameForPropertyAndPath, getConstrainedProperty, getDefaultColumnName, getForeignKeyForPropertyDomainClass, getIndexColumnName, getIndexColumnType, getInsertableness, getJoinedSubClassTableName, getLaziness, getMapElementName, getMapping, getMapping, getMaxSize, getNameForPropertyAndPath, getNamingStrategy, getProperty, getPropertyConfig, getRootMapping, getSingleColumnConfig, getTableName, getTypeName, getUpdateableness, getUserType, hasCompositeIdentifier, hasJoinColumnMapping, hasJoinKeyMapping, hasJoinTableColumnNameMapping, isBidirectionalManyToOne, isBidirectionalManyToOneWithListMapping, isBidirectionalOneToManyMap, isCircularAssociation, isComponentPropertyNullable, isCompositeIdProperty, isIdentityProperty, isNonPropertyToken, isSaveUpdateCascade, isSorted, isUnidirectionalOneToMany, linkBidirectionalOneToMany, linkValueUsingAColumnCopy, logCascadeMapping, removeBackticks, setCascadeBehaviour, setTypeForPropertyConfig, setUniqueName, shouldBindCollectionWithForeignKey, shouldCollectionBindWithJoinColumn, supportsJoinColumnMapping, trackCustomCascadingSaves, trimBackTigs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrailsDomainBinder

public GrailsDomainBinder()
Method Detail

getGroovyAwareJoinedSubclassEntityPersisterClass

protected java.lang.Class<?> getGroovyAwareJoinedSubclassEntityPersisterClass()
Specified by:
getGroovyAwareJoinedSubclassEntityPersisterClass in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

getGroovyAwareSingleTableEntityPersisterClass

protected java.lang.Class<?> getGroovyAwareSingleTableEntityPersisterClass()
Specified by:
getGroovyAwareSingleTableEntityPersisterClass in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

handleLazyProxy

protected void handleLazyProxy(org.codehaus.groovy.grails.commons.GrailsDomainClass domainClass,
                               org.codehaus.groovy.grails.commons.GrailsDomainClassProperty grailsProperty)
Specified by:
handleLazyProxy in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

handleUniqueConstraint

protected void handleUniqueConstraint(org.codehaus.groovy.grails.commons.GrailsDomainClassProperty property,
                                      org.hibernate.mapping.Column column,
                                      java.lang.String path,
                                      org.hibernate.mapping.Table table,
                                      java.lang.String columnName,
                                      java.lang.String sessionFactoryBeanName)
Specified by:
handleUniqueConstraint in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

identityEnumTypeSupports

protected boolean identityEnumTypeSupports(java.lang.Class<?> propertyType)
Specified by:
identityEnumTypeSupports in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

isNotEmpty

protected boolean isNotEmpty(java.lang.String s)
Specified by:
isNotEmpty in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

qualify

protected java.lang.String qualify(java.lang.String prefix,
                                   java.lang.String name)
Specified by:
qualify in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder

unqualify

protected java.lang.String unqualify(java.lang.String qualifiedName)
Specified by:
unqualify in class org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder