edu.internet2.middleware.grouper
Class Attribute

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

public class Attribute
extends GrouperAPI

Basic Hibernate Attribute DTO interface.

Since:
@HEAD@
Version:
$Id: Attribute.java,v 1.26 2009-04-13 16:53:08 mchyzer Exp $
Author:
blair christensen.
See Also:
Serialized Form

Field Summary
static String COLUMN_OLD_FIELD_ID
          column field_id col in db
static String COLUMN_OLD_FIELD_NAME
          column field_name col in db
static String COLUMN_OLDER_FIELD_NAME
          column old_field_name col in db
static String FIELD_CONTEXT_ID
          constant for field name for: contextId
static String FIELD_GROUP
          constant for field name for: group
static String FIELD_GROUP_UUID
          constant for field name for: groupUUID
static String FIELD_ID
          constant for field name for: id
static String FIELD_VALUE
          constant for field name for: value
static String PROPERTY_GROUP_UUID
          constant for field name for: groupUUID
static String TABLE_OLD_GROUPER_ATTRIBUTES
           
 
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
Attribute()
           
 
Method Summary
 void assignGroupUuid(String groupUUID1, Group group1)
           
 Attribute clone()
          deep clone the fields in this object
 void delete()
           
 boolean equals(Object other)
           
 String getAttrName()
           
 String getContextId()
          context id of the transaction
 String getGroupUuid()
           
 String getId()
           
 String getValue()
           
 int hashCode()
           
static Attribute internal_getAttribute(AttributeAssignValue value, Group group, boolean exceptionIfNotLegacyAttribute)
           
 AttributeAssignValue internal_getAttributeAssignValue()
           
 GroupType internal_getGroupType()
           
 void internal_setAttributeAssignValue(AttributeAssignValue attributeAssignValue1)
          used for caching
 Group retrieveGroup(boolean retrieveIfNull)
          try to get the current group if it is available (if this object is cloned, then it might be null)
 void setContextId(String contextId1)
          context id of the transaction
 void setGroupUuid(String groupUUID1)
           
 void setId(String id)
           
 void setValue(String value)
           
 String toString()
           
 
Methods inherited from class edu.internet2.middleware.grouper.GrouperAPI
dbVersion, dbVersionClear, dbVersionDifferentFields, dbVersionIsDifferent, dbVersionReset, fieldValue, getHibernateVersionNumber, onDelete, onLoad, onPostDelete, onPostSave, onPostUpdate, onPreDelete, onPreSave, onPreUpdate, onSave, onUpdate, setHibernateVersionNumber
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_CONTEXT_ID

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

See Also:
Constant Field Values

FIELD_GROUP

public static final String FIELD_GROUP
constant for field name for: group

See Also:
Constant Field Values

FIELD_GROUP_UUID

public static final String FIELD_GROUP_UUID
constant for field name for: groupUUID

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_VALUE

public static final String FIELD_VALUE
constant for field name for: value

See Also:
Constant Field Values

PROPERTY_GROUP_UUID

public static final String PROPERTY_GROUP_UUID
constant for field name for: groupUUID

See Also:
Constant Field Values

TABLE_OLD_GROUPER_ATTRIBUTES

public static final String TABLE_OLD_GROUPER_ATTRIBUTES
See Also:
Constant Field Values

COLUMN_OLD_FIELD_ID

public static final String COLUMN_OLD_FIELD_ID
column field_id col in db

See Also:
Constant Field Values

COLUMN_OLD_FIELD_NAME

public static final String COLUMN_OLD_FIELD_NAME
column field_name col in db

See Also:
Constant Field Values

COLUMN_OLDER_FIELD_NAME

public static final String COLUMN_OLDER_FIELD_NAME
column old_field_name col in db

See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute()
Method Detail

retrieveGroup

public Group retrieveGroup(boolean retrieveIfNull)
try to get the current group if it is available (if this object is cloned, then it might be null)

Parameters:
retrieveIfNull - true to get from DB if null
Returns:
the current group

assignGroupUuid

public void assignGroupUuid(String groupUUID1,
                            Group group1)
Parameters:
groupUUID1 -
group1 -

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()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getAttrName

public String getAttrName()
Returns:
attr name

internal_getGroupType

public GroupType internal_getGroupType()
Returns:
group type

getGroupUuid

public String getGroupUuid()
Returns:
group uuid

getId

public String getId()
Returns:
id

getValue

public String getValue()
Returns:
value

setGroupUuid

public void setGroupUuid(String groupUUID1)
Parameters:
groupUUID1 -

setId

public void setId(String id)
Parameters:
id -

setValue

public void setValue(String value)
Parameters:
value -

clone

public Attribute 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:
GrouperAPI.clone()

getContextId

public String getContextId()
context id of the transaction

Returns:
context id

setContextId

public void setContextId(String contextId1)
context id of the transaction

Parameters:
contextId1 -

delete

public void delete()

internal_setAttributeAssignValue

public void internal_setAttributeAssignValue(AttributeAssignValue attributeAssignValue1)
used for caching

Parameters:
attributeAssignValue1 -

internal_getAttributeAssignValue

public AttributeAssignValue internal_getAttributeAssignValue()
Returns:
attributeAssignValue

internal_getAttribute

public static Attribute internal_getAttribute(AttributeAssignValue value,
                                              Group group,
                                              boolean exceptionIfNotLegacyAttribute)
Parameters:
value -
group - this is optional if the group is known
exceptionIfNotLegacyAttribute -
Returns:
attribute