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
-
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
columnstatic final String
columnstatic final String
columnstatic final String
constant for field name for: attributeAssignIdstatic 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: valueFloatingstatic final String
constant for field name for: valueIntegerstatic final String
constant for field name for: valueMemberIdstatic final String
constant for field name for: valueStringstatic final String
name of the groups attribute def table in the dbstatic long
keep 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_NUMBER
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
assignValue
(AttributeAssignValue attributeAssignValue) clear all the valuesvoid
assignValue
(Object value) assign a value to any typevoid
assignValue
(Object value, AttributeDef attributeDef) assign a value to any typevoid
clear all the valuesclone()
deep clone the fields in this objectstatic String
dateToString
(Date date) convert a date to a string using the standard web service pattern yyyy/MM/dd HH:mm:ss.SSS Note that HH is 0-23save 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()
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 valuevoid
internalSetAttributeAssign
(AttributeAssign attributeAssign1) set this for cachingvoid
onPostDelete
(HibernateSession hibernateSession) after a delete occursvoid
onPostSave
(HibernateSession hibernateSession) after a save (insert) occursvoid
onPostUpdate
(HibernateSession hibernateSession) after an update occursvoid
onPreDelete
(HibernateSession hibernateSession) before a delete (insert) occursvoid
onPreSave
(HibernateSession hibernateSession) before a save (insert) occursvoid
onPreUpdate
(HibernateSession hibernateSession) before an update occursboolean
sameValue
(AttributeAssignValue attributeAssignValue) if the argument has the same value as thisvoid
save or update this objectvoid
setAttributeAssign
(AttributeAssign attributeAssign1) attribute assignment in this value assignmentvoid
setAttributeAssignId
(String attributeAssignId1) attribute assignment in this value assignmentvoid
setContextId
(String contextId1) context id of the transactionvoid
setCreatedOn
(Timestamp createdOn1) when createdvoid
setCreatedOnDb
(Long createdOn1) when createdvoid
id of this attribute defvoid
setLastUpdated
(Timestamp lastUpdated1) when last updatedvoid
setLastUpdatedDb
(Long lastUpdated1) when last updatedvoid
setValueFloating
(Double valueFloating1) floating point valuevoid
setValueInteger
(Long valueInteger1) integer valuevoid
setValueMemberId
(String valueMemberId1) memberId value (for subjects)void
setValueString
(String valueString1) string valuestatic Date
stringToDate
(String dateString) convert a string to a date using the standard web service pattern Note that HH is 0-23toString()
whatever the type, return the string valuevalueString
(boolean convertTimestampToFriendly) whatever the type, return the string valuevoid
xmlCopyBusinessPropertiesToExisting
(AttributeAssignValue 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 dbxmlRetrieveByIdOrKey
(Collection<String> idsToIgnore) retrieve from db by id or key.xmlSaveBusinessProperties
(AttributeAssignValue existingRecord) save the business properties (not update properties)void
save the udpate properties (e.g.void
set 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:
clone
in interfaceGrouperCloneable
- Specified by:
clone
in 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
convert 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
convert 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:
setContextId
in 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:XmlImportableMultiple
retrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKey
in 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:XmlImportableBase
copy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExisting
in interfaceXmlImportableBase<AttributeAssignValue>
- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBase
see if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessProperties
in interfaceXmlImportableBase<AttributeAssignValue>
- 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<AttributeAssignValue>
- Parameters:
other
- the one to compare with- Returns:
- true if so
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBase
save the business properties (not update properties)- Specified by:
xmlSaveBusinessProperties
in 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: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<AttributeAssignValue>
- See Also:
-
delete
public void delete()delete this record -
toString
-
xmlGetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlGetId
in interfaceXmlImportableBase<AttributeAssignValue>
- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlSetId
in interfaceXmlImportableBase<AttributeAssignValue>
- See Also:
-
xmlToString
Description copied from interface:XmlImportableBase
convert to string for log- Specified by:
xmlToString
in 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:HibGrouperLifecycle
after a delete occurs- Specified by:
onPostDelete
in interfaceHibGrouperLifecycle
- Overrides:
onPostDelete
in classGrouperAPI
- See Also:
-
onPostSave
Description copied from interface:HibGrouperLifecycle
after a save (insert) occurs- Specified by:
onPostSave
in interfaceHibGrouperLifecycle
- Overrides:
onPostSave
in classGrouperAPI
- See Also:
-
onPostUpdate
Description copied from interface:HibGrouperLifecycle
after an update occurs- Specified by:
onPostUpdate
in interfaceHibGrouperLifecycle
- Overrides:
onPostUpdate
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:
-
onPreSave
Description copied from interface:HibGrouperLifecycle
before a save (insert) occurs- Specified by:
onPreSave
in interfaceHibGrouperLifecycle
- Overrides:
onPreSave
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:
-
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:
-
internalSetAttributeAssign
set this for caching- Parameters:
attributeAssign1
-
-