|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.namedobject.BasicObject
public abstract class BasicObject
This class represents the basic implementation of MetadataObject, which is the foundation for all classes that are used to capture metadata. This abstract class is immutable, although it is intended that subclasses are mutable. Additionally, although this class is thread safe, subclasses do not have to be thread safe, since the framework for update and modifying these objects must guarantee proper concurrent access.
These classes are shipped between the client and Metadata Service, so this class is serializable.
Also, the hashCode
, equals
and compareTo
methods are all consistent and optimized for
fast performance. This is in part accomplished by caching the hash code value
which identifies quickly that two objects are not equal.
This class and all of its subclasses are designed to be publicly immutable. That is, no component outside of the Configuration Service changes these objects once they are created.
Constructor Summary | |
---|---|
protected |
BasicObject(BaseID id)
Create a new instance with the specified ID. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Return a deep cloned instance of this object. |
int |
compareTo(java.lang.Object obj)
Compares this object to another. |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
java.lang.String |
getFullName()
Returns the full name for this instance of the object. |
BaseID |
getID()
Get the ID for this metadata object. |
java.lang.String |
getName()
Returns the name for this instance of the object. |
int |
hashCode()
Overrides Object hashCode method. |
protected void |
setID(BaseID newID)
Sets the id for this objects |
java.lang.String |
toString()
Returns a string representing the current state of the object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected BasicObject(BaseID id)
id
- the ID for this object (may not be null).
java.lang.IllegalArgumentException
- if either the ID or data source ID is null.Method Detail |
---|
public BaseID getID()
getID
in interface BaseObject
public java.lang.String getName()
getName
in interface BaseObject
getFullName
public java.lang.String getFullName()
getFullName
in interface BaseObject
protected void setID(BaseID newID)
newID
- is of type BaseIDpublic int hashCode()
This hash code must be consistent with the equals
method.
defined by subclasses.
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
compareTo()
.
equals
in class java.lang.Object
obj
- the object that this instance is to be compared to.
public int compareTo(java.lang.Object obj)
equals()
.
compareTo
in interface java.lang.Comparable
obj
- the object that this instance is to be compared to.
java.lang.IllegalArgumentException
- if the specified object reference is null
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this instance.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
BaseObject
clone
in interface BaseObject
clone
in class java.lang.Object
Defaults
cannot be cloned).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |