org.sadun.util
Class SimpleObjectWithIdMetadata

java.lang.Object
  extended byorg.sadun.util.SimpleObjectWithIdMetadata
All Implemented Interfaces:
ObjectWithIdMetadata, java.io.Serializable

public class SimpleObjectWithIdMetadata
extends java.lang.Object
implements ObjectWithIdMetadata, java.io.Serializable

Author:
Cristiano Sadun
See Also:
Serialized Form

Constructor Summary
SimpleObjectWithIdMetadata(java.lang.Class type)
           
SimpleObjectWithIdMetadata(java.lang.Class type, java.lang.String idPrefix)
           
 
Method Summary
 java.lang.String getIdPrefix()
          Return the id prefix for an object.
 java.lang.Class getType()
          Return the concrete class of the object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleObjectWithIdMetadata

public SimpleObjectWithIdMetadata(java.lang.Class type,
                                  java.lang.String idPrefix)

SimpleObjectWithIdMetadata

public SimpleObjectWithIdMetadata(java.lang.Class type)
Method Detail

getIdPrefix

public java.lang.String getIdPrefix()
Description copied from interface: ObjectWithIdMetadata
Return the id prefix for an object.

Typically, each object class has a class-dependent id prefix. An implementation may use the id prefix to veridy that a certain object has a proper id.

Specified by:
getIdPrefix in interface ObjectWithIdMetadata
Returns:
the id prefix for an object.

getType

public java.lang.Class getType()
Description copied from interface: ObjectWithIdMetadata
Return the concrete class of the object.

Specified by:
getType in interface ObjectWithIdMetadata
Returns:
the concrete class of the object.

toString

public java.lang.String toString()