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, java.io.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 java.lang.String COLUMN_OLD_FIELD_ID
          column field_id col in db
static java.lang.String COLUMN_OLD_FIELD_NAME
          column field_name col in db
static java.lang.String COLUMN_OLDER_FIELD_NAME
          column old_field_name col in db
static java.lang.String FIELD_CONTEXT_ID
          constant for field name for: contextId
static java.lang.String FIELD_GROUP
          constant for field name for: group
static java.lang.String FIELD_GROUP_UUID
          constant for field name for: groupUUID
static java.lang.String FIELD_ID
          constant for field name for: id
static java.lang.String FIELD_VALUE
          constant for field name for: value
static java.lang.String PROPERTY_GROUP_UUID
          constant for field name for: groupUUID
static java.lang.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(java.lang.String groupUUID1, Group group1)
           
 Attribute clone()
          deep clone the fields in this object
 void delete()
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getAttrName()
           
 java.lang.String getContextId()
          context id of the transaction
 java.lang.String getGroupUuid()
           
 java.lang.String getId()
           
 java.lang.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(java.lang.String contextId1)
          context id of the transaction
 void setGroupUuid(java.lang.String groupUUID1)
           
 void setId(java.lang.String id)
           
 void setValue(java.lang.String value)
           
 java.lang.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 java.lang.String FIELD_CONTEXT_ID
constant for field name for: contextId

See Also:
Constant Field Values

FIELD_GROUP

public static final java.lang.String FIELD_GROUP
constant for field name for: group

See Also:
Constant Field Values

FIELD_GROUP_UUID

public static final java.lang.String FIELD_GROUP_UUID
constant for field name for: groupUUID

See Also:
Constant Field Values

FIELD_ID

public static final java.lang.String FIELD_ID
constant for field name for: id

See Also:
Constant Field Values

FIELD_VALUE

public static final java.lang.String FIELD_VALUE
constant for field name for: value

See Also:
Constant Field Values

PROPERTY_GROUP_UUID

public static final java.lang.String PROPERTY_GROUP_UUID
constant for field name for: groupUUID

See Also:
Constant Field Values

TABLE_OLD_GROUPER_ATTRIBUTES

public static final java.lang.String TABLE_OLD_GROUPER_ATTRIBUTES
See Also:
Constant Field Values

COLUMN_OLD_FIELD_ID

public static final java.lang.String COLUMN_OLD_FIELD_ID
column field_id col in db

See Also:
Constant Field Values

COLUMN_OLD_FIELD_NAME

public static final java.lang.String COLUMN_OLD_FIELD_NAME
column field_name col in db

See Also:
Constant Field Values

COLUMN_OLDER_FIELD_NAME

public static final java.lang.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(java.lang.String groupUUID1,
                            Group group1)
Parameters:
groupUUID1 -
group1 -

equals

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

hashCode

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

toString

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

getAttrName

public java.lang.String getAttrName()
Returns:
attr name

internal_getGroupType

public GroupType internal_getGroupType()
Returns:
group type

getGroupUuid

public java.lang.String getGroupUuid()
Returns:
group uuid

getId

public java.lang.String getId()
Returns:
id

getValue

public java.lang.String getValue()
Returns:
value

setGroupUuid

public void setGroupUuid(java.lang.String groupUUID1)
Parameters:
groupUUID1 -

setId

public void setId(java.lang.String id)
Parameters:
id -

setValue

public void setValue(java.lang.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 java.lang.String getContextId()
context id of the transaction

Returns:
context id

setContextId

public void setContextId(java.lang.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