edu.vt.middleware.ed
Class AbstractDataRelation<T extends DirectoryObject,V extends DirectoryObject>

java.lang.Object
  extended by edu.vt.middleware.ed.AbstractDataRelation<T,V>
Type Parameters:
T - The owning type.
V - The dependent type.
All Implemented Interfaces:
DataObject, DataRelation<T,V>, Serializable
Direct Known Subclasses:
AbstractGroupRelation, EntitlementPersonRelation, EntitlementServiceRelation, PersonPersonRelation, ServicePersonRelation

public abstract class AbstractDataRelation<T extends DirectoryObject,V extends DirectoryObject>
extends Object
implements DataRelation<T,V>, Serializable

Abstract base class of all concrete DataRelation instances.

Version:
$Revision: 7971 $
Author:
Marvin S. Addison
See Also:
Serialized Form

Field Summary
protected  String createdBy
          Relation creator name/identifier
protected  Calendar creationDate
          Relation creation date
protected  V dependent
          Dependent side of relationship
protected  Calendar expirationDate
          Relation expiration date
protected  T owner
          Owning side of relationship
protected  RoleType roleType
          Relation role type
private static long serialVersionUID
          Serialization version marker
protected  Long uid
          Unique identifier
 
Constructor Summary
AbstractDataRelation()
           
 
Method Summary
 int compareTo(DataRelation other)
          Sorts relations by the underlying role type codes.
 String getCreatedBy()
          This returns the created by.
 Calendar getCreationDate()
          This returns the creation date.
 Calendar getExpirationDate()
          Gets the expiration date on the relationship.
 V getRelation()
          Gets the relation object.
 T getRelationship()
          Gets the relationship object.
 RoleType getRoleType()
          Gets the role on the relationship.
 void setCreatedBy(String s)
          This sets the created by.
 void setCreationDate(Calendar created)
          This sets the creation date.
 void setExpirationDate(Calendar expires)
          Sets the expiration date on the relationship.
 void setRelation(V o)
          Sets the relation object.
 void setRelationship(T o)
          Sets the relationship object.
 void setRoleType(RoleType role)
          Sets the role on the relationship.
 void setUid(Long l)
          Sets the unique identifier for this class.
 String toString()
          Returns a String representation of this data relation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.vt.middleware.ed.DataObject
getUid
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serialization version marker

See Also:
Constant Field Values

uid

protected Long uid
Unique identifier


owner

protected T extends DirectoryObject owner
Owning side of relationship


dependent

protected V extends DirectoryObject dependent
Dependent side of relationship


creationDate

protected Calendar creationDate
Relation creation date


createdBy

protected String createdBy
Relation creator name/identifier


expirationDate

protected Calendar expirationDate
Relation expiration date


roleType

protected RoleType roleType
Relation role type

Constructor Detail

AbstractDataRelation

public AbstractDataRelation()
Method Detail

setUid

public void setUid(Long l)
Sets the unique identifier for this class.

Specified by:
setUid in interface DataObject
Parameters:
l - Unique identifier.

getRelation

public V getRelation()
Gets the relation object.

Specified by:
getRelation in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Returns:
Relation.

setRelation

public void setRelation(V o)
Sets the relation object.

Specified by:
setRelation in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Parameters:
o - Relation.

getRelationship

public T getRelationship()
Gets the relationship object.

Specified by:
getRelationship in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Returns:
Relationship.

setRelationship

public void setRelationship(T o)
Sets the relationship object.

Specified by:
setRelationship in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Parameters:
o - Relationship.

getCreationDate

public Calendar getCreationDate()
This returns the creation date.

Specified by:
getCreationDate in interface DataObject
Returns:
Calendar

setCreationDate

public void setCreationDate(Calendar created)
This sets the creation date.

Specified by:
setCreationDate in interface DataObject
Parameters:
created - Calendar

getCreatedBy

public String getCreatedBy()
This returns the created by.

Specified by:
getCreatedBy in interface DataObject
Returns:
String

setCreatedBy

public void setCreatedBy(String s)
This sets the created by.

Specified by:
setCreatedBy in interface DataObject
Parameters:
s - String

getExpirationDate

public Calendar getExpirationDate()
Gets the expiration date on the relationship.

Specified by:
getExpirationDate in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Returns:
Relationship expiration date.

setExpirationDate

public void setExpirationDate(Calendar expires)
Sets the expiration date on the relationship.

Specified by:
setExpirationDate in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Parameters:
expires - Relationship expiration date.

getRoleType

public RoleType getRoleType()
Gets the role on the relationship.

Specified by:
getRoleType in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Returns:
Relationship role.

setRoleType

public void setRoleType(RoleType role)
Sets the role on the relationship.

Specified by:
setRoleType in interface DataRelation<T extends DirectoryObject,V extends DirectoryObject>
Parameters:
role - Relationship role.

compareTo

public int compareTo(DataRelation other)
Sorts relations by the underlying role type codes.

Parameters:
other - Relation to compare with this one.
Returns:
A negative integer, 0, or positive integer depending on whether the role type code of the given relation is less than, equal to, or greater than that of this object.

toString

public String toString()
Returns a String representation of this data relation.

Overrides:
toString in class Object
Returns:
String


Copyright © 2008 Virginia Tech. All Rights Reserved.