public abstract class GrouperAPI extends Object implements GrouperUtil.FieldValuable, Serializable, HibGrouperLifecycle, org.hibernate.classic.Lifecycle, GrouperCloneable
| Modifier and Type | Field and Description |
|---|---|
static String |
COLUMN_HIBERNATE_VERSION_NUMBER
column
|
protected Object |
dbVersion
save the state when retrieving from DB
|
static String |
FIELD_DB_VERSION
field name for db version
|
static String |
FIELD_HIBERNATE_VERSION_NUMBER
constant name of field (and javabean property) for hibernateVersion
|
static long |
INITIAL_VERSION_NUMBER |
| Constructor and Description |
|---|
GrouperAPI() |
| Modifier and Type | Method and Description |
|---|---|
abstract GrouperAPI |
clone()
deep clone the fields in this object
|
Object |
dbVersion()
version of this object in the database
|
void |
dbVersionClear()
set to null (e.g.
|
Set<String> |
dbVersionDifferentFields()
see which fields have changed compared to the DB state (last known)
note that attributes will print out: attribute__attributeName
|
boolean |
dbVersionIsDifferent()
see if the state of this object has changed compared to the DB state (last known)
|
void |
dbVersionReset()
take a snapshot of the data since this is what is in the db
|
Object |
fieldValue(String fieldName)
call this method to get the field value (e.g.
|
Long |
getHibernateVersionNumber()
hibernate increments with each insert/update (-1 means insert, 0+ means update, null means 0)
|
boolean |
onDelete(org.hibernate.Session s) |
void |
onLoad(org.hibernate.Session s,
Serializable id) |
void |
onPostDelete(HibernateSession hibernateSession)
after a delete occurs
|
void |
onPostSave(HibernateSession hibernateSession)
after a save (insert) occurs
|
void |
onPostUpdate(HibernateSession hibernateSession)
after an update occurs
|
void |
onPreDelete(HibernateSession hibernateSession)
before a delete (insert) occurs
|
void |
onPreSave(HibernateSession hibernateSession)
before a save (insert) occurs
|
void |
onPreUpdate(HibernateSession hibernateSession)
before an update occurs
|
boolean |
onSave(org.hibernate.Session s) |
boolean |
onUpdate(org.hibernate.Session s) |
void |
setHibernateVersionNumber(Long hibernateVersionNumber)
hibernate increments with each insert/update (-1 means insert, 0+ means update, null means 0)
|
public static final long INITIAL_VERSION_NUMBER
public static final String COLUMN_HIBERNATE_VERSION_NUMBER
protected Object dbVersion
public static final String FIELD_DB_VERSION
public static final String FIELD_HIBERNATE_VERSION_NUMBER
public Object fieldValue(String fieldName)
fieldValue in interface GrouperUtil.FieldValuablefieldName - public Object dbVersion()
public boolean dbVersionIsDifferent()
public Set<String> dbVersionDifferentFields()
public void dbVersionReset()
public void dbVersionClear()
public boolean onDelete(org.hibernate.Session s)
throws org.hibernate.CallbackException
onDelete in interface org.hibernate.classic.Lifecycleorg.hibernate.CallbackExceptionLifecycle.onDelete(org.hibernate.Session)public void onLoad(org.hibernate.Session s,
Serializable id)
onLoad in interface org.hibernate.classic.LifecycleLifecycle.onLoad(org.hibernate.Session, java.io.Serializable)public void onPostDelete(HibernateSession hibernateSession)
HibGrouperLifecycleonPostDelete in interface HibGrouperLifecycleHibGrouperLifecycle.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPostSave(HibernateSession hibernateSession)
HibGrouperLifecycleonPostSave in interface HibGrouperLifecycleHibGrouperLifecycle.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPostUpdate(HibernateSession hibernateSession)
HibGrouperLifecycleonPostUpdate in interface HibGrouperLifecycleHibGrouperLifecycle.onPostUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreDelete(HibernateSession hibernateSession)
HibGrouperLifecycleonPreDelete in interface HibGrouperLifecycleHibGrouperLifecycle.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreSave(HibernateSession hibernateSession)
HibGrouperLifecycleonPreSave in interface HibGrouperLifecycleHibGrouperLifecycle.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)public void onPreUpdate(HibernateSession hibernateSession)
HibGrouperLifecycleonPreUpdate in interface HibGrouperLifecycleHibGrouperLifecycle.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)public boolean onSave(org.hibernate.Session s)
throws org.hibernate.CallbackException
onSave in interface org.hibernate.classic.Lifecycleorg.hibernate.CallbackExceptionLifecycle.onSave(org.hibernate.Session)public boolean onUpdate(org.hibernate.Session s)
throws org.hibernate.CallbackException
onUpdate in interface org.hibernate.classic.Lifecycleorg.hibernate.CallbackExceptionLifecycle.onUpdate(org.hibernate.Session)public abstract GrouperAPI clone()
clone in interface GrouperCloneableclone in class ObjectObject.clone()public Long getHibernateVersionNumber()
public void setHibernateVersionNumber(Long hibernateVersionNumber)
hibernateVersionNumber - the hibernateVersion to setCopyright © 2016 Internet2. All rights reserved.