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
FieldsModifier and TypeFieldDescriptionstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringconstant for field name for: attributeDefIdstatic final Stringconstant for field name for: contextIdstatic final Stringconstant for field name for: createdOnDbstatic final Stringconstant for field name for: idstatic final Stringconstant for field name for: lastUpdatedDbstatic final Stringconstant for field name for: namestatic final Stringname 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_NUMBERFields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO -
Constructor Summary
Constructors -
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__attributeNamevoidtake a snapshot of the data since this is what is in the dbvoiddelete()save or update this objectbooleanattribute 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()inthashCode()voidonPreDelete(HibernateSession hibernateSession) before a delete (insert) occursvoidonPreSave(HibernateSession hibernateSession) before a save (insert) occursvoidonPreUpdate(HibernateSession hibernateSession) before an update occursvoidsave()save save this object (insert), assign uuid, etcvoidsetAttributeDefId(String attributeDefId1) id of the attribute def that this action is possible forvoidsetContextId(String contextId1) context id of the transactionvoidsetCreatedOn(Timestamp createdOn1) when createdvoidsetCreatedOnDb(Long createdOn1) when createdvoidid of this attribute def namevoidsetLastUpdated(Timestamp lastUpdated1) when last updatedvoidsetLastUpdatedDb(Long lastUpdated1) when last updatedvoidvoidtoString()voidupdate()update this object (update to DB)voidxmlCopyBusinessPropertiesToExisting(AttributeAssignAction existingRecord) copy business (non update) properties to an existing recordbooleansee if the non update cols are different (e.g. name)booleansee if the update cols are different (e.g. last updated)xmlGetId()set id key in dbretrieve from db by id or key.xmlSaveBusinessProperties(AttributeAssignAction existingRecord) save the business properties (not update properties)voidsave the udpate properties (e.g. last updated).voidset 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:HibGrouperLifecyclebefore a save (insert) occurs- Specified by:
onPreSavein interfaceHibGrouperLifecycle- Overrides:
onPreSavein classGrouperAPI- See Also:
-
onPreDelete
Description copied from interface:HibGrouperLifecyclebefore a delete (insert) occurs- Specified by:
onPreDeletein interfaceHibGrouperLifecycle- Overrides:
onPreDeletein classGrouperAPI- See Also:
-
onPreUpdate
Description copied from interface:HibGrouperLifecyclebefore an update occurs- Specified by:
onPreUpdatein interfaceHibGrouperLifecycle- Overrides:
onPreUpdatein 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:GrouperSetElementif of this object- Specified by:
__getIdin interfaceGrouperSetElement- Returns:
- id
- See Also:
-
__getName
Description copied from interface:GrouperSetElementname of this object (for logging)- Specified by:
__getNamein interfaceGrouperSetElement- Returns:
- name
- See Also:
-
clone
deep clone the fields in this object- Specified by:
clonein interfaceGrouperCloneable- Specified by:
clonein 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:
setContextIdin 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:XmlImportableBasecopy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExistingin interfaceXmlImportableBase<AttributeAssignAction>- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBasesee if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessPropertiesin interfaceXmlImportableBase<AttributeAssignAction>- Parameters:
other- the one to compare with- Returns:
- true if so
- See Also:
-
xmlDifferentUpdateProperties
Description copied from interface:XmlImportableBasesee if the update cols are different (e.g. last updated)- Specified by:
xmlDifferentUpdatePropertiesin interfaceXmlImportableBase<AttributeAssignAction>- Parameters:
other- the one to compare with- Returns:
- true if so
- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportableretrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKeyin interfaceXmlImportable<AttributeAssignAction>- Returns:
- the object or null if not found
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBasesave the business properties (not update properties)- Specified by:
xmlSaveBusinessPropertiesin 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:XmlImportableBasesave the udpate properties (e.g. last updated). Note, this is done with a sql update statement, not with hibernate- Specified by:
xmlSaveUpdatePropertiesin 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:XmlImportableBaseset id key in db- Specified by:
xmlGetIdin interfaceXmlImportableBase<AttributeAssignAction>- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBaseset id key in db- Specified by:
xmlSetIdin interfaceXmlImportableBase<AttributeAssignAction>- See Also:
-
xmlToString
Description copied from interface:XmlImportableBaseconvert to string for log- Specified by:
xmlToStringin interfaceXmlImportableBase<AttributeAssignAction>- Returns:
- the string value for log
- See Also:
-
dbVersion
save the state when retrieving from DB- Overrides:
dbVersionin classGrouperAPI- Returns:
- the dbVersion
-
dbVersionReset
public void dbVersionReset()take a snapshot of the data since this is what is in the db- Overrides:
dbVersionResetin classGrouperAPI
-
dbVersionDifferentFields
Description copied from class:GrouperAPIsee which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeName- Overrides:
dbVersionDifferentFieldsin classGrouperAPI- Returns:
- a set of attributes changed, or empty set if none
- See Also:
-
equals
-
hashCode
public int hashCode()
-