com.ds.fw.types
Class FwUniqueObject

java.lang.Object
  |
  +--com.ds.fw.types.FwSimpleObject
        |
        +--com.ds.fw.types.FwUniqueObject
All Implemented Interfaces:
java.lang.Cloneable, FwCopyableIF, FwDisplayableIF, FwIdIF, FwSimpleObjectIF, FwUniqueObjectIF, java.io.Serializable

public class FwUniqueObject
extends FwSimpleObject
implements FwUniqueObjectIF

See Also:
Serialized Form

Field Summary
 java.lang.String _id
           
 
Constructor Summary
FwUniqueObject()
           
 
Method Summary
 java.lang.Object _getCopyWithSameId()
          PRIVATE
 void _installId()
          PRIVATE
 void _setId(java.lang.String s)
          PRIVATE
 boolean equals(java.lang.Object o)
          Compares this FwUniqueObject to the specified object
 java.lang.String getFirstUniqueId()
          For object that support the tracking of historical states, return a unique id that is consistent for all states.
 java.lang.String getId()
          Same as getUniqueId()
 java.lang.String getUniqueId()
          Return a string value that uniquely identifies this object.
 int hashCode()
           
 boolean hasId(java.lang.String s)
          Same as hasUniqueId(String).
 boolean hasUniqueId(java.lang.String s)
          Determine if my unique id matches some string.
 void postCopy()
          This should never be called directly from a client.
 
Methods inherited from class com.ds.fw.types.FwSimpleObject
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, printStackTrace, toString, toStringValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, toString, toStringValue
 

Field Detail

_id

public java.lang.String _id
Constructor Detail

FwUniqueObject

public FwUniqueObject()
Method Detail

getId

public java.lang.String getId()
Same as getUniqueId()

Specified by:
getId in interface FwIdIF
Returns:
a string value that identifies this object
See Also:
getUniqueId()

hasId

public boolean hasId(java.lang.String s)
Same as hasUniqueId(String).

Specified by:
hasId in interface FwIdIF
Parameters:
s - - the string we want to check for id
Returns:
true if the id for this object is the same as the given as parameter
See Also:
hasUniqueId(String)

_setId

public void _setId(java.lang.String s)
Description copied from interface: FwUniqueObjectIF
PRIVATE

Specified by:
_setId in interface FwUniqueObjectIF

_installId

public void _installId()
Description copied from interface: FwUniqueObjectIF
PRIVATE

Specified by:
_installId in interface FwUniqueObjectIF

getUniqueId

public java.lang.String getUniqueId()
Return a string value that uniquely identifies this object. This value is meant to roughly correspond to the usage of an oop.

Specified by:
getUniqueId in interface FwUniqueObjectIF
See Also:
getFirstUniqueId

getFirstUniqueId

public java.lang.String getFirstUniqueId()
For object that support the tracking of historical states, return a unique id that is consistent for all states. By default this returns the getUniqueId.

Specified by:
getFirstUniqueId in interface FwUniqueObjectIF
See Also:
getUniqueId, FwReservation

hasUniqueId

public boolean hasUniqueId(java.lang.String s)
Determine if my unique id matches some string.

Specified by:
hasUniqueId in interface FwUniqueObjectIF

postCopy

public void postCopy()
Description copied from interface: FwCopyableIF
This should never be called directly from a client. This method is used to make a clone independent from its original. Subclasses that override this method should always call super.postCopy().

Specified by:
postCopy in interface FwSimpleObjectIF
Overrides:
postCopy in class FwSimpleObject

_getCopyWithSameId

public java.lang.Object _getCopyWithSameId()
Description copied from interface: FwUniqueObjectIF
PRIVATE

Specified by:
_getCopyWithSameId in interface FwUniqueObjectIF

equals

public boolean equals(java.lang.Object o)
Compares this FwUniqueObject to the specified object

Overrides:
equals in class java.lang.Object
Parameters:
o - - the object to compare this FwUniqueObject against.
Returns:
true if they are equals , false - otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object