|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.metadata.runtime.model.BasicMetadataObject
public abstract class BasicMetadataObject
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 |
BasicMetadataObject(BasicVirtualDatabaseID virtualDBID)
Call constructor to instantiate a BasicVirtualDatabase runtime object by passing the BasicVirtualDatabaseID. |
protected |
BasicMetadataObject(MetadataID metadataID,
BasicVirtualDatabaseID virtualDBID)
Call constructor to instantiate a runtime object by passing the BasicRuntimeID that identifies the entity and the BasicVirtualDatabaseID that identifes the Virtual Database the object will be contained. |
Method Summary | |
---|---|
void |
addProperty(java.lang.String name,
java.lang.String value)
|
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 |
getAlias()
|
java.util.Properties |
getCurrentProperties()
|
java.lang.String |
getFullName()
Returns the full name for this instance of the object. |
MetadataID |
getID()
Get the ID for this metadata object. |
java.lang.String |
getName()
Returns the name for this instance of the object. |
java.lang.String |
getNameInSource()
|
java.lang.String |
getPath()
|
java.util.Properties |
getProperties()
returns the user defined properties for this metadata object. |
VirtualDatabaseID |
getVirtualDatabaseID()
returns the id for the Virtual Database for which this runtime object is contained within. |
int |
hashCode()
Overrides Object hashCode method. |
boolean |
hasNameInSource()
Returns whether the name-in-soure is defined for this element. |
protected void |
setID(MetadataID newID)
Sets the id for this objects |
void |
setProperties(java.util.Properties definedProperties)
|
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 BasicMetadataObject(BasicVirtualDatabaseID virtualDBID)
virtualDBID
- the VirtualDatabaseID for this object (may not be null).
java.lang.IllegalArgumentException
- if either the ID or data source ID is null.protected BasicMetadataObject(MetadataID metadataID, BasicVirtualDatabaseID virtualDBID)
metadataID
- the MetadataID for this object (may not be null).virtualDBID
- the VirtualDatabaseID for this object (may not be null).
java.lang.IllegalArgumentException
- if either the ID or data source ID is null.Method Detail |
---|
public VirtualDatabaseID getVirtualDatabaseID()
VirtualDatabaseID
.
getVirtualDatabaseID
in interface MetadataObject
public java.lang.String getNameInSource()
public boolean hasNameInSource()
public java.lang.String getAlias()
public java.lang.String getPath()
public java.util.Properties getProperties() throws VirtualDatabaseException
MetadataObject
getProperties
in interface MetadataObject
VirtualDatabaseException
public java.util.Properties getCurrentProperties()
public void setProperties(java.util.Properties definedProperties)
public MetadataID getID()
getID
in interface MetadataObject
public java.lang.String getName()
getName
in interface MetadataObject
getFullName
public java.lang.String getFullName()
getFullName
in interface MetadataObject
protected void setID(MetadataID newID)
newID
- is of type MetadataIDpublic 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 interface MetadataObject
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 MetadataObject
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 interface MetadataObject
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface MetadataObject
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if this object cannot be cloned (i.e., only objects in
Defaults
cannot be cloned.public void addProperty(java.lang.String name, java.lang.String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |