Class AttributeAssignValue
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.attr.value.AttributeAssignValue
- All Implemented Interfaces:
HibGrouperLifecycle,Hib3GrouperVersioned,GrouperCloneable,GrouperHasContext,GrouperUtil.FieldValuable,XmlImportableBase<AttributeAssignValue>,XmlImportableMultiple<AttributeAssignValue>,Serializable,org.hibernate.classic.Lifecycle
public class AttributeAssignValue
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned, XmlImportableMultiple<AttributeAssignValue>
value of an attribute assignment (could be multi-valued based on the attributeDef
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringcolumnstatic final Stringconstant for field name for: attributeAssignIdstatic 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: valueFloatingstatic final Stringconstant for field name for: valueIntegerstatic final Stringconstant for field name for: valueMemberIdstatic final Stringconstant for field name for: valueStringstatic final Stringname of the groups attribute def table in the dbstatic longkeep a count for junitFields 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 TypeMethodDescriptionvoidassignValue(AttributeAssignValue attributeAssignValue) clear all the valuesvoidassignValue(Object value) assign a value to any typevoidassignValue(Object value, AttributeDef attributeDef) assign a value to any typevoidclear all the valuesclone()deep clone the fields in this objectstatic StringdateToString(Date date) Deprecated.use GrouperUtil.dateToStringsave 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()delete this recordget the attribute assignattribute assignment in this value assignmentcontext id of the transactionwhen createdwhen createdget the type of this valuegetId()id of this attribute defwhen last updatedwhen last updatedgetValue()get the value whatever it is or null if nonefloating point valueget value string valueinteger valuememberId value (for subjects)string valuevoidinternalSetAttributeAssign(AttributeAssign attributeAssign1) set this for cachingvoidonPostDelete(HibernateSession hibernateSession) after a delete occursvoidonPostSave(HibernateSession hibernateSession) after a save (insert) occursvoidonPostUpdate(HibernateSession hibernateSession) after an update occursvoidonPreDelete(HibernateSession hibernateSession) before a delete (insert) occursvoidonPreSave(HibernateSession hibernateSession) before a save (insert) occursvoidonPreUpdate(HibernateSession hibernateSession) before an update occursbooleansameValue(AttributeAssignValue attributeAssignValue) if the argument has the same value as thisvoidsave or update this objectvoidsetAttributeAssign(AttributeAssign attributeAssign1) attribute assignment in this value assignmentvoidsetAttributeAssignId(String attributeAssignId1) attribute assignment in this value assignmentvoidsetContextId(String contextId1) context id of the transactionvoidsetCreatedOn(Timestamp createdOn1) when createdvoidsetCreatedOnDb(Long createdOn1) when createdvoidid of this attribute defvoidsetLastUpdated(Timestamp lastUpdated1) when last updatedvoidsetLastUpdatedDb(Long lastUpdated1) when last updatedvoidsetValueFloating(Double valueFloating1) floating point valuevoidsetValueInteger(Long valueInteger1) integer valuevoidsetValueMemberId(String valueMemberId1) memberId value (for subjects)voidsetValueString(String valueString1) string valuestatic DatestringToDate(String dateString) Deprecated.use GrouperUtil.stringToDatetoString()whatever the type, return the string valuevalueString(boolean convertTimestampToFriendly) whatever the type, return the string valuevoidxmlCopyBusinessPropertiesToExisting(AttributeAssignValue 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 dbxmlRetrieveByIdOrKey(Collection<String> idsToIgnore) retrieve from db by id or key.xmlSaveBusinessProperties(AttributeAssignValue existingRecord) save the business properties (not update properties)voidsave the udpate properties (e.g. last updated).voidset id key in dbxmlToExportAttributeAssignValue(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, onSave, onUpdate, setHibernateVersionNumber
-
Field Details
-
TABLE_GROUPER_ATTRIBUTE_ASSIGN_VALUE
name of the groups attribute def table in the db- See Also:
-
COLUMN_CONTEXT_ID
column- See Also:
-
COLUMN_CREATED_ON
column- See Also:
-
COLUMN_LAST_UPDATED
column- See Also:
-
COLUMN_ID
column- See Also:
-
COLUMN_VALUE_STRING
column- See Also:
-
COLUMN_VALUE_FLOATING
column- See Also:
-
COLUMN_VALUE_INTEGER
column- See Also:
-
COLUMN_VALUE_MEMBER_ID
column- See Also:
-
COLUMN_ATTRIBUTE_ASSIGN_ID
column- See Also:
-
FIELD_ATTRIBUTE_ASSIGN_ID
constant for field name for: attributeAssignId- 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_VALUE_FLOATING
constant for field name for: valueFloating- See Also:
-
FIELD_VALUE_INTEGER
constant for field name for: valueInteger- See Also:
-
FIELD_VALUE_MEMBER_ID
constant for field name for: valueMemberId- See Also:
-
FIELD_VALUE_STRING
constant for field name for: valueString- See Also:
-
testingUseSqlCount
public static long testingUseSqlCountkeep a count for junit
-
-
Constructor Details
-
AttributeAssignValue
public AttributeAssignValue()
-
-
Method Details
-
clone
deep clone the fields in this object- Specified by:
clonein interfaceGrouperCloneable- Specified by:
clonein classGrouperAPI- Returns:
- the clone of the object
- See Also:
-
getValueFloating
floating point value- Returns:
- floating point value
-
setValueFloating
floating point value- Parameters:
valueFloating1-
-
assignValue
assign a value to any type- Parameters:
value-
-
assignValue
assign a value to any type- Parameters:
value-attributeDef-
-
valueString
whatever the type, return the string value- Returns:
- value
-
getValueFriendly
get value string value- Returns:
- value string friendly
-
valueString
whatever the type, return the string value- Parameters:
convertTimestampToFriendly- true to convert timestamps to yyyy/MM/dd HH:mm:ss.SSS as opposed to numbers of millis since 1970- Returns:
- value
-
dateToString
Deprecated.use GrouperUtil.dateToStringconvert a date to a string using the standard web service pattern yyyy/MM/dd HH:mm:ss.SSS Note that HH is 0-23- Parameters:
date-- Returns:
- the string, or null if the date is null
-
stringToDate
Deprecated.use GrouperUtil.stringToDateconvert a string to a date using the standard web service pattern Note that HH is 0-23- Parameters:
dateString-- Returns:
- the string, or null if the date was null
-
clearValue
public void clearValue()clear all the values -
assignValue
clear all the values- Parameters:
attributeAssignValue-
-
saveOrUpdate
public void saveOrUpdate()save or update this object -
getContextId
context id of the transaction- Returns:
- context id
-
setContextId
context id of the transaction- Specified by:
setContextIdin interfaceGrouperHasContext- Parameters:
contextId1-
-
getId
id of this attribute def- Returns:
- id
-
setId
id of this attribute def- Parameters:
id1-
-
getLastUpdated
when last updated- Returns:
- timestamp
-
getLastUpdatedDb
when last updated- Returns:
- timestamp
-
setLastUpdated
when last updated- Parameters:
lastUpdated1-
-
setLastUpdatedDb
when last updated- Parameters:
lastUpdated1-
-
getCreatedOn
when created- Returns:
- timestamp
-
getCreatedOnDb
when created- Returns:
- timestamp
-
setCreatedOn
when created- Parameters:
createdOn1-
-
setCreatedOnDb
when created- Parameters:
createdOn1-
-
getAttributeAssignId
attribute assignment in this value assignment- Returns:
- the attributeNameId
-
getAttributeAssign
get the attribute assign- Returns:
- the attribute assign
-
setAttributeAssign
attribute assignment in this value assignment- Parameters:
attributeAssign1- the attributeAssign to set
-
setAttributeAssignId
attribute assignment in this value assignment- Parameters:
attributeAssignId1- the attributeNameId to set
-
getValueString
string value- Returns:
- the valueString
-
setValueString
string value- Parameters:
valueString1- the valueString to set
-
getValueInteger
integer value- Returns:
- the valueInteger
-
setValueInteger
integer value- Parameters:
valueInteger1- the valueInteger to set
-
getValueMemberId
memberId value (for subjects)- Returns:
- the valueMemberId
-
setValueMemberId
memberId value (for subjects)- Parameters:
valueMemberId1- the valueMemberId to set
-
xmlToExportAttributeAssignValue
convert to xml bean for export- Parameters:
grouperVersion-- Returns:
- xml bean
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportableMultipleretrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKeyin interfaceXmlImportableMultiple<AttributeAssignValue>- Parameters:
idsToIgnore- these are ids already processed, do not pick these- Returns:
- the object or null if not found
- See Also:
-
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBasecopy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExistingin interfaceXmlImportableBase<AttributeAssignValue>- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBasesee if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessPropertiesin interfaceXmlImportableBase<AttributeAssignValue>- 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<AttributeAssignValue>- Parameters:
other- the one to compare with- Returns:
- true if so
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBasesave the business properties (not update properties)- Specified by:
xmlSaveBusinessPropertiesin interfaceXmlImportableBase<AttributeAssignValue>- 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<AttributeAssignValue>- See Also:
-
delete
public void delete()delete this record -
toString
-
xmlGetId
Description copied from interface:XmlImportableBaseset id key in db- Specified by:
xmlGetIdin interfaceXmlImportableBase<AttributeAssignValue>- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBaseset id key in db- Specified by:
xmlSetIdin interfaceXmlImportableBase<AttributeAssignValue>- See Also:
-
xmlToString
Description copied from interface:XmlImportableBaseconvert to string for log- Specified by:
xmlToStringin interfaceXmlImportableBase<AttributeAssignValue>- Returns:
- the string value for log
- See Also:
-
sameValue
if the argument has the same value as this- Parameters:
attributeAssignValue-- Returns:
- if the argument has the same value as this
-
getValue
get the value whatever it is or null if none- Returns:
- the value
-
getCurrentAssignValueType
get the type of this value- Returns:
- the type of this value
-
onPostDelete
Description copied from interface:HibGrouperLifecycleafter a delete occurs- Specified by:
onPostDeletein interfaceHibGrouperLifecycle- Overrides:
onPostDeletein classGrouperAPI- See Also:
-
onPostSave
Description copied from interface:HibGrouperLifecycleafter a save (insert) occurs- Specified by:
onPostSavein interfaceHibGrouperLifecycle- Overrides:
onPostSavein classGrouperAPI- See Also:
-
onPostUpdate
Description copied from interface:HibGrouperLifecycleafter an update occurs- Specified by:
onPostUpdatein interfaceHibGrouperLifecycle- Overrides:
onPostUpdatein classGrouperAPI- See Also:
-
onPreDelete
Description copied from interface:HibGrouperLifecyclebefore a delete (insert) occurs- Specified by:
onPreDeletein interfaceHibGrouperLifecycle- Overrides:
onPreDeletein classGrouperAPI- See Also:
-
onPreSave
Description copied from interface:HibGrouperLifecyclebefore a save (insert) occurs- Specified by:
onPreSavein interfaceHibGrouperLifecycle- Overrides:
onPreSavein classGrouperAPI- See Also:
-
onPreUpdate
Description copied from interface:HibGrouperLifecyclebefore an update occurs- Specified by:
onPreUpdatein interfaceHibGrouperLifecycle- Overrides:
onPreUpdatein classGrouperAPI- 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:
-
internalSetAttributeAssign
set this for caching- Parameters:
attributeAssign1-
-