Class AttributeAssignAction
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
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:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
columnstatic final String
columnstatic final String
columnstatic final String
columnstatic final String
columnstatic final String
columnstatic final String
constant for field name for: attributeDefIdstatic final String
constant for field name for: contextIdstatic final String
constant for field name for: createdOnDbstatic final String
constant for field name for: idstatic final String
constant for field name for: lastUpdatedDbstatic final String
constant for field name for: namestatic final String
name of the groups attribute assign action table in the dbFields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, dbVersion, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription__getId()
if of this objectname of this object (for logging)clone()
deep clone the fields in this objectsave the state when retrieving from DBsee which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeNamevoid
take a snapshot of the data since this is what is in the dbvoid
delete()
save or update this objectboolean
attribute def that this action is possible forid of the attribute def that this action is possible forcontext id of the transactionwhen createdwhen createdgetId()
id of this attribute def namewhen last updatedwhen last updatedgetName()
int
hashCode()
void
onPreDelete
(HibernateSession hibernateSession) before a delete (insert) occursvoid
onPreSave
(HibernateSession hibernateSession) before a save (insert) occursvoid
onPreUpdate
(HibernateSession hibernateSession) before an update occursvoid
save()
save save this object (insert), assign uuid, etcvoid
setAttributeDefId
(String attributeDefId1) id of the attribute def that this action is possible forvoid
setContextId
(String contextId1) context id of the transactionvoid
setCreatedOn
(Timestamp createdOn1) when createdvoid
setCreatedOnDb
(Long createdOn1) when createdvoid
id of this attribute def namevoid
setLastUpdated
(Timestamp lastUpdated1) when last updatedvoid
setLastUpdatedDb
(Long lastUpdated1) when last updatedvoid
void
toString()
void
update()
update this object (update to DB)void
xmlCopyBusinessPropertiesToExisting
(AttributeAssignAction existingRecord) copy business (non update) properties to an existing recordboolean
see if the non update cols are different (e.g.boolean
see if the update cols are different (e.g.xmlGetId()
set id key in dbretrieve from db by id or key.xmlSaveBusinessProperties
(AttributeAssignAction existingRecord) save the business properties (not update properties)void
save the udpate properties (e.g.void
set id key in dbxmlToExportAttributeAssignAction
(GrouperVersion grouperVersion) convert to xml bean for exportconvert to string for logMethods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onSave, onUpdate, setHibernateVersionNumber
-
Field Details
-
FIELD_ATTRIBUTE_DEF_ID
constant for field name for: attributeDefId- See Also:
-
FIELD_CONTEXT_ID
constant for field name for: contextId- See Also:
-
FIELD_CREATED_ON_DB
constant for field name for: createdOnDb- See Also:
-
FIELD_ID
constant for field name for: id- See Also:
-
FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb- See Also:
-
FIELD_NAME
constant for field name for: name- See Also:
-
COLUMN_ATTRIBUTE_DEF_ID
column- See Also:
-
COLUMN_CONTEXT_ID
column- See Also:
-
COLUMN_CREATED_ON
column- See Also:
-
COLUMN_ID
column- See Also:
-
COLUMN_LAST_UPDATED
column- See Also:
-
COLUMN_NAME
column- See Also:
-
TABLE_GROUPER_ATTR_ASSIGN_ACTION
name of the groups attribute assign action table in the db- See Also:
-
-
Constructor Details
-
AttributeAssignAction
public AttributeAssignAction()
-
-
Method Details
-
onPreSave
Description copied from interface:HibGrouperLifecycle
before a save (insert) occurs- Specified by:
onPreSave
in interfaceHibGrouperLifecycle
- Overrides:
onPreSave
in classGrouperAPI
- See Also:
-
onPreDelete
Description copied from interface:HibGrouperLifecycle
before a delete (insert) occurs- Specified by:
onPreDelete
in interfaceHibGrouperLifecycle
- Overrides:
onPreDelete
in classGrouperAPI
- See Also:
-
onPreUpdate
Description copied from interface:HibGrouperLifecycle
before an update occurs- Specified by:
onPreUpdate
in interfaceHibGrouperLifecycle
- Overrides:
onPreUpdate
in classGrouperAPI
- See Also:
-
getAttributeAssignActionSetDelegate
- Returns:
- the attributeAssignActionSetDelegate
-
getAttributeDefId
id of the attribute def that this action is possible for- Returns:
- the attributeDefId
-
getAttributeDef
attribute def that this action is possible for- Returns:
- the attributeDef
-
setAttributeDefId
id of the attribute def that this action is possible for- Parameters:
attributeDefId1
- the attributeDefId to set
-
__getId
Description copied from interface:GrouperSetElement
if of this object- Specified by:
__getId
in interfaceGrouperSetElement
- Returns:
- id
- See Also:
-
__getName
Description copied from interface:GrouperSetElement
name of this object (for logging)- Specified by:
__getName
in interfaceGrouperSetElement
- Returns:
- name
- See Also:
-
clone
deep clone the fields in this object- Specified by:
clone
in interfaceGrouperCloneable
- Specified by:
clone
in classGrouperAPI
- Returns:
- the clone of the object
- See Also:
-
delete
public void delete()save or update this object -
getContextId
context id of the transaction- Returns:
- context id
-
getCreatedOn
when created- Returns:
- timestamp
-
getCreatedOnDb
when created- Returns:
- timestamp
-
getId
id of this attribute def name- Returns:
- id
-
getLastUpdated
when last updated- Returns:
- timestamp
-
getLastUpdatedDb
when last updated- Returns:
- timestamp
-
getName
- Returns:
- the name
-
getNameDb
- Returns:
- the name
-
setContextId
context id of the transaction- Specified by:
setContextId
in interfaceGrouperHasContext
- Parameters:
contextId1
-
-
setCreatedOn
when created- Parameters:
createdOn1
-
-
setCreatedOnDb
when created- Parameters:
createdOn1
-
-
setId
id of this attribute def name- Parameters:
id1
-
-
setLastUpdated
when last updated- Parameters:
lastUpdated1
-
-
setLastUpdatedDb
when last updated- Parameters:
lastUpdated1
-
-
setName
- Parameters:
name1
-
-
setNameDb
- Parameters:
name1
-
-
toString
-
save
public void save()save save this object (insert), assign uuid, etc -
update
public void update()update this object (update to DB) -
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBase
copy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExisting
in interfaceXmlImportableBase<AttributeAssignAction>
- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBase
see if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessProperties
in interfaceXmlImportableBase<AttributeAssignAction>
- Parameters:
other
- the one to compare with- Returns:
- true if so
- See Also:
-
xmlDifferentUpdateProperties
Description copied from interface:XmlImportableBase
see if the update cols are different (e.g. last updated)- Specified by:
xmlDifferentUpdateProperties
in interfaceXmlImportableBase<AttributeAssignAction>
- Parameters:
other
- the one to compare with- Returns:
- true if so
- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportable
retrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKey
in interfaceXmlImportable<AttributeAssignAction>
- Returns:
- the object or null if not found
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBase
save the business properties (not update properties)- Specified by:
xmlSaveBusinessProperties
in interfaceXmlImportableBase<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:
-
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 interfaceXmlImportableBase<AttributeAssignAction>
- See Also:
-
xmlToExportAttributeAssignAction
public XmlExportAttributeAssignAction xmlToExportAttributeAssignAction(GrouperVersion grouperVersion) convert to xml bean for export- Parameters:
grouperVersion
-- Returns:
- xml bean
-
xmlGetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlGetId
in interfaceXmlImportableBase<AttributeAssignAction>
- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlSetId
in interfaceXmlImportableBase<AttributeAssignAction>
- See Also:
-
xmlToString
Description copied from interface:XmlImportableBase
convert to string for log- Specified by:
xmlToString
in interfaceXmlImportableBase<AttributeAssignAction>
- Returns:
- the string value for log
- See Also:
-
dbVersion
save the state when retrieving from DB- Overrides:
dbVersion
in classGrouperAPI
- Returns:
- the dbVersion
-
dbVersionReset
public void dbVersionReset()take a snapshot of the data since this is what is in the db- Overrides:
dbVersionReset
in classGrouperAPI
-
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 classGrouperAPI
- Returns:
- a set of attributes changed, or empty set if none
- See Also:
-
equals
-
hashCode
public int hashCode()
-