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.FieldValuable
fieldName
- 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.Lifecycle
org.hibernate.CallbackException
Lifecycle.onDelete(org.hibernate.Session)
public void onLoad(org.hibernate.Session s, Serializable id)
onLoad
in interface org.hibernate.classic.Lifecycle
Lifecycle.onLoad(org.hibernate.Session, java.io.Serializable)
public void onPostDelete(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostDelete
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPostSave(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostSave
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPostUpdate(HibernateSession hibernateSession)
HibGrouperLifecycle
onPostUpdate
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPostUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPreDelete(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreDelete
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPreSave(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreSave
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public void onPreUpdate(HibernateSession hibernateSession)
HibGrouperLifecycle
onPreUpdate
in interface HibGrouperLifecycle
HibGrouperLifecycle.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)
public boolean onSave(org.hibernate.Session s) throws org.hibernate.CallbackException
onSave
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
Lifecycle.onSave(org.hibernate.Session)
public boolean onUpdate(org.hibernate.Session s) throws org.hibernate.CallbackException
onUpdate
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
Lifecycle.onUpdate(org.hibernate.Session)
public abstract GrouperAPI clone()
clone
in interface GrouperCloneable
clone
in class Object
Object.clone()
public Long getHibernateVersionNumber()
public void setHibernateVersionNumber(Long hibernateVersionNumber)
hibernateVersionNumber
- the hibernateVersion to setCopyright © 2016 Internet2. All rights reserved.