Class AttributeDefScope
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.attr.AttributeDefScope
- All Implemented Interfaces:
HibGrouperLifecycle
,Hib3GrouperVersioned
,GrouperCloneable
,GrouperHasContext
,GrouperUtil.FieldValuable
,XmlImportableBase<AttributeDefScope>
,XmlImportableMultiple<AttributeDefScope>
,Serializable
,org.hibernate.classic.Lifecycle
public class AttributeDefScope
extends GrouperAPI
implements GrouperHasContext, Hib3GrouperVersioned, XmlImportableMultiple<AttributeDefScope>
clamp down an attribute def to a set of scopes which are like strings in the DB.
could be a group/stem name, or
- 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
constant for field name for: attributeDefIdstatic final String
constant for field name for: attributeDefScopeTypestatic 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: scopeStringstatic final String
constant for field name for: scopeString2static final String
name of the groups attribute def 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 TypeMethodDescriptionclone()
deep clone the fields in this objectvoid
delete()
Delete this group from the Groups Registry.id of the attribute deftype of scopetype of scopecontext id of the transactionwhen createdwhen createdgetId()
id of this scopewhen last updatedwhen last updatedscope string, either a group or stem name or like string or somethingscope string information 2 (whatever it is used for)void
onPreSave
(HibernateSession hibernateSession) before a save (insert) occursvoid
onPreUpdate
(HibernateSession hibernateSession) before an update occursvoid
save or update this objectvoid
setAttributeDefId
(String attributeDefId1) id of the attribute defvoid
setAttributeDefScopeType
(AttributeDefScopeType attributeDefScopeType1) type of scopevoid
setAttributeDefScopeTypeDb
(String theAttributeDefScopeType1) type of scopevoid
setContextId
(String contextId1) context id of the transactionvoid
setCreatedOn
(Timestamp createdOn1) when createdvoid
setCreatedOnDb
(Long createdOn1) when createdvoid
id of this scopevoid
setLastUpdated
(Timestamp lastUpdated1) when last updatedvoid
setLastUpdatedDb
(Long lastUpdated1) when last updatedvoid
setScopeString
(String scopeString1) scope string, either a group or stem name or like string or somethingvoid
setScopeString2
(String scopeString2) scope string information 2 (whatever it is used for)toString()
void
xmlCopyBusinessPropertiesToExisting
(AttributeDefScope 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
(AttributeDefScope existingRecord) save the business properties (not update properties)void
save the udpate properties (e.g.void
set id key in dbxmlToExportAttributeDefScope
(GrouperVersion grouperVersion) convert to xml bean for exportconvert to string for logMethods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersion, dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, dbVersionReset, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onSave, onUpdate, setHibernateVersionNumber
-
Field Details
-
TABLE_GROUPER_ATTRIBUTE_DEF_SCOPE
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_ATTRIBUTE_DEF_ID
column- See Also:
-
COLUMN_ATTRIBUTE_DEF_SCOPE_TYPE
column- See Also:
-
COLUMN_SCOPE_STRING
column- See Also:
-
COLUMN_SCOPE_STRING2
column- See Also:
-
FIELD_ATTRIBUTE_DEF_ID
constant for field name for: attributeDefId- See Also:
-
FIELD_ATTRIBUTE_DEF_SCOPE_TYPE
constant for field name for: attributeDefScopeType- 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_SCOPE_STRING
constant for field name for: scopeString- See Also:
-
FIELD_SCOPE_STRING2
constant for field name for: scopeString2- See Also:
-
-
Constructor Details
-
AttributeDefScope
public AttributeDefScope()
-
-
Method Details
-
getId
id of this scope- Returns:
- id
-
setId
id of this scope- Parameters:
id1
-
-
getScopeString
scope string, either a group or stem name or like string or something- Returns:
- scope string
-
setScopeString
scope string, either a group or stem name or like string or something- Parameters:
scopeString1
-
-
getAttributeDefId
id of the attribute def- Returns:
- the id
-
setAttributeDefId
id of the attribute def- Parameters:
attributeDefId1
-
-
getAttributeDefScopeType
type of scope- Returns:
- the type of scope
-
setAttributeDefScopeType
type of scope- Parameters:
attributeDefScopeType1
-
-
getAttributeDefScopeTypeDb
type of scope- Returns:
- the type of scope
-
setAttributeDefScopeTypeDb
type of scope- Parameters:
theAttributeDefScopeType1
-
-
getScopeString2
scope string information 2 (whatever it is used for)- Returns:
- the scopeString2
-
setScopeString2
scope string information 2 (whatever it is used for)- Parameters:
scopeString2
- the scopeString2 to set
-
saveOrUpdate
public void saveOrUpdate()save or update this object -
getCreatedOnDb
when created- Returns:
- timestamp
-
getCreatedOn
when created- Returns:
- timestamp
-
getLastUpdated
when last updated- Returns:
- timestamp
-
getLastUpdatedDb
when last updated- Returns:
- timestamp
-
setCreatedOn
when created- Parameters:
createdOn1
-
-
setCreatedOnDb
when created- Parameters:
createdOn1
-
-
setLastUpdated
when last updated- Parameters:
lastUpdated1
-
-
setLastUpdatedDb
when last updated- Parameters:
lastUpdated1
-
-
setContextId
context id of the transaction- Specified by:
setContextId
in interfaceGrouperHasContext
- Parameters:
contextId1
-
-
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:
-
getContextId
context id of the transaction- Returns:
- context id
-
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBase
copy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExisting
in interfaceXmlImportableBase<AttributeDefScope>
- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBase
see if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessProperties
in interfaceXmlImportableBase<AttributeDefScope>
- 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<AttributeDefScope>
- 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<AttributeDefScope>
- 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<AttributeDefScope>
- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportableMultiple
retrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKey
in interfaceXmlImportableMultiple<AttributeDefScope>
- Parameters:
idsToIgnore
- these are ids already processed, do not pick these- Returns:
- the object or null if not found
- See Also:
-
xmlToExportAttributeDefScope
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<AttributeDefScope>
- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBase
set id key in db- Specified by:
xmlSetId
in interfaceXmlImportableBase<AttributeDefScope>
- See Also:
-
xmlToString
Description copied from interface:XmlImportableBase
convert to string for log- Specified by:
xmlToString
in interfaceXmlImportableBase<AttributeDefScope>
- Returns:
- the string value for log
- See Also:
-
delete
Delete this group from the Groups Registry.try { g.delete(); } catch (GroupDeleteException e0) { // Unable to delete group } catch (InsufficientPrivilegeException e1) { // Not privileged to delete this group }
-
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:
-
toString
-