com.sas.hls.common
Class ObjectIdentity

java.lang.Object
  extended by com.sas.hls.common.ObjectIdentity
All Implemented Interfaces:
Identifiable, Serializable

public class ObjectIdentity
extends Object
implements Identifiable

ObjectIdentity uniquely identifies an object anywhere in the system. It is a combination of identifier and object type.

See Also:
Serialized Form

Constructor Summary
ObjectIdentity()
          Zero-arg constructor for an ObjectIdentity.
ObjectIdentity(String objectType, String identifier)
          Constructor for an ObjectIdentity taking the object type and identifier.
 
Method Summary
 boolean equals(Object obj)
          Indicate whether some other object is "equal to" this one.
 String getIdentifier()
          Get the identifier of the object this objectIdentity refers to.
 String getObjectType()
          Get the type of object this objectIdentity refers to.
 int hashCode()
          Return a hash code value for the object.
 void setIdentifier(String identifier)
          Set the identifier of this objectIdentity.
 void setObjectType(String objectType)
          Set the objectType of this objectIdentity.
 String toString()
          Return a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectIdentity

public ObjectIdentity()
Zero-arg constructor for an ObjectIdentity.


ObjectIdentity

public ObjectIdentity(String objectType,
                      String identifier)
Constructor for an ObjectIdentity taking the object type and identifier.

Parameters:
objectType - The type of object this objectIdentity refers to.
identifier - The identifier of the object this objectIdentity refers to.
Method Detail

getObjectType

public String getObjectType()
Get the type of object this objectIdentity refers to.

Specified by:
getObjectType in interface Identifiable
Returns:
The object type of the object this refers to.

getIdentifier

public String getIdentifier()
Get the identifier of the object this objectIdentity refers to.

Specified by:
getIdentifier in interface Identifiable
Returns:
The identifier of the object this refers to.

setIdentifier

public void setIdentifier(String identifier)
Set the identifier of this objectIdentity.

Parameters:
identifier - the identifier to set

setObjectType

public void setObjectType(String objectType)
Set the objectType of this objectIdentity.

Parameters:
objectType - the objectType to set

equals

public boolean equals(Object obj)
Indicate whether some other object is "equal to" this one.

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

hashCode

public int hashCode()
Return a hash code value for the object.

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

toString

public String toString()
Return a string representation of the object.

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


Copyright (c) 2014, SAS Institute Inc., Cary, NC, USA