net.sf.oness.common.all
Class BaseObject

java.lang.Object
  extended bynet.sf.oness.common.all.BaseObject
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

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

Base class for objects, implementing toString, equals and hashCode using commons-lang.

Also implements swallow clone using commons-beanutils.

Note that there are security and performance constraints with this implementation, specifically they may fail under a security manager. Check commons-lang documentation for more info.

Version:
$Revision: 1.7 $
Author:
Carlos Sanchez
See Also:
Serialized Form

Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
BaseObject()
           
 
Method Summary
 java.lang.Object clone()
          Swallow cloning.
 boolean equals(java.lang.Object o)
          This method delegates to EqualsBuilder.reflectionEquals()
 int hashCode()
          This method delegates to HashCodeBuilder.reflectionHashCode()
 java.lang.String toString()
          This method delegates to ReflectionToStringBuilder.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final transient org.apache.commons.logging.Log log
Constructor Detail

BaseObject

public BaseObject()
Method Detail

toString

public java.lang.String toString()
This method delegates to ReflectionToStringBuilder.

See Also:
Object.toString(), ReflectionToStringBuilder, DateFormat.getDateTimeInstance()

equals

public boolean equals(java.lang.Object o)
This method delegates to EqualsBuilder.reflectionEquals()

See Also:
Object.equals(Object), EqualsBuilder.reflectionEquals(Object, Object)

hashCode

public int hashCode()
This method delegates to HashCodeBuilder.reflectionHashCode()

See Also:
Object.hashCode(), HashCodeBuilder.reflectionHashCode(Object)

clone

public java.lang.Object clone()
Swallow cloning. This method delegates to BeanUtils.cloneBean(). Returns null on any exception

See Also:
Object.clone(), BeanUtils.cloneBean(Object), PropertyUtils.copyProperties(Object, Object)


Copyright © 2003-2005 ONess Project. All Rights Reserved.