edu.internet2.middleware.grouper
Class Attribute

java.lang.Object
  extended by edu.internet2.middleware.grouper.GrouperAPI
      extended by edu.internet2.middleware.grouper.Attribute
All Implemented Interfaces:
HibGrouperLifecycle, Hib3GrouperVersioned, GrouperCloneable, GrouperHasContext, GrouperUtil.FieldValuable, Serializable, org.hibernate.classic.Lifecycle

public class Attribute
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned

Basic Hibernate Attribute DTO interface.

Since:
@HEAD@
Version:
$Id: Attribute.java,v 1.26 2009/04/13 16:53:08 mchyzer Exp $
Author:
blair christensen.
See Also:
Serialized Form

Field Summary
static String COLUMN_FIELD_ID
          column field_id col in db
static String COLUMN_FIELD_NAME
          column field_name col in db
static String COLUMN_OLD_FIELD_NAME
          column old_field_name col in db
static String FIELD_CONTEXT_ID
          constant for field name for: contextId
static String FIELD_FIELD_ID
          constant for field name for: fieldId
static String FIELD_GROUP
          constant for field name for: group
static String FIELD_GROUP_UUID
          constant for field name for: groupUUID
static String FIELD_ID
          constant for field name for: id
static String FIELD_VALUE
          constant for field name for: value
static String PROPERTY_GROUP_UUID
          constant for field name for: groupUUID
static String TABLE_GROUPER_ATTRIBUTES
           
 
Fields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
 
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
 
Constructor Summary
Attribute()
           
 
Method Summary
 void assignGroupUuid(String groupUUID1, Group group1)
           
 Attribute clone()
          deep clone the fields in this object
 Attribute dbVersion()
          version of this object in the database
 Set<String> dbVersionDifferentFields(boolean failIfNull)
           
 void dbVersionReset()
          take a snapshot of the data since this is what is in the db
 boolean equals(Object other)
           
 String getAttrName()
           
 String getContextId()
          context id of the transaction
 String getFieldId()
          id of the field which is the attribute name
 String getGroupUuid()
           
 String getId()
           
 String getValue()
           
 int hashCode()
           
 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
 Group retrieveGroup(boolean retrieveIfNull)
          try to get the current group if it is available (if this object is cloned, then it might be null)
 void setContextId(String contextId1)
          context id of the transaction
 void setFieldId(String fieldId1)
          id of the field which is the attribute name
 void setGroupUuid(String groupUUID1)
           
 void setId(String id)
           
 void setValue(String value)
           
 String toString()
           
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onSave, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_CONTEXT_ID

public static final String FIELD_CONTEXT_ID
constant for field name for: contextId

See Also:
Constant Field Values

FIELD_FIELD_ID

public static final String FIELD_FIELD_ID
constant for field name for: fieldId

See Also:
Constant Field Values

FIELD_GROUP

public static final String FIELD_GROUP
constant for field name for: group

See Also:
Constant Field Values

FIELD_GROUP_UUID

public static final String FIELD_GROUP_UUID
constant for field name for: groupUUID

See Also:
Constant Field Values

FIELD_ID

public static final String FIELD_ID
constant for field name for: id

See Also:
Constant Field Values

FIELD_VALUE

public static final String FIELD_VALUE
constant for field name for: value

See Also:
Constant Field Values

PROPERTY_GROUP_UUID

public static final String PROPERTY_GROUP_UUID
constant for field name for: groupUUID

See Also:
Constant Field Values

TABLE_GROUPER_ATTRIBUTES

public static final String TABLE_GROUPER_ATTRIBUTES
See Also:
Constant Field Values

COLUMN_FIELD_ID

public static final String COLUMN_FIELD_ID
column field_id col in db

See Also:
Constant Field Values

COLUMN_FIELD_NAME

public static final String COLUMN_FIELD_NAME
column field_name col in db

See Also:
Constant Field Values

COLUMN_OLD_FIELD_NAME

public static final String COLUMN_OLD_FIELD_NAME
column old_field_name col in db

See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute()
Method Detail

dbVersionReset

public void dbVersionReset()
take a snapshot of the data since this is what is in the db

Overrides:
dbVersionReset in class GrouperAPI

dbVersion

public Attribute dbVersion()
Description copied from class: GrouperAPI
version of this object in the database

Overrides:
dbVersion in class GrouperAPI
Returns:
the db version
See Also:
GrouperAPI.dbVersion()

dbVersionDifferentFields

public Set<String> dbVersionDifferentFields(boolean failIfNull)
Parameters:
failIfNull -
Returns:
the set of different fields
See Also:
GrouperAPI.dbVersionDifferentFields()

retrieveGroup

public Group retrieveGroup(boolean retrieveIfNull)
try to get the current group if it is available (if this object is cloned, then it might be null)

Parameters:
retrieveIfNull - true to get from DB if null
Returns:
the current group

assignGroupUuid

public void assignGroupUuid(String groupUUID1,
                            Group group1)
Parameters:
groupUUID1 -
group1 -

equals

public boolean equals(Object other)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getAttrName

public String getAttrName()
Returns:
attr name

getGroupUuid

public String getGroupUuid()
Returns:
group uuid

getId

public String getId()
Returns:
id

getValue

public String getValue()
Returns:
value

setGroupUuid

public void setGroupUuid(String groupUUID1)
Parameters:
groupUUID1 -

setId

public void setId(String id)
Parameters:
id -

setValue

public void setValue(String value)
Parameters:
value -

clone

public Attribute clone()
Description copied from class: GrouperAPI
deep clone the fields in this object

Specified by:
clone in interface GrouperCloneable
Specified by:
clone in class GrouperAPI
Returns:
the clone of the object
See Also:
GrouperAPI.clone()

getFieldId

public String getFieldId()
id of the field which is the attribute name

Returns:
the field id

setFieldId

public void setFieldId(String fieldId1)
id of the field which is the attribute name

Parameters:
fieldId1 -

onPostDelete

public void onPostDelete(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
after a delete occurs

Specified by:
onPostDelete in interface HibGrouperLifecycle
Overrides:
onPostDelete in class GrouperAPI
See Also:
GrouperAPI.onPostDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)

onPostSave

public void onPostSave(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
after a save (insert) occurs

Specified by:
onPostSave in interface HibGrouperLifecycle
Overrides:
onPostSave in class GrouperAPI
See Also:
HibGrouperLifecycle.onPostSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)

onPostUpdate

public void onPostUpdate(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
after an update occurs

Specified by:
onPostUpdate in interface HibGrouperLifecycle
Overrides:
onPostUpdate in class GrouperAPI
See Also:
HibGrouperLifecycle.onPostUpdate(HibernateSession)

onPreDelete

public void onPreDelete(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
before a delete (insert) occurs

Specified by:
onPreDelete in interface HibGrouperLifecycle
Overrides:
onPreDelete in class GrouperAPI
See Also:
GrouperAPI.onPreDelete(edu.internet2.middleware.grouper.hibernate.HibernateSession)

onPreSave

public void onPreSave(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
before a save (insert) occurs

Specified by:
onPreSave in interface HibGrouperLifecycle
Overrides:
onPreSave in class GrouperAPI
See Also:
GrouperAPI.onPreSave(edu.internet2.middleware.grouper.hibernate.HibernateSession)

onPreUpdate

public void onPreUpdate(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
before an update occurs

Specified by:
onPreUpdate in interface HibGrouperLifecycle
Overrides:
onPreUpdate in class GrouperAPI
See Also:
GrouperAPI.onPreUpdate(edu.internet2.middleware.grouper.hibernate.HibernateSession)

getContextId

public String getContextId()
context id of the transaction

Returns:
context id

setContextId

public void setContextId(String contextId1)
context id of the transaction

Specified by:
setContextId in interface GrouperHasContext
Parameters:
contextId1 -