jgnash.engine
Class StoredObject

java.lang.Object
  extended by jgnash.engine.StoredObject
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Account, CommodityNode, Config, ExchangeRate, Reminder, Transaction, TrashObject

public abstract class StoredObject
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Abstract class for anything stored in the database that requires a unique id

Version:
$Id$
Author:
Craig Cavanaugh
See Also:
Serialized Form

Field Summary
private  boolean markedForRemoval
          Indicates object is marked for removal
private static long serialVersionUID
           
private  java.lang.String uuid
          database business key
 
Constructor Summary
StoredObject()
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
          Default equals override
 java.lang.String getUuid()
          Getter for the uuid.
 int hashCode()
          Override hashCode to use uuid
 boolean isMarkedForRemoval()
           
(package private)  void setMarkedForRemoval(boolean markedForRemoval)
           
private  void setUuid(java.lang.String uuid)
          Setter for the uuid.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

markedForRemoval

private boolean markedForRemoval
Indicates object is marked for removal


uuid

private java.lang.String uuid
database business key

Constructor Detail

StoredObject

public StoredObject()
Method Detail

getUuid

public final java.lang.String getUuid()
Getter for the uuid.

Returns:
uuid of the object

setUuid

private void setUuid(java.lang.String uuid)
Setter for the uuid. Used for reflection purposes only

Parameters:
uuid - uuid to assign the object

setMarkedForRemoval

void setMarkedForRemoval(boolean markedForRemoval)

isMarkedForRemoval

public boolean isMarkedForRemoval()

hashCode

public int hashCode()
Override hashCode to use uuid

Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Default equals override

Overrides:
equals in class java.lang.Object
Parameters:
o - object to compare
See Also:
Object.equals(java.lang.Object)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object