|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.data.AbstractIdentifiable
public abstract class AbstractIdentifiable
Base implementation of the Identifiable interface for POJO data
objects. Subclasses of this object should declare a variable of type
DataType that is public static final and
called "DATA_TYPE" in order for the local implementation of getDataType() to properly function.
| Constructor Summary | |
|---|---|
AbstractIdentifiable()
|
|
| Method Summary | |
|---|---|
DataType |
getDataType()
Returns the DataType identifier for this data object.
Since it is not possible for this implementation of getDataType to
know the DataType of a subclass, this method uses reflection to
dynamically look up a property named "DATA_TYPE". |
Id |
getId()
Returns the Id associated with this Identifiable object. |
void |
setId(Id id)
Sets the Id value for this Identifiable object. |
java.lang.String |
toString()
Returns the contents of this object as a line-feed separated list of name/ value pairs of this object's properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractIdentifiable()
| Method Detail |
|---|
public Id getId()
Id associated with this Identifiable object.
getId in interface IdentifiableId value for this Identifiable objectpublic void setId(Id id)
Id value for this Identifiable object.
setId in interface Identifiableid - an Id value to use for this Identifiable object
public DataType getDataType()
throws java.lang.RuntimeException
DataType identifier for this data object. Can be used
to uniquely identify the "type" of a data object.
Since it is not possible for this implementation of getDataType to
know the DataType of a subclass, this method uses reflection to
dynamically look up a property named "DATA_TYPE". As a result, any
subclass must declare this property (typically declared as public
static final DataType in order for this method to run successfully.
getDataType in interface IdentifiableDataType for current object
java.lang.RuntimeException - if it is unable to successfully determine the
data type of an implementing class.public java.lang.String toString()
This method uses bean-based property introspection to retrieve the set of
properties defined on the object. This includes all properties defined up
to and including the base AbstractIdentifiable class.
toString in class java.lang.ObjectString that represents the properties of this object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||