Class AttributeDefName
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.attr.AttributeDefName
- All Implemented Interfaces:
GrouperSetElement
,HibGrouperLifecycle
,Hib3GrouperVersioned
,GrouperCloneable
,GrouperHasContext
,GrouperId
,GrouperObject
,GrouperUtil.FieldValuable
,XmlImportable<AttributeDefName>
,XmlImportableBase<AttributeDefName>
,Serializable
,Comparable<GrouperObject>
,org.hibernate.classic.Lifecycle
public class AttributeDefName
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned, GrouperSetElement, XmlImportable<AttributeDefName>, Comparable<GrouperObject>, GrouperObject
definition of an attribute name (is linked with an attribute def)
- 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
columnstatic final String
columnstatic final String
unique number for this attributeDefNamestatic 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: descriptionstatic final String
constant for field name for: displayExtensionstatic final String
constant for field name for: displayNamestatic final String
constant for field name for: extensionstatic final String
constant for field name for: idstatic final String
constant for field name for: idIndexstatic final String
constant for field name for: lastUpdatedDbstatic final String
constant for field name for: namestatic final String
constant for field name for: stemIdstatic final String
name of the groups attribute def name table in the dbstatic final String
static final String
static final String
static final String
static final String
Fields 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)void
make sure this attribute def can admin from grouper sessionboolean
assignIdIndex
(long theIdIndex) assign different id indexclone()
deep clone the fields in this objectint
compareTo
(GrouperObject that) save 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
get the attribute defattribute definition that this is related todelegate logic about attribute def name sets to this objectcontext id of the transactionwhen createdwhen createddescription of attribute, friendly description, e.g.displayExtension of attribute, e.g.displayExtension of attribute, e.g.displayName of attribute, e.g.displayName of attribute, e.g.extension of attribute expireTimeextension of attribute expireTimegetId()
id of this attribute def nameid of the group as a unique integerwhen last updatedwhen last updatedgetLegacyAttributeName
(boolean exceptionIfNotLegacyAttribute) getLegacyGroupTypeName
(boolean exceptionIfNotLegacyGroupType) getName()
name of object, e.g.get stem this is inthis method makes this class more compatible with Group and StemgetStem()
stem that this attribute is instem that this attribute is ingetUuid()
id of this attribute def nameint
hashCode()
void
internalSetAttributeDef
(AttributeDef attributeDef1) set this for cachingboolean
matchesLowerSearchStrings
(Set<String> filterStrings) see if this object matches the filter stringsvoid
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 occursvoid
setAttributeDefId
(String attributeDefId1) attribute def id that this is related tovoid
setContextId
(String contextId1) context id of the transactionvoid
setCreatedOn
(Timestamp createdOn1) when createdvoid
setCreatedOnDb
(Long createdOn1) when createdvoid
setDescription
(String description1) description of attribute, friendly description, e.g.void
setDisplayExtension
(String displayExtension1) displayExtension of attribute, e.g.void
setDisplayExtensionDb
(String displayExtension1) displayExtension of attribute, e.g.void
setDisplayName
(String displayName1) displayName of attribute, e.g.void
setDisplayNameDb
(String displayName1) displayName of attribute, e.g.void
setExtension
(String extension1) extension of attribute expireTimevoid
setExtensionDb
(String extension1) extension of attribute expireTimevoid
id of this attribute def namevoid
setIdIndex
(Long idIndex1) id of the group as a unique integervoid
setLastUpdated
(Timestamp lastUpdated1) when last updatedvoid
setLastUpdatedDb
(Long lastUpdated1) when last updatedvoid
void
void
stem that this attribute is invoid
store()
store this group (update) to databasetoString()
void
validate()
void
xmlCopyBusinessPropertiesToExisting
(AttributeDefName 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
(AttributeDefName existingRecord) save the business properties (not update properties)void
save the udpate properties (e.g.void
set id key in dbxmlToExportAttributeDefName
(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
-
VALIDATION_NAME_OF_ATTRIBUTE_DEF_NAME_TOO_LONG_KEY
- See Also:
-
VALIDATION_DISPLAY_NAME_OF_ATTRIBUTE_DEF_NAME_TOO_LONG_KEY
- See Also:
-
VALIDATION_DECRIPTION_OF_ATTRIBUTE_DEF_NAME_TOO_LONG_KEY
- See Also:
-
VALIDATION_EXTENSION_OF_ATTRIBUTE_DEF_NAME_TOO_LONG_KEY
- See Also:
-
VALIDATION_DISPLAY_EXTENSION_OF_ATTRIBUTE_DEF_NAME_TOO_LONG_KEY
- See Also:
-
TABLE_GROUPER_ATTRIBUTE_DEF_NAME
name of the groups attribute def name table in the db- See Also:
-
COLUMN_ATTRIBUTE_DEF_ID
column- See Also:
-
COLUMN_CONTEXT_ID
column- See Also:
-
COLUMN_CREATED_ON
column- See Also:
-
COLUMN_LAST_UPDATED
column- See Also:
-
COLUMN_DESCRIPTION
column- See Also:
-
COLUMN_EXTENSION
column- See Also:
-
COLUMN_NAME
column- See Also:
-
COLUMN_DISPLAY_EXTENSION
column- See Also:
-
COLUMN_DISPLAY_NAME
column- See Also:
-
COLUMN_STEM_ID
column- See Also:
-
COLUMN_ID
column- See Also:
-
COLUMN_ID_INDEX
unique number for this attributeDefName- See Also:
-
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_DESCRIPTION
constant for field name for: description- See Also:
-
FIELD_DISPLAY_EXTENSION
constant for field name for: displayExtension- See Also:
-
FIELD_DISPLAY_NAME
constant for field name for: displayName- See Also:
-
FIELD_EXTENSION
constant for field name for: extension- See Also:
-
FIELD_ID
constant for field name for: id- See Also:
-
FIELD_ID_INDEX
constant for field name for: idIndex- See Also:
-
FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb- See Also:
-
FIELD_NAME
constant for field name for: name- See Also:
-
FIELD_STEM_ID
constant for field name for: stemId- See Also:
-
-
Constructor Details
-
AttributeDefName
public AttributeDefName()
-
-
Method Details
-
assertCanAdminAttributeDefStatic
public void assertCanAdminAttributeDefStatic()make sure this attribute def can admin from grouper session -
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:
-
getAttributeDef
get the attribute def- Returns:
- the attribute def
-
getStem
stem that this attribute is in- Returns:
- the stem id
-
getParentUuid
this method makes this class more compatible with Group and Stem- Returns:
- the parent stem id
-
getStemId
stem that this attribute is in- Returns:
- the stem id
-
setStemId
stem that this attribute is in- Parameters:
stemId1
-
-
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 name -
getUuid
id of this attribute def name- Returns:
- id
-
setId
id of this attribute def name- Parameters:
id1
-
-
getName
Description copied from interface:GrouperObject
name of object, e.g. a:b:c- Specified by:
getName
in interfaceGrouperObject
- Returns:
- the name
-
setName
- Parameters:
name1
-
-
getNameDb
- Returns:
- the name
-
setNameDb
- Parameters:
name1
-
-
getDescription
description of attribute, friendly description, e.g. in sentence form, about what the attribute is about- Specified by:
getDescription
in interfaceGrouperObject
- Returns:
- the description
-
setDescription
description of attribute, friendly description, e.g. in sentence form, about what the attribute is about- Parameters:
description1
-
-
getDisplayExtension
displayExtension of attribute, e.g. Expire Date- Returns:
- display extension
-
setDisplayExtension
displayExtension of attribute, e.g. Expire Date- Parameters:
displayExtension1
-
-
getDisplayName
displayName of attribute, e.g. My School:Community Groups:Expire Date- Specified by:
getDisplayName
in interfaceGrouperObject
- Returns:
- display name
-
setDisplayName
displayName of attribute, e.g. My School:Community Groups:Expire Date- Parameters:
displayName1
-
-
getExtension
extension of attribute expireTime- Returns:
- extension
-
setExtension
extension of attribute expireTime- Parameters:
extension1
-
-
getExtensionDb
extension of attribute expireTime- Returns:
- extension
-
setExtensionDb
extension of attribute expireTime- Parameters:
extension1
-
-
getLastUpdated
when last updated- Returns:
- timestamp
-
getLastUpdatedDb
when last updated- Returns:
- timestamp
-
getCreatedOn
when created- Returns:
- timestamp
-
getCreatedOnDb
when created- Returns:
- timestamp
-
setLastUpdated
when last updated- Parameters:
lastUpdated1
-
-
setLastUpdatedDb
when last updated- Parameters:
lastUpdated1
-
-
setCreatedOn
when created- Parameters:
createdOn1
-
-
setCreatedOnDb
when created- Parameters:
createdOn1
-
-
getDisplayExtensionDb
displayExtension of attribute, e.g. Expire Date- Returns:
- display extension
-
setDisplayExtensionDb
displayExtension of attribute, e.g. Expire Date- Parameters:
displayExtension1
-
-
getDisplayNameDb
displayName of attribute, e.g. My School:Community Groups:Expire Date- Returns:
- display name
-
setDisplayNameDb
displayName of attribute, e.g. My School:Community Groups:Expire Date- Parameters:
displayName1
-
-
getAttributeDefId
attribute definition that this is related to- Returns:
- the attribute def id
-
setAttributeDefId
attribute def id that this is related to- Parameters:
attributeDefId1
-
-
__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:
-
delete
public void delete()save or update this object -
getAttributeDefNameSetDelegate
delegate logic about attribute def name sets to this object- Returns:
- the delegate
-
toString
-
equals
-
hashCode
public int hashCode() -
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBase
copy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExisting
in interfaceXmlImportableBase<AttributeDefName>
- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBase
see if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessProperties
in interfaceXmlImportableBase<AttributeDefName>
- 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<AttributeDefName>
- 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<AttributeDefName>
- 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<AttributeDefName>
- 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<AttributeDefName>
- See Also:
-
xmlToExportAttributeDefName
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<AttributeDefName>
- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlSetId
in interfaceXmlImportableBase<AttributeDefName>
- See Also:
-
xmlToString
Description copied from interface:XmlImportableBase
convert to string for log- Specified by:
xmlToString
in interfaceXmlImportableBase<AttributeDefName>
- Returns:
- the string value for log
- See Also:
-
store
public void store()store this group (update) to database -
validate
public void validate() -
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:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GrouperObject>
- See Also:
-
getIdIndex
id of the group as a unique integer- Returns:
- id
-
setIdIndex
id of the group as a unique integer- Parameters:
idIndex1
-
-
assignIdIndex
public boolean assignIdIndex(long theIdIndex) assign different id index- Parameters:
theIdIndex
-- Returns:
- if it was changed
-
internalSetAttributeDef
set this for caching- Parameters:
attributeDef1
-
-
getLegacyAttributeName
- Parameters:
exceptionIfNotLegacyAttribute
-- Returns:
- legacy attribute name
-
getLegacyGroupTypeName
- Parameters:
exceptionIfNotLegacyGroupType
-- Returns:
- legacy attribute name
-
matchesLowerSearchStrings
Description copied from interface:GrouperObject
see if this object matches the filter strings- Specified by:
matchesLowerSearchStrings
in interfaceGrouperObject
- Returns:
- true if matches
- See Also:
-
getParentStem
Description copied from interface:GrouperObject
get stem this is in- Specified by:
getParentStem
in interfaceGrouperObject
- Returns:
- the stem
- See Also:
-