Groovy Documentation

org.codehaus.groovy.grails.orm.hibernate
[Groovy] Class HibernateGormInstanceApi

java.lang.Object
  org.grails.datastore.gorm.AbstractDatastoreApi
      org.grails.datastore.gorm.AbstractGormApi
          org.grails.datastore.gorm.GormInstanceApi
              org.codehaus.groovy.grails.orm.hibernate.HibernateGormInstanceApi

class HibernateGormInstanceApi
extends org.grails.datastore.gorm.GormInstanceApi

The implementation of the GORM instance API contract for Hibernate.

Authors:
Graeme Rocher
Since:
1.0


Field Summary
 
Fields inherited from class org.grails.datastore.gorm.GormInstanceApi
__timeStamp, __timeStamp__239_neverHappen1323783608378, __timeStamp, __timeStamp__239_neverHappen1323783608307, __timeStamp, __timeStamp__239_neverHappen1323783608171
 
Fields inherited from class org.grails.datastore.gorm.AbstractGormApi
__timeStamp, __timeStamp__239_neverHappen1323783608307, __timeStamp, __timeStamp__239_neverHappen1323783608171
 
Constructor Summary
HibernateGormInstanceApi(java.lang.Class persistentClass, HibernateDatastore datastore, java.lang.ClassLoader classLoader)

 
Method Summary
java.lang.Object attach(java.lang.Object instance)

void delete(java.lang.Object instance)

void delete(java.lang.Object instance, java.util.Map params)

void discard(java.lang.Object instance)

java.util.List getDirtyPropertyNames(java.lang.Object instance)

Obtains a list of property names that are dirty

java.lang.Object getPersistentValue(java.lang.Object instance, java.lang.String fieldName)

Gets the original persisted value of a field.

boolean instanceOf(java.lang.Object instance, java.lang.Class cls)

boolean isAttached(java.lang.Object instance)

boolean isDirty(java.lang.Object instance, java.lang.String fieldName)

Checks whether a field is dirty

boolean isDirty(java.lang.Object instance)

Checks whether an entity is dirty

java.lang.Object lock(java.lang.Object instance)

java.lang.Object merge(java.lang.Object instance)

java.lang.Object merge(java.lang.Object instance, java.util.Map params)

java.lang.Object refresh(java.lang.Object instance)

java.lang.Object save(java.lang.Object instance)

java.lang.Object save(java.lang.Object instance, boolean validate)

java.lang.Object save(java.lang.Object instance, java.util.Map params)

 
Methods inherited from class org.grails.datastore.gorm.GormInstanceApi
org.grails.datastore.gorm.GormInstanceApi#lock(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#save(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#save(java.lang.Object, java.util.Map), org.grails.datastore.gorm.GormInstanceApi#save(java.lang.Object, boolean), org.grails.datastore.gorm.GormInstanceApi#delete(java.lang.Object, java.util.Map), org.grails.datastore.gorm.GormInstanceApi#delete(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#mutex(java.lang.Object, groovy.lang.Closure), org.grails.datastore.gorm.GormInstanceApi#merge(java.lang.Object, java.util.Map), org.grails.datastore.gorm.GormInstanceApi#merge(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#refresh(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#isAttached(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#attach(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#__$swapInit(), org.grails.datastore.gorm.GormInstanceApi#super$1$wait(), org.grails.datastore.gorm.GormInstanceApi#super$1$toString(), org.grails.datastore.gorm.GormInstanceApi#super$1$notifyAll(), org.grails.datastore.gorm.GormInstanceApi#super$2$setMetaClass(groovy.lang.MetaClass), org.grails.datastore.gorm.GormInstanceApi#super$2$getMetaClass(), org.grails.datastore.gorm.GormInstanceApi#super$2$getProperty(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#super$2$setProperty(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$invoke$4(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$set$4(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$get$4(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#isFailOnError(), org.grails.datastore.gorm.GormInstanceApi#setFailOnError(boolean), org.grails.datastore.gorm.GormInstanceApi#getFailOnError(), org.grails.datastore.gorm.GormInstanceApi#super$2$this$dist$get$2(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#super$2$this$dist$set$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$2$this$dist$invoke$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$3$this$dist$get$3(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#super$3$this$dist$set$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$3$super$2$this$dist$set$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$3$super$2$this$dist$get$2(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#super$3$this$dist$invoke$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$3$$getStaticMetaClass(), org.grails.datastore.gorm.GormInstanceApi#super$3$super$2$this$dist$invoke$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$3$getExtendedMethods(), org.grails.datastore.gorm.GormInstanceApi#super$3$getMethods(), org.grails.datastore.gorm.GormInstanceApi#instanceOf(java.lang.Object, java.lang.Class), org.grails.datastore.gorm.GormInstanceApi#ident(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#discard(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#setValidationException(java.lang.Class), org.grails.datastore.gorm.GormInstanceApi#getMethods(), org.grails.datastore.gorm.GormInstanceApi#super$1$wait(long, int), org.grails.datastore.gorm.GormInstanceApi#super$1$notify(), org.grails.datastore.gorm.GormInstanceApi#this$dist$invoke$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$set$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$get$3(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#super$2$invokeMethod(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$2$execute(org.grails.datastore.mapping.core.VoidSessionCallback), org.grails.datastore.gorm.GormInstanceApi#super$2$execute(org.grails.datastore.mapping.core.SessionCallback), org.grails.datastore.gorm.GormInstanceApi#super$2$$getStaticMetaClass(), org.grails.datastore.gorm.GormInstanceApi#getExtendedMethods(), org.grails.datastore.gorm.GormInstanceApi#getEXCLUDES(), org.grails.datastore.gorm.GormInstanceApi#setProperty(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#getProperty(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#getMetaClass(), org.grails.datastore.gorm.GormInstanceApi#this$dist$invoke$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$set$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#this$dist$get$2(java.lang.String), org.grails.datastore.gorm.GormInstanceApi#setMetaClass(groovy.lang.MetaClass), org.grails.datastore.gorm.GormInstanceApi#invokeMethod(java.lang.String, java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$1$wait(long), org.grails.datastore.gorm.GormInstanceApi#super$1$getClass(), org.grails.datastore.gorm.GormInstanceApi#super$1$clone(), org.grails.datastore.gorm.GormInstanceApi#super$1$equals(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#super$1$hashCode(), org.grails.datastore.gorm.GormInstanceApi#super$1$finalize(), org.grails.datastore.gorm.GormInstanceApi#wait(), org.grails.datastore.gorm.GormInstanceApi#wait(long), org.grails.datastore.gorm.GormInstanceApi#wait(long, int), org.grails.datastore.gorm.GormInstanceApi#equals(java.lang.Object), org.grails.datastore.gorm.GormInstanceApi#toString(), org.grails.datastore.gorm.GormInstanceApi#hashCode(), org.grails.datastore.gorm.GormInstanceApi#getClass(), org.grails.datastore.gorm.GormInstanceApi#notify(), org.grails.datastore.gorm.GormInstanceApi#notifyAll()
 
Methods inherited from class org.grails.datastore.gorm.AbstractGormApi
org.grails.datastore.gorm.AbstractGormApi#getMethods(), org.grails.datastore.gorm.AbstractGormApi#__$swapInit(), org.grails.datastore.gorm.AbstractGormApi#super$1$wait(), org.grails.datastore.gorm.AbstractGormApi#super$1$wait(long, int), org.grails.datastore.gorm.AbstractGormApi#super$1$toString(), org.grails.datastore.gorm.AbstractGormApi#super$1$notify(), org.grails.datastore.gorm.AbstractGormApi#super$1$notifyAll(), org.grails.datastore.gorm.AbstractGormApi#this$dist$invoke$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#this$dist$set$3(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#this$dist$get$3(java.lang.String), org.grails.datastore.gorm.AbstractGormApi#super$2$setMetaClass(groovy.lang.MetaClass), org.grails.datastore.gorm.AbstractGormApi#super$2$getMetaClass(), org.grails.datastore.gorm.AbstractGormApi#super$2$getProperty(java.lang.String), org.grails.datastore.gorm.AbstractGormApi#super$2$setProperty(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#super$2$invokeMethod(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#super$2$execute(org.grails.datastore.mapping.core.VoidSessionCallback), org.grails.datastore.gorm.AbstractGormApi#super$2$execute(org.grails.datastore.mapping.core.SessionCallback), org.grails.datastore.gorm.AbstractGormApi#super$2$this$dist$get$2(java.lang.String), org.grails.datastore.gorm.AbstractGormApi#super$2$this$dist$set$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#super$2$$getStaticMetaClass(), org.grails.datastore.gorm.AbstractGormApi#super$2$this$dist$invoke$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#getExtendedMethods(), org.grails.datastore.gorm.AbstractGormApi#getEXCLUDES(), org.grails.datastore.gorm.AbstractGormApi#setProperty(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#getProperty(java.lang.String), org.grails.datastore.gorm.AbstractGormApi#getMetaClass(), org.grails.datastore.gorm.AbstractGormApi#this$dist$invoke$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#this$dist$set$2(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#this$dist$get$2(java.lang.String), org.grails.datastore.gorm.AbstractGormApi#setMetaClass(groovy.lang.MetaClass), org.grails.datastore.gorm.AbstractGormApi#invokeMethod(java.lang.String, java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#super$1$wait(long), org.grails.datastore.gorm.AbstractGormApi#super$1$getClass(), org.grails.datastore.gorm.AbstractGormApi#super$1$clone(), org.grails.datastore.gorm.AbstractGormApi#super$1$equals(java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#super$1$hashCode(), org.grails.datastore.gorm.AbstractGormApi#super$1$finalize(), org.grails.datastore.gorm.AbstractGormApi#wait(), org.grails.datastore.gorm.AbstractGormApi#wait(long), org.grails.datastore.gorm.AbstractGormApi#wait(long, int), org.grails.datastore.gorm.AbstractGormApi#equals(java.lang.Object), org.grails.datastore.gorm.AbstractGormApi#toString(), org.grails.datastore.gorm.AbstractGormApi#hashCode(), org.grails.datastore.gorm.AbstractGormApi#getClass(), org.grails.datastore.gorm.AbstractGormApi#notify(), org.grails.datastore.gorm.AbstractGormApi#notifyAll()
 

Constructor Detail

HibernateGormInstanceApi

HibernateGormInstanceApi(java.lang.Class persistentClass, HibernateDatastore datastore, java.lang.ClassLoader classLoader)


 
Method Detail

attach

@Override
java.lang.Object attach(java.lang.Object instance)


delete

@Override
void delete(java.lang.Object instance)


delete

@Override
void delete(java.lang.Object instance, java.util.Map params)


discard

@Override
void discard(java.lang.Object instance)


getDirtyPropertyNames

java.util.List getDirtyPropertyNames(java.lang.Object instance)
Obtains a list of property names that are dirty
Parameters:
instance - The instance
Returns:
A list of property names that are dirty


getPersistentValue

java.lang.Object getPersistentValue(java.lang.Object instance, java.lang.String fieldName)
Gets the original persisted value of a field.
Parameters:
fieldName - The field name
Returns:
The original persisted value


instanceOf

@Override
boolean instanceOf(java.lang.Object instance, java.lang.Class cls)


isAttached

@Override
boolean isAttached(java.lang.Object instance)


isDirty

boolean isDirty(java.lang.Object instance, java.lang.String fieldName)
Checks whether a field is dirty
Parameters:
instance - The instance
fieldName - The name of the field
Returns:
True if the field is dirty


isDirty

boolean isDirty(java.lang.Object instance)
Checks whether an entity is dirty
Parameters:
instance - The instance
Returns:
True if it is dirty


lock

@Override
java.lang.Object lock(java.lang.Object instance)


merge

@Override
java.lang.Object merge(java.lang.Object instance)


merge

@Override
java.lang.Object merge(java.lang.Object instance, java.util.Map params)


refresh

@Override
java.lang.Object refresh(java.lang.Object instance)


save

@Override
java.lang.Object save(java.lang.Object instance)


save

java.lang.Object save(java.lang.Object instance, boolean validate)


save

@Override
java.lang.Object save(java.lang.Object instance, java.util.Map params)


 

Groovy Documentation