edu.internet2.middleware.grouper.attr.assign
Class AttributeAssignAction

java.lang.Object
  extended by edu.internet2.middleware.grouper.GrouperAPI
      extended by edu.internet2.middleware.grouper.attr.assign.AttributeAssignAction
All Implemented Interfaces:
GrouperSetElement, HibGrouperLifecycle, Hib3GrouperVersioned, GrouperCloneable, GrouperHasContext, GrouperUtil.FieldValuable, XmlImportable<AttributeAssignAction>, XmlImportableBase<AttributeAssignAction>, Serializable, org.hibernate.classic.Lifecycle

public class AttributeAssignAction
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned, GrouperSetElement, XmlImportable<AttributeAssignAction>

See Also:
Serialized Form

Field Summary
static String COLUMN_ATTRIBUTE_DEF_ID
          column
static String COLUMN_CONTEXT_ID
          column
static String COLUMN_CREATED_ON
          column
static String COLUMN_ID
          column
static String COLUMN_LAST_UPDATED
          column
static String COLUMN_NAME
          column
static String FIELD_ATTRIBUTE_DEF_ID
          constant for field name for: attributeDefId
static String FIELD_CONTEXT_ID
          constant for field name for: contextId
static String FIELD_CREATED_ON_DB
          constant for field name for: createdOnDb
static String FIELD_ID
          constant for field name for: id
static String FIELD_LAST_UPDATED_DB
          constant for field name for: lastUpdatedDb
static String FIELD_NAME
          constant for field name for: name
static String TABLE_GROUPER_ATTR_ASSIGN_ACTION
          name of the groups attribute assign action table in the db
 
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
AttributeAssignAction()
           
 
Method Summary
 String __getId()
          if of this object
 String __getName()
          name of this object (for logging)
 AttributeAssignAction clone()
          deep clone the fields in this object
 AttributeAssignAction dbVersion()
          save the state when retrieving from DB
 Set<String> dbVersionDifferentFields()
          see which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeName
 void dbVersionReset()
          take a snapshot of the data since this is what is in the db
 void delete()
          save or update this object
 boolean equals(Object other)
           
 AttributeAssignActionSetDelegate getAttributeAssignActionSetDelegate()
           
 AttributeDef getAttributeDef()
          attribute def that this action is possible for
 String getAttributeDefId()
          id of the attribute def that this action is possible for
 String getContextId()
          context id of the transaction
 Timestamp getCreatedOn()
          when created
 Long getCreatedOnDb()
          when created
 String getId()
          id of this attribute def name
 Timestamp getLastUpdated()
          when last updated
 Long getLastUpdatedDb()
          when last updated
 String getName()
           
 String getNameDb()
           
 int hashCode()
           
 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
 void save()
          save save this object (insert), assign uuid, etc
 void setAttributeDefId(String attributeDefId1)
          id of the attribute def that this action is possible for
 void setContextId(String contextId1)
          context id of the transaction
 void setCreatedOn(Timestamp createdOn1)
          when created
 void setCreatedOnDb(Long createdOn1)
          when created
 void setId(String id1)
          id of this attribute def name
 void setLastUpdated(Timestamp lastUpdated1)
          when last updated
 void setLastUpdatedDb(Long lastUpdated1)
          when last updated
 void setName(String name1)
           
 void setNameDb(String name1)
           
 String toString()
           
 void update()
          update this object (update to DB)
 void xmlCopyBusinessPropertiesToExisting(AttributeAssignAction existingRecord)
          copy business (non update) properties to an existing record
 boolean xmlDifferentBusinessProperties(AttributeAssignAction other)
          see if the non update cols are different (e.g.
 boolean xmlDifferentUpdateProperties(AttributeAssignAction other)
          see if the update cols are different (e.g.
 String xmlGetId()
          set id key in db
 AttributeAssignAction xmlRetrieveByIdOrKey()
          retrieve from db by id or key.
 AttributeAssignAction xmlSaveBusinessProperties(AttributeAssignAction existingRecord)
          save the business properties (not update properties)
 void xmlSaveUpdateProperties()
          save the udpate properties (e.g.
 void xmlSetId(String theId)
          set id key in db
 XmlExportAttributeAssignAction xmlToExportAttributeAssignAction(GrouperVersion grouperVersion)
          convert to xml bean for export
 String xmlToString()
          convert to string for log
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onSave, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_ATTRIBUTE_DEF_ID

public static final String FIELD_ATTRIBUTE_DEF_ID
constant for field name for: attributeDefId

See Also:
Constant Field Values

FIELD_CONTEXT_ID

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

See Also:
Constant Field Values

FIELD_CREATED_ON_DB

public static final String FIELD_CREATED_ON_DB
constant for field name for: createdOnDb

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_LAST_UPDATED_DB

public static final String FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb

See Also:
Constant Field Values

FIELD_NAME

public static final String FIELD_NAME
constant for field name for: name

See Also:
Constant Field Values

COLUMN_ATTRIBUTE_DEF_ID

public static final String COLUMN_ATTRIBUTE_DEF_ID
column

See Also:
Constant Field Values

COLUMN_CONTEXT_ID

public static final String COLUMN_CONTEXT_ID
column

See Also:
Constant Field Values

COLUMN_CREATED_ON

public static final String COLUMN_CREATED_ON
column

See Also:
Constant Field Values

COLUMN_ID

public static final String COLUMN_ID
column

See Also:
Constant Field Values

COLUMN_LAST_UPDATED

public static final String COLUMN_LAST_UPDATED
column

See Also:
Constant Field Values

COLUMN_NAME

public static final String COLUMN_NAME
column

See Also:
Constant Field Values

TABLE_GROUPER_ATTR_ASSIGN_ACTION

public static final String TABLE_GROUPER_ATTR_ASSIGN_ACTION
name of the groups attribute assign action table in the db

See Also:
Constant Field Values
Constructor Detail

AttributeAssignAction

public AttributeAssignAction()
Method Detail

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

getAttributeAssignActionSetDelegate

public AttributeAssignActionSetDelegate getAttributeAssignActionSetDelegate()
Returns:
the attributeAssignActionSetDelegate

getAttributeDefId

public String getAttributeDefId()
id of the attribute def that this action is possible for

Returns:
the attributeDefId

getAttributeDef

public AttributeDef getAttributeDef()
attribute def that this action is possible for

Returns:
the attributeDef

setAttributeDefId

public void setAttributeDefId(String attributeDefId1)
id of the attribute def that this action is possible for

Parameters:
attributeDefId1 - the attributeDefId to set

__getId

public String __getId()
Description copied from interface: GrouperSetElement
if of this object

Specified by:
__getId in interface GrouperSetElement
Returns:
id
See Also:
GrouperSetElement.__getId()

__getName

public String __getName()
Description copied from interface: GrouperSetElement
name of this object (for logging)

Specified by:
__getName in interface GrouperSetElement
Returns:
name
See Also:
GrouperSetElement.__getName()

clone

public AttributeAssignAction clone()
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:
Object.clone()

delete

public void delete()
save or update this object


getContextId

public String getContextId()
context id of the transaction

Returns:
context id

getCreatedOn

public Timestamp getCreatedOn()
when created

Returns:
timestamp

getCreatedOnDb

public Long getCreatedOnDb()
when created

Returns:
timestamp

getId

public String getId()
id of this attribute def name

Returns:
id

getLastUpdated

public Timestamp getLastUpdated()
when last updated

Returns:
timestamp

getLastUpdatedDb

public Long getLastUpdatedDb()
when last updated

Returns:
timestamp

getName

public String getName()
Returns:
the name

getNameDb

public String getNameDb()
Returns:
the name

setContextId

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

Specified by:
setContextId in interface GrouperHasContext
Parameters:
contextId1 -

setCreatedOn

public void setCreatedOn(Timestamp createdOn1)
when created

Parameters:
createdOn1 -

setCreatedOnDb

public void setCreatedOnDb(Long createdOn1)
when created

Parameters:
createdOn1 -

setId

public void setId(String id1)
id of this attribute def name

Parameters:
id1 -

setLastUpdated

public void setLastUpdated(Timestamp lastUpdated1)
when last updated

Parameters:
lastUpdated1 -

setLastUpdatedDb

public void setLastUpdatedDb(Long lastUpdated1)
when last updated

Parameters:
lastUpdated1 -

setName

public void setName(String name1)
Parameters:
name1 -

setNameDb

public void setNameDb(String name1)
Parameters:
name1 -

toString

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

save

public void save()
save save this object (insert), assign uuid, etc


update

public void update()
update this object (update to DB)


xmlCopyBusinessPropertiesToExisting

public void xmlCopyBusinessPropertiesToExisting(AttributeAssignAction existingRecord)
Description copied from interface: XmlImportableBase
copy business (non update) properties to an existing record

Specified by:
xmlCopyBusinessPropertiesToExisting in interface XmlImportableBase<AttributeAssignAction>
See Also:
XmlImportableBase.xmlCopyBusinessPropertiesToExisting(java.lang.Object)

xmlDifferentBusinessProperties

public boolean xmlDifferentBusinessProperties(AttributeAssignAction other)
Description copied from interface: XmlImportableBase
see if the non update cols are different (e.g. name)

Specified by:
xmlDifferentBusinessProperties in interface XmlImportableBase<AttributeAssignAction>
Parameters:
other - the one to compare with
Returns:
true if so
See Also:
XmlImportableBase.xmlDifferentBusinessProperties(java.lang.Object)

xmlDifferentUpdateProperties

public boolean xmlDifferentUpdateProperties(AttributeAssignAction other)
Description copied from interface: XmlImportableBase
see if the update cols are different (e.g. last updated)

Specified by:
xmlDifferentUpdateProperties in interface XmlImportableBase<AttributeAssignAction>
Parameters:
other - the one to compare with
Returns:
true if so
See Also:
XmlImportableBase.xmlDifferentUpdateProperties(java.lang.Object)

xmlRetrieveByIdOrKey

public AttributeAssignAction xmlRetrieveByIdOrKey()
Description copied from interface: XmlImportable
retrieve from db by id or key. throws exception if duplicate

Specified by:
xmlRetrieveByIdOrKey in interface XmlImportable<AttributeAssignAction>
Returns:
the object or null if not found
See Also:
XmlImportable.xmlRetrieveByIdOrKey()

xmlSaveBusinessProperties

public AttributeAssignAction xmlSaveBusinessProperties(AttributeAssignAction existingRecord)
Description copied from interface: XmlImportableBase
save the business properties (not update properties)

Specified by:
xmlSaveBusinessProperties in interface XmlImportableBase<AttributeAssignAction>
Parameters:
existingRecord - null if insert, the object if exists in DB generally just copy the hibernate version number, and last updated to the object and store it
Returns:
the new object or existing
See Also:
XmlImportableBase.xmlSaveBusinessProperties(java.lang.Object)

xmlSaveUpdateProperties

public void xmlSaveUpdateProperties()
Description copied from interface: XmlImportableBase
save the udpate properties (e.g. last updated). Note, this is done with a sql update statement, not with hibernate

Specified by:
xmlSaveUpdateProperties in interface XmlImportableBase<AttributeAssignAction>
See Also:
XmlImportableBase.xmlSaveUpdateProperties()

xmlToExportAttributeAssignAction

public XmlExportAttributeAssignAction xmlToExportAttributeAssignAction(GrouperVersion grouperVersion)
convert to xml bean for export

Parameters:
grouperVersion -
Returns:
xml bean

xmlGetId

public String xmlGetId()
Description copied from interface: XmlImportableBase
set id key in db

Specified by:
xmlGetId in interface XmlImportableBase<AttributeAssignAction>
Returns:
id
See Also:
XmlImportableBase.xmlGetId()

xmlSetId

public void xmlSetId(String theId)
Description copied from interface: XmlImportableBase
set id key in db

Specified by:
xmlSetId in interface XmlImportableBase<AttributeAssignAction>
See Also:
XmlImportableBase.xmlSetId(java.lang.String)

xmlToString

public String xmlToString()
Description copied from interface: XmlImportableBase
convert to string for log

Specified by:
xmlToString in interface XmlImportableBase<AttributeAssignAction>
Returns:
the string value for log
See Also:
XmlImportableBase.xmlToString()

dbVersion

public AttributeAssignAction dbVersion()
save the state when retrieving from DB

Overrides:
dbVersion in class GrouperAPI
Returns:
the dbVersion

dbVersionReset

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

Overrides:
dbVersionReset in class GrouperAPI

dbVersionDifferentFields

public Set<String> dbVersionDifferentFields()
Description copied from class: GrouperAPI
see which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeName

Overrides:
dbVersionDifferentFields in class GrouperAPI
Returns:
a set of attributes changed, or empty set if none
See Also:
GrouperAPI.dbVersionDifferentFields()

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
Returns:
hashcode
Since:
1.2.0