Class RoleSet
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.permissions.role.RoleSet
- All Implemented Interfaces:
GrouperSet,HibGrouperLifecycle,Hib3GrouperVersioned,GrouperCloneable,GrouperHasContext,GrouperUtil.FieldValuable,XmlImportable<RoleSet>,XmlImportableBase<RoleSet>,Serializable,org.hibernate.classic.Lifecycle
public class RoleSet
extends GrouperAPI
implements Hib3GrouperVersioned, GrouperSet, GrouperHasContext, XmlImportable<RoleSet>
- See Also:
-
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: contextIdstatic final Stringconstant for field name for: createdOnDbstatic final Stringconstant for field name for: depthstatic final Stringconstant for field name for: idstatic final Stringconstant for field name for: ifHasRoleIdstatic final Stringconstant for field name for: lastUpdatedDbstatic final Stringconstant for field name for: parentRoleSetIdstatic final Stringconstant for field name for: thenHasRoleIdstatic final Stringconstant for field name for: typestatic final Stringname of the groups role 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 TypeMethodDescriptionintdepth of this relationship (0 means self, 1 means one hop, 2 means 2 hops, etc)__getId()if of this objectif has this element then has another elementif has this element id then has another element idget the parent set the parent is the relationship leading up to this relationship.parent set idhas this element if it has anotherhas this element Id if it has another idvoid__setParentGrouperSetId(String grouperSetId) set the parent id of this set.clone()deep clone the fields in this objectsave 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()save or update this objectbooleanstatic RoleSetfindInCollection(Collection<RoleSet> roleSets, String ifHasId, String thenHasId, int depth, boolean exceptionIfNull) find role set, better be herecontext id of the transactionwhen createdwhen createdintgetDepth()getId()when last updatedwhen last updatedfor self, or immediate, just use this id.getType()get string value of type for hibernateinthashCode()voidonPreDelete(HibernateSession hibernateSession) before a delete (insert) occursvoidonPreSave(HibernateSession hibernateSession) before a save (insert) occursvoidonPreUpdate(HibernateSession hibernateSession) before an update occursvoidsave or update this objectvoidsetContextId(String contextId) set context idvoidsetCreatedOn(Timestamp createdOn1) when createdvoidsetCreatedOnDb(Long createdOn1) when createdvoidsetDepth(int depth) set depthvoidset idvoidsetIfHasRoleId(String memberRoleId) Set role id for the childvoidsetLastUpdated(Timestamp lastUpdated1) when last updatedvoidsetLastUpdatedDb(Long lastUpdated1) when last updatedvoidsetParentRoleSetId(String parentId1) for self, or immediate, just use this id.voidsetThenHasRoleId(String thenHasRoleId) Set role id for the thenvoidsetType(RoleHierarchyType type1) set group set assignment typevoidset group set assignment typevoidxmlCopyBusinessPropertiesToExisting(RoleSet existingRecord) copy business (non update) properties to an existing recordbooleansee if the non update cols are different (e.g.booleansee if the update cols are different (e.g.xmlGetId()set id key in dbretrieve from db by id or key.xmlSaveBusinessProperties(RoleSet existingRecord) save the business properties (not update properties)voidsave the udpate properties (e.g.voidset id key in dbxmlToExportRoleSet(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, onPostDelete, onPostSave, onPostUpdate, onSave, onUpdate, setHibernateVersionNumber
-
Field Details
-
TABLE_GROUPER_ROLE_SET
name of the groups role 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_DEPTH
column- See Also:
-
COLUMN_IF_HAS_ROLE_ID
column- See Also:
-
COLUMN_THEN_HAS_ROLE_ID
column- See Also:
-
COLUMN_PARENT_ROLE_SET_ID
column- See Also:
-
COLUMN_TYPE
column- 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_DEPTH
constant for field name for: depth- See Also:
-
FIELD_ID
constant for field name for: id- See Also:
-
FIELD_IF_HAS_ROLE_ID
constant for field name for: ifHasRoleId- See Also:
-
FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb- See Also:
-
FIELD_THEN_HAS_ROLE_ID
constant for field name for: thenHasRoleId- See Also:
-
FIELD_PARENT_ROLE_SET_ID
constant for field name for: parentRoleSetId- See Also:
-
FIELD_TYPE
constant for field name for: type- See Also:
-
-
Constructor Details
-
RoleSet
public RoleSet()
-
-
Method Details
-
onPreSave
Description copied from interface:HibGrouperLifecyclebefore a save (insert) occurs- Specified by:
onPreSavein interfaceHibGrouperLifecycle- Overrides:
onPreSavein classGrouperAPI- See Also:
-
onPreDelete
Description copied from interface:HibGrouperLifecyclebefore a delete (insert) occurs- Specified by:
onPreDeletein interfaceHibGrouperLifecycle- Overrides:
onPreDeletein classGrouperAPI- See Also:
-
onPreUpdate
Description copied from interface:HibGrouperLifecyclebefore an update occurs- Specified by:
onPreUpdatein interfaceHibGrouperLifecycle- Overrides:
onPreUpdatein classGrouperAPI- See Also:
-
findInCollection
public static RoleSet findInCollection(Collection<RoleSet> roleSets, String ifHasId, String thenHasId, int depth, boolean exceptionIfNull) find role set, better be here- Parameters:
roleSets-ifHasId-thenHasId-depth- is the depth expectingexceptionIfNull-- Returns:
- the def name set
-
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:GrouperAPIdeep clone the fields in this object- Specified by:
clonein interfaceGrouperCloneable- Specified by:
clonein classGrouperAPI- Returns:
- the clone of the object
- See Also:
-
getParentRoleSet
- Returns:
- the parent group set or null if none
-
getIfHasRole
- Returns:
- the parent group set or null if none
-
getThenHasRole
- Returns:
- the parent group set or null if none
-
getId
- Returns:
- id
-
setId
set id- Parameters:
id-
-
setContextId
set context id- Specified by:
setContextIdin interfaceGrouperHasContext- Parameters:
contextId-
-
getParentRoleSetId
for self, or immediate, just use this id. for effective, this is the first hop on the directed graph to get to this membership.- Returns:
- parent id
-
setParentRoleSetId
for self, or immediate, just use this id. for effective, this is the first hop on the directed graph to get to this membership.- Parameters:
parentId1-
-
getThenHasRoleId
- Returns:
- role id for then
-
setThenHasRoleId
Set role id for the then- Parameters:
thenHasRoleId-
-
getIfHasRoleId
- Returns:
- member role id for the child
-
setIfHasRoleId
Set role id for the child- Parameters:
memberRoleId-
-
getType
- Returns:
- membership type (immediate, effective, or composite)
-
getTypeDb
get string value of type for hibernate- Returns:
- type
-
setType
set group set assignment type- Parameters:
type1-
-
setTypeDb
set group set assignment type- Parameters:
type1-
-
getDepth
public int getDepth()- Returns:
- depth
-
setDepth
public void setDepth(int depth) set depth- Parameters:
depth-
-
getContextId
context id of the transaction- Returns:
- context id
-
getCreatedOn
when created- Returns:
- timestamp
-
getCreatedOnDb
when created- Returns:
- timestamp
-
getLastUpdated
when last updated- Returns:
- timestamp
-
getLastUpdatedDb
when last updated- Returns:
- timestamp
-
saveOrUpdate
public void saveOrUpdate()save or update this object- Specified by:
saveOrUpdatein interfaceGrouperSet
-
delete
public void delete()save or update this object- Specified by:
deletein interfaceGrouperSet
-
setCreatedOnDb
when created- Parameters:
createdOn1-
-
setCreatedOn
when created- Parameters:
createdOn1-
-
setLastUpdated
when last updated- Parameters:
lastUpdated1-
-
setLastUpdatedDb
when last updated- Parameters:
lastUpdated1-
-
__getId
Description copied from interface:GrouperSetif of this object- Specified by:
__getIdin interfaceGrouperSet- Returns:
- id
- See Also:
-
__getIfHasElementId
Description copied from interface:GrouperSetif has this element id then has another element id- Specified by:
__getIfHasElementIdin interfaceGrouperSet- Returns:
- id
- See Also:
-
__getThenHasElementId
Description copied from interface:GrouperSethas this element Id if it has another id- Specified by:
__getThenHasElementIdin interfaceGrouperSet- Returns:
- id
- See Also:
-
__getDepth
public int __getDepth()Description copied from interface:GrouperSetdepth of this relationship (0 means self, 1 means one hop, 2 means 2 hops, etc)- Specified by:
__getDepthin interfaceGrouperSet- Returns:
- depth
- See Also:
-
__getIfHasElement
Description copied from interface:GrouperSetif has this element then has another element- Specified by:
__getIfHasElementin interfaceGrouperSet- Returns:
- id
- See Also:
-
__getThenHasElement
Description copied from interface:GrouperSethas this element if it has another- Specified by:
__getThenHasElementin interfaceGrouperSet- Returns:
- id
- See Also:
-
__setParentGrouperSetId
Description copied from interface:GrouperSetset the parent id of this set. the parent is the relationship leading up to this relationship. e.g. if this is the graph: A->B->C, and the relationship is A->C, then the parent is A->B- Specified by:
__setParentGrouperSetIdin interfaceGrouperSet- See Also:
-
__getParentGrouperSet
Description copied from interface:GrouperSetget the parent set the parent is the relationship leading up to this relationship. e.g. if this is the graph: A->B->C, and the relationship is A->C, then the parent is A->B- Specified by:
__getParentGrouperSetin interfaceGrouperSet- Returns:
- parent
- See Also:
-
__getParentGrouperSetId
Description copied from interface:GrouperSetparent set id- Specified by:
__getParentGrouperSetIdin interfaceGrouperSet- Returns:
- parent set id
- See Also:
-
xmlCopyBusinessPropertiesToExisting
Description copied from interface:XmlImportableBasecopy business (non update) properties to an existing record- Specified by:
xmlCopyBusinessPropertiesToExistingin interfaceXmlImportableBase<RoleSet>- See Also:
-
xmlDifferentBusinessProperties
Description copied from interface:XmlImportableBasesee if the non update cols are different (e.g. name)- Specified by:
xmlDifferentBusinessPropertiesin interfaceXmlImportableBase<RoleSet>- 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<RoleSet>- Parameters:
other- the one to compare with- Returns:
- true if so
- See Also:
-
xmlRetrieveByIdOrKey
Description copied from interface:XmlImportableretrieve from db by id or key. throws exception if duplicate- Specified by:
xmlRetrieveByIdOrKeyin interfaceXmlImportable<RoleSet>- Returns:
- the object or null if not found
- See Also:
-
xmlSaveBusinessProperties
Description copied from interface:XmlImportableBasesave the business properties (not update properties)- Specified by:
xmlSaveBusinessPropertiesin interfaceXmlImportableBase<RoleSet>- 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<RoleSet>- See Also:
-
xmlToExportRoleSet
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<RoleSet>- Returns:
- id
- See Also:
-
xmlSetId
Description copied from interface:XmlImportableBaseset id key in db- Specified by:
xmlSetIdin interfaceXmlImportableBase<RoleSet>- See Also:
-
xmlToString
Description copied from interface:XmlImportableBaseconvert to string for log- Specified by:
xmlToStringin interfaceXmlImportableBase<RoleSet>- Returns:
- the string value for log
- 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:
-