org.araneaframework.backend
Class BaseBean

java.lang.Object
  extended byorg.araneaframework.backend.BaseBean
All Implemented Interfaces:
Cloneable, Serializable

public abstract class BaseBean
extends Object
implements Serializable, Cloneable

Base class for value objects. Implements some general properties and methods.

Since:
1.4.1.20
Author:
Jevgeni Kabanov
See Also:
Serialized Form

Constructor Summary
protected BaseBean()
          Creates new instance of the GeneralVO.
 
Method Summary
 boolean addChange(String name)
          Marks field of the value object as changed eg this field was changed after loading it from the database.
 void changeAll()
          Changes all fields on this value object as changed.
 void clearChanges()
          Marks all fields as unchanged.
 Object clone()
          Overrides default clone() operation.
 boolean equals(Object otherVo)
          Compares Value Object for equality by their fields.
 Set getChanges()
          Getter for property changes.
 int hashCode()
          Implements hash using Value Object fields.
 String toString()
          Overrides default toString method.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseBean

protected BaseBean()
Creates new instance of the GeneralVO.

Method Detail

toString

public String toString()
Overrides default toString method.

Returns:
java.lang.String representation of this value object.

equals

public boolean equals(Object otherVo)
Compares Value Object for equality by their fields.

Parameters:
otherVo - Value Object to compare to.
Returns:
boolean- if Value Object are equal.

hashCode

public int hashCode()
Implements hash using Value Object fields.


clone

public Object clone()
Overrides default clone() operation.

Returns:
clone of this object.

getChanges

public Set getChanges()
Getter for property changes.

Returns:
Value of property changes.

addChange

public boolean addChange(String name)
Marks field of the value object as changed eg this field was changed after loading it from the database.

Useful when value objects are used for insert/update procedures written in PL/SQL instead of EJB methods.

Parameters:
name - name of the VO-s field which is being changed.
Returns:
true if such field does exist and was marked as chaned, false otherwise.

changeAll

public void changeAll()
Changes all fields on this value object as changed.


clearChanges

public void clearChanges()
Marks all fields as unchanged.