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
FieldsModifier and TypeFieldDescriptionstatic final Stringcolumnstatic final Stringcolumnstatic 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: attributeDefScopeTypestatic 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: scopeStringstatic final Stringconstant for field name for: scopeString2static final Stringname 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_NUMBERFields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()deep clone the fields in this objectvoiddelete()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)voidonPreSave(HibernateSession hibernateSession) before a save (insert) occursvoidonPreUpdate(HibernateSession hibernateSession) before an update occursvoidsave or update this objectvoidsetAttributeDefId(String attributeDefId1) id of the attribute defvoidsetAttributeDefScopeType(AttributeDefScopeType attributeDefScopeType1) type of scopevoidsetAttributeDefScopeTypeDb(String theAttributeDefScopeType1) type of scopevoidsetContextId(String contextId1) context id of the transactionvoidsetCreatedOn(Timestamp createdOn1) when createdvoidsetCreatedOnDb(Long createdOn1) when createdvoidid of this scopevoidsetLastUpdated(Timestamp lastUpdated1) when last updatedvoidsetLastUpdatedDb(Long lastUpdated1) when last updatedvoidsetScopeString(String scopeString1) scope string, either a group or stem name or like string or somethingvoidsetScopeString2(String scopeString2) scope string information 2 (whatever it is used for)toString()voidxmlCopyBusinessPropertiesToExisting(AttributeDefScope 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(AttributeDefScope existingRecord) save the business properties (not update properties)voidsave the udpate properties (e.g. last updated).voidset 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:
setContextIdin interfaceGrouperHasContext- Parameters:
contextId1-
-
clone
deep clone the fields in this object- Specified by:
clonein interfaceGrouperCloneable- Specified by:
clonein classGrouperAPI- Returns:
- the clone of the object
- See Also:
-
getContextId
context id of the transaction- Returns:
- context id
-
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBasecopy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExistingin interfaceXmlImportableBase<AttributeDefScope>- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBasesee if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessPropertiesin interfaceXmlImportableBase<AttributeDefScope>- 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<AttributeDefScope>- 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<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:XmlImportableBasesave the udpate properties (e.g. last updated). Note, this is done with a sql update statement, not with hibernate- Specified by:
xmlSaveUpdatePropertiesin interfaceXmlImportableBase<AttributeDefScope>- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportableMultipleretrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKeyin 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:XmlImportableBaseset id key in db- Specified by:
xmlGetIdin interfaceXmlImportableBase<AttributeDefScope>- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBaseset id key in db- Specified by:
xmlSetIdin interfaceXmlImportableBase<AttributeDefScope>- See Also:
-
xmlToString
Description copied from interface:XmlImportableBaseconvert to string for log- Specified by:
xmlToStringin 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: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:
-
toString
-