Class StemSet
java.lang.Object
edu.internet2.middleware.grouper.GrouperAPI
edu.internet2.middleware.grouper.stem.StemSet
- All Implemented Interfaces:
GrouperSet
,HibGrouperLifecycle
,Hib3GrouperVersioned
,GrouperCloneable
,GrouperUtil.FieldValuable
,Serializable
,org.hibernate.classic.Lifecycle
- See Also:
-
Field Summary
FieldsModifier 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: contextIdstatic final String
constant for field name for: createdOnDbstatic final String
constant for field name for: depthstatic final String
constant for field name for: idstatic final String
constant for field name for: ifHasStemIdstatic final String
constant for field name for: lastUpdatedDbstatic final String
constant for field name for: parentStemSetIdstatic final String
constant for field name for: thenHasStemIdstatic final String
constant for field name for: typestatic final String
name of the stem set tableFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
depth 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__attributeNamevoid
take a snapshot of the data since this is what is in the dbvoid
delete()
delete this objectboolean
static StemSet
findInCollection
(Collection<StemSet> stemSets, String ifHasId, String thenHasId, int depth, boolean exceptionIfNull) find a stem set, better be herecontext id of the transactionwhen createdwhen createdint
getDepth()
getId()
when last updatedwhen last updatedgetType()
get string value of type for hibernateint
hashCode()
void
onPreSave
(HibernateSession hibernateSession) before a save (insert) occursvoid
onPreUpdate
(HibernateSession hibernateSession) before an update occursvoid
save or update this objectvoid
setContextId
(String contextId) set context idvoid
setCreatedOn
(Timestamp createdOn1) when createdvoid
setCreatedOnDb
(Long createdOn1) when createdvoid
setDepth
(int depth) set depthvoid
set idvoid
setIfHasStemId
(String stemId) Set stem id of the if has stemvoid
setLastUpdated
(Timestamp lastUpdated1) when last updatedvoid
setLastUpdatedDb
(Long lastUpdated1) when last updatedvoid
setParentStemSetId
(String parentId1) void
setThenHasStemId
(String stemId) Set stem id of the then has stemvoid
setType
(StemHierarchyType type1) set stem set assignment typevoid
set stem set assignment typetoString()
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onSave, onUpdate, setHibernateVersionNumber
-
Field Details
-
TABLE_GROUPER_STEM_SET
name of the stem set table- 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_STEM_ID
column- See Also:
-
COLUMN_THEN_HAS_STEM_ID
column- See Also:
-
COLUMN_PARENT_STEM_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_STEM_ID
constant for field name for: ifHasStemId- See Also:
-
FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb- See Also:
-
FIELD_PARENT_STEM_SET_ID
constant for field name for: parentStemSetId- See Also:
-
FIELD_THEN_HAS_STEM_ID
constant for field name for: thenHasStemId- See Also:
-
FIELD_TYPE
constant for field name for: type- See Also:
-
-
Constructor Details
-
StemSet
public StemSet()
-
-
Method Details
-
toString
-
findInCollection
public static StemSet findInCollection(Collection<StemSet> stemSets, String ifHasId, String thenHasId, int depth, boolean exceptionIfNull) find a stem set, better be here- Parameters:
stemSets
-ifHasId
-thenHasId
-depth
- is the depth expectingexceptionIfNull
-- Returns:
- the stem set
-
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:GrouperAPI
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:
-
getParentStemSet
- Returns:
- the parent stem set
-
getIfHasStem
- Returns:
- the if has stem. An object in this stem is also in the thenHas stem.
-
getThenHasStem
- Returns:
- the then has stem. An object in the ifHas stem is also in this stem.
-
getId
- Returns:
- id
-
setId
set id- Parameters:
id
-
-
setContextId
set context id- Parameters:
contextId
-
-
getParentStemSetId
- Returns:
- parent id
-
setParentStemSetId
- Parameters:
parentId1
-
-
getThenHasStemId
- Returns:
- stem id of the then has stem
-
setThenHasStemId
Set stem id of the then has stem- Parameters:
stemId
-
-
getIfHasStemId
- Returns:
- stem id of the if has stem
-
setIfHasStemId
Set stem id of the if has stem- Parameters:
stemId
-
-
getType
- Returns:
- membership type (immediate, effective, or self)
-
getTypeDb
get string value of type for hibernate- Returns:
- type
-
setType
set stem set assignment type- Parameters:
type1
-
-
setTypeDb
set stem 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:
saveOrUpdate
in interfaceGrouperSet
-
delete
public void delete()delete this object- Specified by:
delete
in 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:GrouperSet
if of this object- Specified by:
__getId
in interfaceGrouperSet
- Returns:
- id
- See Also:
-
__getIfHasElementId
Description copied from interface:GrouperSet
if has this element id then has another element id- Specified by:
__getIfHasElementId
in interfaceGrouperSet
- Returns:
- id
- See Also:
-
__getThenHasElementId
Description copied from interface:GrouperSet
has this element Id if it has another id- Specified by:
__getThenHasElementId
in interfaceGrouperSet
- Returns:
- id
- See Also:
-
__getDepth
public int __getDepth()Description copied from interface:GrouperSet
depth of this relationship (0 means self, 1 means one hop, 2 means 2 hops, etc)- Specified by:
__getDepth
in interfaceGrouperSet
- Returns:
- depth
- See Also:
-
__getIfHasElement
Description copied from interface:GrouperSet
if has this element then has another element- Specified by:
__getIfHasElement
in interfaceGrouperSet
- Returns:
- id
- See Also:
-
__getThenHasElement
Description copied from interface:GrouperSet
has this element if it has another- Specified by:
__getThenHasElement
in interfaceGrouperSet
- Returns:
- id
- See Also:
-
__setParentGrouperSetId
Description copied from interface:GrouperSet
set 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:
__setParentGrouperSetId
in interfaceGrouperSet
- See Also:
-
__getParentGrouperSet
Description copied from interface:GrouperSet
get 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:
__getParentGrouperSet
in interfaceGrouperSet
- Returns:
- parent
- See Also:
-
__getParentGrouperSetId
Description copied from interface:GrouperSet
parent set id- Specified by:
__getParentGrouperSetId
in interfaceGrouperSet
- Returns:
- parent set id
- 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:
-