org.codehaus.groovy.grails.orm.hibernate
Class GrailsHibernateDomainClass

java.lang.Object
  extended by org.codehaus.groovy.grails.commons.AbstractGrailsClass
      extended by org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateDomainClass
          extended by org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateDomainClass
All Implemented Interfaces:
org.codehaus.groovy.grails.commons.ExternalGrailsDomainClass, org.codehaus.groovy.grails.commons.GrailsClass, org.codehaus.groovy.grails.commons.GrailsDomainClass, org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware, org.springframework.beans.factory.Aware

public class GrailsHibernateDomainClass
extends org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateDomainClass

An implementation of the GrailsDomainClass interface that allows Classes mapped in Hibernate to integrate with Grails' validation, dynamic methods etc. seamlessly.

Since:
0.1

Field Summary
 
Fields inherited from class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateDomainClass
application, constraints, HIBERNATE, identifier, properties, propertyMap, sessionFactory, sessionFactoryName, subClasses, validator, version
 
Fields inherited from class org.codehaus.groovy.grails.commons.AbstractGrailsClass
grailsApplication
 
Fields inherited from interface org.codehaus.groovy.grails.commons.GrailsDomainClass
GORM, ORM_MAPPING
 
Constructor Summary
GrailsHibernateDomainClass(java.lang.Class<?> clazz, org.hibernate.SessionFactory sessionFactory, java.lang.String sessionFactoryName, org.codehaus.groovy.grails.commons.GrailsApplication application, org.hibernate.metadata.ClassMetadata metaData)
          Contructor to be used by all child classes to create a new instance and get the name right.
 
Method Summary
protected  void setRelatedClassType(org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateDomainClassProperty prop, org.hibernate.type.AssociationType assType, org.hibernate.type.Type hibernateType)
           
 
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateDomainClass
evaluateConstraints, getAssociationMap, getConstrainedProperties, getConstraintsEvaluator, getFieldName, getIdentifier, getMappedBy, getMappingStrategy, getPersistantProperties, getPersistentProperties, getPersistentProperty, getProperties, getPropertyByName, getRelatedClassType, getSessionFactory, getSessionFactoryName, getSubClasses, getValidator, getVersion, hasPersistentProperty, hasSubClasses, isBidirectional, isManyToOne, isOneToMany, isOwningClass, isRoot, refreshConstraints, setMappingStrategy, setValidator
 
Methods inherited from class org.codehaus.groovy.grails.commons.AbstractGrailsClass
getClazz, getFullName, getGrailsApplication, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyDescriptors, getPropertyName, getPropertyOrStaticPropertyOrFieldValue, getPropertyType, getPropertyValue, getPropertyValue, getPropertyValueObject, getReference, getReferenceInstance, getShortName, getStaticPropertyValue, hasMetaMethod, hasMetaMethod, hasMetaProperty, hasProperty, isAbstract, isActionMethod, isReadableProperty, newInstance, setGrailsApplication, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.groovy.grails.commons.GrailsDomainClass
getPropertyName
 
Methods inherited from interface org.codehaus.groovy.grails.commons.GrailsClass
getClazz, getFullName, getGrailsApplication, getLogicalPropertyName, getMetaClass, getName, getNaturalName, getPackageName, getPropertyValue, getPropertyValue, getReference, getReferenceInstance, getShortName, hasProperty, isAbstract, newInstance
 
Methods inherited from interface org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware
setGrailsApplication
 

Constructor Detail

GrailsHibernateDomainClass

public GrailsHibernateDomainClass(java.lang.Class<?> clazz,
                                  org.hibernate.SessionFactory sessionFactory,
                                  java.lang.String sessionFactoryName,
                                  org.codehaus.groovy.grails.commons.GrailsApplication application,
                                  org.hibernate.metadata.ClassMetadata metaData)
Contructor to be used by all child classes to create a new instance and get the name right.

Parameters:
clazz - the Grails class
sessionFactory - The Hibernate SessionFactory instance
sessionFactoryName -
application -
metaData - The ClassMetaData for this class retrieved from the SF
Method Detail

setRelatedClassType

protected void setRelatedClassType(org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateDomainClassProperty prop,
                                   org.hibernate.type.AssociationType assType,
                                   org.hibernate.type.Type hibernateType)
Specified by:
setRelatedClassType in class org.codehaus.groovy.grails.orm.hibernate.AbstractGrailsHibernateDomainClass