edu.internet2.middleware.grouper.stem
Class StemSet

java.lang.Object
  extended by edu.internet2.middleware.grouper.GrouperAPI
      extended by edu.internet2.middleware.grouper.stem.StemSet
All Implemented Interfaces:
GrouperSet, HibGrouperLifecycle, Hib3GrouperVersioned, GrouperCloneable, GrouperUtil.FieldValuable, Serializable, org.hibernate.classic.Lifecycle

public class StemSet
extends GrouperAPI
implements Hib3GrouperVersioned, GrouperSet

Author:
shilen $Id$
See Also:
Serialized Form

Field Summary
static String COLUMN_CONTEXT_ID
          column
static String COLUMN_CREATED_ON
          column
static String COLUMN_DEPTH
          column
static String COLUMN_ID
          column
static String COLUMN_IF_HAS_STEM_ID
          column
static String COLUMN_LAST_UPDATED
          column
static String COLUMN_PARENT_STEM_SET_ID
          column
static String COLUMN_THEN_HAS_STEM_ID
          column
static String COLUMN_TYPE
          column
static String FIELD_CONTEXT_ID
          constant for field name for: contextId
static String FIELD_CREATED_ON_DB
          constant for field name for: createdOnDb
static String FIELD_DEPTH
          constant for field name for: depth
static String FIELD_ID
          constant for field name for: id
static String FIELD_IF_HAS_STEM_ID
          constant for field name for: ifHasStemId
static String FIELD_LAST_UPDATED_DB
          constant for field name for: lastUpdatedDb
static String FIELD_PARENT_STEM_SET_ID
          constant for field name for: parentStemSetId
static String FIELD_THEN_HAS_STEM_ID
          constant for field name for: thenHasStemId
static String FIELD_TYPE
          constant for field name for: type
static String TABLE_GROUPER_STEM_SET
          name of the stem set table
 
Fields inherited from class edu.internet2.middleware.grouper.GrouperAPI
COLUMN_HIBERNATE_VERSION_NUMBER, FIELD_DB_VERSION, FIELD_HIBERNATE_VERSION_NUMBER, INITIAL_VERSION_NUMBER
 
Fields inherited from interface org.hibernate.classic.Lifecycle
NO_VETO, VETO
 
Constructor Summary
StemSet()
           
 
Method Summary
 int __getDepth()
          depth of this relationship (0 means self, 1 means one hop, 2 means 2 hops, etc)
 String __getId()
          if of this object
 GrouperSetElement __getIfHasElement()
          if has this element then has another element
 String __getIfHasElementId()
          if has this element id then has another element id
 GrouperSet __getParentGrouperSet()
          get the parent set the parent is the relationship leading up to this relationship.
 String __getParentGrouperSetId()
          parent set id
 GrouperSetElement __getThenHasElement()
          has this element if it has another
 String __getThenHasElementId()
          has this element Id if it has another id
 void __setParentGrouperSetId(String grouperSetId)
          set the parent id of this set.
 GrouperAPI clone()
          deep clone the fields in this object
 StemSet dbVersion()
          save the state when retrieving from DB
 Set<String> dbVersionDifferentFields()
          see which fields have changed compared to the DB state (last known) note that attributes will print out: attribute__attributeName
 void dbVersionReset()
          take a snapshot of the data since this is what is in the db
 void delete()
          delete this object
 boolean equals(Object other)
           
static StemSet findInCollection(Collection<StemSet> stemSets, String ifHasId, String thenHasId, int depth, boolean exceptionIfNull)
          find a stem set, better be here
 String getContextId()
          context id of the transaction
 Timestamp getCreatedOn()
          when created
 Long getCreatedOnDb()
          when created
 int getDepth()
           
 String getId()
           
 Stem getIfHasStem()
           
 String getIfHasStemId()
           
 Timestamp getLastUpdated()
          when last updated
 Long getLastUpdatedDb()
          when last updated
 StemSet getParentStemSet()
           
 String getParentStemSetId()
           
 Stem getThenHasStem()
           
 String getThenHasStemId()
           
 StemHierarchyType getType()
           
 String getTypeDb()
          get string value of type for hibernate
 int hashCode()
           
 void onPreSave(HibernateSession hibernateSession)
          before a save (insert) occurs
 void onPreUpdate(HibernateSession hibernateSession)
          before an update occurs
 void saveOrUpdate()
          save or update this object
 void setContextId(String contextId)
          set context id
 void setCreatedOn(Timestamp createdOn1)
          when created
 void setCreatedOnDb(Long createdOn1)
          when created
 void setDepth(int depth)
          set depth
 void setId(String id)
          set id
 void setIfHasStemId(String stemId)
          Set stem id of the if has stem
 void setLastUpdated(Timestamp lastUpdated1)
          when last updated
 void setLastUpdatedDb(Long lastUpdated1)
          when last updated
 void setParentStemSetId(String parentId1)
           
 void setThenHasStemId(String stemId)
          Set stem id of the then has stem
 void setType(StemHierarchyType type1)
          set stem set assignment type
 void setTypeDb(String type1)
          set stem set assignment type
 String toString()
           
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersionClear, dbVersionIsDifferent, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onSave, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TABLE_GROUPER_STEM_SET

public static final String TABLE_GROUPER_STEM_SET
name of the stem set table

See Also:
Constant Field Values

COLUMN_CONTEXT_ID

public static final String COLUMN_CONTEXT_ID
column

See Also:
Constant Field Values

COLUMN_CREATED_ON

public static final String COLUMN_CREATED_ON
column

See Also:
Constant Field Values

COLUMN_LAST_UPDATED

public static final String COLUMN_LAST_UPDATED
column

See Also:
Constant Field Values

COLUMN_ID

public static final String COLUMN_ID
column

See Also:
Constant Field Values

COLUMN_DEPTH

public static final String COLUMN_DEPTH
column

See Also:
Constant Field Values

COLUMN_IF_HAS_STEM_ID

public static final String COLUMN_IF_HAS_STEM_ID
column

See Also:
Constant Field Values

COLUMN_THEN_HAS_STEM_ID

public static final String COLUMN_THEN_HAS_STEM_ID
column

See Also:
Constant Field Values

COLUMN_PARENT_STEM_SET_ID

public static final String COLUMN_PARENT_STEM_SET_ID
column

See Also:
Constant Field Values

COLUMN_TYPE

public static final String COLUMN_TYPE
column

See Also:
Constant Field Values

FIELD_CONTEXT_ID

public static final String FIELD_CONTEXT_ID
constant for field name for: contextId

See Also:
Constant Field Values

FIELD_CREATED_ON_DB

public static final String FIELD_CREATED_ON_DB
constant for field name for: createdOnDb

See Also:
Constant Field Values

FIELD_DEPTH

public static final String FIELD_DEPTH
constant for field name for: depth

See Also:
Constant Field Values

FIELD_ID

public static final String FIELD_ID
constant for field name for: id

See Also:
Constant Field Values

FIELD_IF_HAS_STEM_ID

public static final String FIELD_IF_HAS_STEM_ID
constant for field name for: ifHasStemId

See Also:
Constant Field Values

FIELD_LAST_UPDATED_DB

public static final String FIELD_LAST_UPDATED_DB
constant for field name for: lastUpdatedDb

See Also:
Constant Field Values

FIELD_PARENT_STEM_SET_ID

public static final String FIELD_PARENT_STEM_SET_ID
constant for field name for: parentStemSetId

See Also:
Constant Field Values

FIELD_THEN_HAS_STEM_ID

public static final String FIELD_THEN_HAS_STEM_ID
constant for field name for: thenHasStemId

See Also:
Constant Field Values

FIELD_TYPE

public static final String FIELD_TYPE
constant for field name for: type

See Also:
Constant Field Values
Constructor Detail

StemSet

public StemSet()
Method Detail

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.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 expecting
exceptionIfNull -
Returns:
the stem set

equals

public boolean equals(Object other)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

clone

public GrouperAPI clone()
Description copied from class: GrouperAPI
deep clone the fields in this object

Specified by:
clone in interface GrouperCloneable
Specified by:
clone in class GrouperAPI
Returns:
the clone of the object
See Also:
Object.clone()

getParentStemSet

public StemSet getParentStemSet()
Returns:
the parent stem set

getIfHasStem

public Stem getIfHasStem()
Returns:
the if has stem. An object in this stem is also in the thenHas stem.

getThenHasStem

public Stem getThenHasStem()
Returns:
the then has stem. An object in the ifHas stem is also in this stem.

getId

public String getId()
Returns:
id

setId

public void setId(String id)
set id

Parameters:
id -

setContextId

public void setContextId(String contextId)
set context id

Parameters:
contextId -

getParentStemSetId

public String getParentStemSetId()
Returns:
parent id

setParentStemSetId

public void setParentStemSetId(String parentId1)
Parameters:
parentId1 -

getThenHasStemId

public String getThenHasStemId()
Returns:
stem id of the then has stem

setThenHasStemId

public void setThenHasStemId(String stemId)
Set stem id of the then has stem

Parameters:
stemId -

getIfHasStemId

public String getIfHasStemId()
Returns:
stem id of the if has stem

setIfHasStemId

public void setIfHasStemId(String stemId)
Set stem id of the if has stem

Parameters:
stemId -

getType

public StemHierarchyType getType()
Returns:
membership type (immediate, effective, or self)

getTypeDb

public String getTypeDb()
get string value of type for hibernate

Returns:
type

setType

public void setType(StemHierarchyType type1)
set stem set assignment type

Parameters:
type1 -

setTypeDb

public void setTypeDb(String type1)
set stem set assignment type

Parameters:
type1 -

getDepth

public int getDepth()
Returns:
depth

setDepth

public void setDepth(int depth)
set depth

Parameters:
depth -

getContextId

public String getContextId()
context id of the transaction

Returns:
context id

getCreatedOn

public Timestamp getCreatedOn()
when created

Returns:
timestamp

getCreatedOnDb

public Long getCreatedOnDb()
when created

Returns:
timestamp

getLastUpdated

public Timestamp getLastUpdated()
when last updated

Returns:
timestamp

getLastUpdatedDb

public Long getLastUpdatedDb()
when last updated

Returns:
timestamp

saveOrUpdate

public void saveOrUpdate()
save or update this object

Specified by:
saveOrUpdate in interface GrouperSet

delete

public void delete()
delete this object

Specified by:
delete in interface GrouperSet

setCreatedOnDb

public void setCreatedOnDb(Long createdOn1)
when created

Parameters:
createdOn1 -

setCreatedOn

public void setCreatedOn(Timestamp createdOn1)
when created

Parameters:
createdOn1 -

setLastUpdated

public void setLastUpdated(Timestamp lastUpdated1)
when last updated

Parameters:
lastUpdated1 -

setLastUpdatedDb

public void setLastUpdatedDb(Long lastUpdated1)
when last updated

Parameters:
lastUpdated1 -

__getId

public String __getId()
Description copied from interface: GrouperSet
if of this object

Specified by:
__getId in interface GrouperSet
Returns:
id
See Also:
GrouperSet.__getId()

__getIfHasElementId

public String __getIfHasElementId()
Description copied from interface: GrouperSet
if has this element id then has another element id

Specified by:
__getIfHasElementId in interface GrouperSet
Returns:
id
See Also:
GrouperSet.__getIfHasElementId()

__getThenHasElementId

public String __getThenHasElementId()
Description copied from interface: GrouperSet
has this element Id if it has another id

Specified by:
__getThenHasElementId in interface GrouperSet
Returns:
id
See Also:
GrouperSet.__getThenHasElementId()

__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 interface GrouperSet
Returns:
depth
See Also:
GrouperSet.__getDepth()

__getIfHasElement

public GrouperSetElement __getIfHasElement()
Description copied from interface: GrouperSet
if has this element then has another element

Specified by:
__getIfHasElement in interface GrouperSet
Returns:
id
See Also:
GrouperSet.__getIfHasElement()

__getThenHasElement

public GrouperSetElement __getThenHasElement()
Description copied from interface: GrouperSet
has this element if it has another

Specified by:
__getThenHasElement in interface GrouperSet
Returns:
id
See Also:
GrouperSet.__getThenHasElement()

__setParentGrouperSetId

public void __setParentGrouperSetId(String grouperSetId)
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 interface GrouperSet
See Also:
GrouperSet.__setParentGrouperSetId(java.lang.String)

__getParentGrouperSet

public GrouperSet __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 interface GrouperSet
Returns:
parent
See Also:
GrouperSet.__getParentGrouperSet()

__getParentGrouperSetId

public String __getParentGrouperSetId()
Description copied from interface: GrouperSet
parent set id

Specified by:
__getParentGrouperSetId in interface GrouperSet
Returns:
parent set id
See Also:
GrouperSet.__getParentGrouperSetId()

onPreSave

public void onPreSave(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
before a save (insert) occurs

Specified by:
onPreSave in interface HibGrouperLifecycle
Overrides:
onPreSave in class GrouperAPI
See Also:
GrouperAPI.onPreSave(HibernateSession)

onPreUpdate

public void onPreUpdate(HibernateSession hibernateSession)
Description copied from interface: HibGrouperLifecycle
before an update occurs

Specified by:
onPreUpdate in interface HibGrouperLifecycle
Overrides:
onPreUpdate in class GrouperAPI
See Also:
GrouperAPI.onPreUpdate(HibernateSession)

dbVersion

public StemSet dbVersion()
save the state when retrieving from DB

Overrides:
dbVersion in class GrouperAPI
Returns:
the dbVersion

dbVersionReset

public void dbVersionReset()
take a snapshot of the data since this is what is in the db

Overrides:
dbVersionReset in class GrouperAPI

dbVersionDifferentFields

public Set<String> 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 class GrouperAPI
Returns:
a set of attributes changed, or empty set if none
See Also:
GrouperAPI.dbVersionDifferentFields()