Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.orm.hibernate
[Java] Class GrailsHibernateDomainClass

    java.lang.Object
      org.codehaus.groovy.grails.commons.AbstractGrailsClass
          org.codehaus.groovy.grails.orm.hibernate.GrailsHibernateDomainClass

All Implemented Interfaces:
  ExternalGrailsDomainClass

    @SuppressWarnings("rawtypes")
    public class GrailsHibernateDomainClass
    extends AbstractGrailsClass

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

Authors:
  Graeme Rocher

Since:
  0.1

Constructor Summary
`GrailsHibernateDomainClass(java.lang.Class clazz, org.hibernate.SessionFactory sessionFactory, java.lang.String sessionFactoryName, 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
`java.util.Map` | `getAssociationMap()`
`java.util.Map` | `getConstrainedProperties()`
`java.lang.String` | `getFieldName(java.lang.String propertyName)`
`GrailsDomainClassProperty` | `getIdentifier()`
`java.util.Map` | `getMappedBy()`
`java.lang.String` | `getMappingStrategy()`
`GrailsDomainClassProperty[]` | `getPersistantProperties()`
`GrailsDomainClassProperty[]` | `getPersistentProperties()`
`GrailsDomainClassProperty` | `getPersistentProperty(java.lang.String name)`
`GrailsDomainClassProperty[]` | `getProperties()` @deprecated
`GrailsDomainClassProperty` | `getPropertyByName(java.lang.String name)`
`java.lang.Class` | `getRelatedClassType(java.lang.String propertyName)`
`org.hibernate.SessionFactory` | `getSessionFactory()`
`java.lang.String` | `getSessionFactoryName()` Evaluates the constraints closure to build the list of constraints.
`java.util.Set` | `getSubClasses()`
`org.springframework.validation.Validator` | `getValidator()`
`GrailsDomainClassProperty` | `getVersion()`
`boolean` | `hasPersistentProperty(java.lang.String propertyName)`
`boolean` | `hasSubClasses()`
`boolean` | `isBidirectional(java.lang.String propertyName)`
`boolean` | `isManyToOne(java.lang.String propertyName)`
`boolean` | `isOneToMany(java.lang.String propertyName)`
`boolean` | `isOwningClass(java.lang.Class domainClass)`
`boolean` | `isRoot()`
`void` | `refreshConstraints()`
`void` | `setMappingStrategy(java.lang.String strategy)`
`void` | `setValidator(org.springframework.validation.Validator validator)`

Methods inherited from class AbstractGrailsClass
getPropertyName, getMetaClass, hasProperty, toString, getName, newInstance, isAbstract, getPackageName, hasMetaProperty, hasMetaMethod, hasMetaMethod, getPropertyType, getPropertyDescriptors, getFullName, getClazz, getReference, isReadableProperty, getShortName, getPropertyValue, getPropertyValue, isActionMethod, getStaticPropertyValue, getPropertyValueObject, getReferenceInstance, getNaturalName, getLogicalPropertyName, getGrailsApplication, setGrailsApplication, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

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()

Constructor Detail

### GrailsHibernateDomainClass

    public GrailsHibernateDomainClass(java.lang.Class clazz, org.hibernate.SessionFactory sessionFactory, java.lang.String sessionFactoryName, 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

### getAssociationMap

    public java.util.Map getAssociationMap()

### getConstrainedProperties

    public java.util.Map getConstrainedProperties()

### getFieldName

    public java.lang.String getFieldName(java.lang.String propertyName)

### getIdentifier

    public GrailsDomainClassProperty getIdentifier()

### getMappedBy

    public java.util.Map getMappedBy()

### getMappingStrategy

    public java.lang.String getMappingStrategy()

### getPersistantProperties

    public GrailsDomainClassProperty[] getPersistantProperties()

### getPersistentProperties

    public GrailsDomainClassProperty[] getPersistentProperties()

### getPersistentProperty

    public GrailsDomainClassProperty getPersistentProperty(java.lang.String name)

### getProperties

    public GrailsDomainClassProperty[] getProperties()

  deprecated:

### getPropertyByName

    public GrailsDomainClassProperty getPropertyByName(java.lang.String name)

### getRelatedClassType

    public java.lang.Class getRelatedClassType(java.lang.String propertyName)

### getSessionFactory

    public org.hibernate.SessionFactory getSessionFactory()

### getSessionFactoryName

    public java.lang.String getSessionFactoryName()

  Evaluates the constraints closure to build the list of constraints.

### getSubClasses

    public boolean isRoot() {
    public java.util.Set getSubClasses()

### getValidator

    public org.springframework.validation.Validator getValidator()

### getVersion

    public GrailsDomainClassProperty getVersion()

### hasPersistentProperty

    public boolean hasPersistentProperty(java.lang.String propertyName)

### hasSubClasses

    public boolean hasSubClasses()

### isBidirectional

    public boolean isBidirectional(java.lang.String propertyName)

### isManyToOne

    public boolean isManyToOne(java.lang.String propertyName)

### isOneToMany

    public boolean isOneToMany(java.lang.String propertyName)

### isOwningClass

    public boolean isOwningClass(java.lang.Class domainClass)

### isRoot

    public boolean isRoot()

### refreshConstraints

    public void refreshConstraints()

### setMappingStrategy

    public void setMappingStrategy(java.lang.String strategy)

### setValidator

    public void setValidator(org.springframework.validation.Validator validator)

Groovy Documentation