com.ds.fw.types
Class FwSimpleObject

java.lang.Object
  |
  +--com.ds.fw.types.FwSimpleObject
All Implemented Interfaces:
java.lang.Cloneable, FwCopyableIF, FwDisplayableIF, FwSimpleObjectIF, java.io.Serializable
Direct Known Subclasses:
FwAppContext, FwAssociation, FwBOBaseManager, FwBOBaseServer, FwBOContainer, FwBoolean, FwCatTree, FwCo, FwCoBaseBroker, FwCoBO, FwCoDataBase, FwCoFile, FwCoHandler, FwComponent, FwCoRole, FwCoServlet, FwCoTask, FwCoXMLParse, FwCurrency, FwDataBase, FwDate, FwDateInterval, FwDBBaseTable, FwDBFieldInfo, FwDBObject, FwDocument, FwDV, FwDVActions, FwDVActionsLink, FwDVBuildSearchQuery, FwDVListColumn, FwDVListDataBase, FwDVListRow, FwDVParams, FwDVProperties, FwDVProperty, FwDVSearchBreacket, FwDVSearchQueryElement, FwDVViewColumn, FwDVViewData, FwEntityBeanFactory, FwError, FwErrors, FwEventArgs, FwInteger, FwMenyItem, FwMoney, FwRequestContext, FwResponseContext, FwSessionContext, FwSessionPool, FwTime, FwTimestamp, FwUniqueObject, FwUserContext, FwUserPermition, FwUserRoles, FwValue

public class FwSimpleObject
extends java.lang.Object
implements FwSimpleObjectIF

I am meant to be used as a convenient superclass for classes that want to implement various simple interfaces. By subclassing off me the subclasses do not have to implement all the methods themselves. Future extension... It should generally be fine to implement additional interfaces at any time but some guidelines should be followed. Whatever classes are already implementing this interface should never require modification due to a change in this class - for example this class should NEVER be declared abstract. Also this class should never declare any instance variables or static methods.

See Also:
Serialized Form

Constructor Summary
FwSimpleObject()
           
 
Method Summary
 java.lang.String getClassName()
          This convenience method return the short class name.
 java.lang.Object getClone()
          Get a clone of this object.
 java.lang.Object getCopy()
          Get a copy of this object.
 java.lang.Object getCopy(java.lang.Object e)
          If the object implements FwCopyableIF then return e.getCopy().
 java.lang.Object getDeepCopy()
          Return a copy that is completely independent from the original.
 java.lang.String getDisplayString()
          If toStringValue is non-null then return it.
 java.lang.String getDisplayStringFor(java.lang.Object e)
          If the parameter implements FwDisplayableIF then return e.getDisplayString().
 void postCopy()
          This should never be called directly from a client.
 void printStackTrace()
           
 java.lang.String toString()
          toString is understood by all objects but is included in this interface for conceptual completeness and documentation.
 java.lang.String toStringValue()
          Get the string form of the object's value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FwSimpleObject

public FwSimpleObject()
Method Detail

getCopy

public java.lang.Object getCopy()
Description copied from interface: FwCopyableIF
Get a copy of this object. This may return a clone, a deep copy or some hybrid depending on the context of the object being copied.

Specified by:
getCopy in interface FwSimpleObjectIF

getCopy

public java.lang.Object getCopy(java.lang.Object e)
Description copied from interface: FwCopyableIF
If the object implements FwCopyableIF then return e.getCopy(). Otherwise throw an UnsupportedOperationException.

Specified by:
getCopy in interface FwSimpleObjectIF

getDeepCopy

public java.lang.Object getDeepCopy()
Description copied from interface: FwCopyableIF
Return a copy that is completely independent from the original. In general, this means that subsequent changes to the copy should not have any affect on the original.

Specified by:
getDeepCopy in interface FwSimpleObjectIF

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

getClone

public java.lang.Object getClone()
Description copied from interface: FwCopyableIF
Get a clone of this object. This is mainly a convenience method to hide the exception handling. If the instance cannot be cloned return null.

Specified by:
getClone in interface FwSimpleObjectIF

toString

public java.lang.String toString()
Description copied from interface: FwDisplayableIF
toString is understood by all objects but is included in this interface for conceptual completeness and documentation. In general toString should always identify the instance type (class) and, if available, some value that differentiates this instance from other instances of the same type. The recommended toString format for classes that implement this interface is: "classname[value]".

Specified by:
toString in interface FwSimpleObjectIF
Overrides:
toString in class java.lang.Object

toStringValue

public java.lang.String toStringValue()
Description copied from interface: FwDisplayableIF
Get the string form of the object's value. This string should not include the class name. The string should be one line and relatively short. Null is returned if there is not meaningful value for this instance. If the value is non-null it should be included in the toString result.

Specified by:
toStringValue in interface FwSimpleObjectIF

getDisplayString

public java.lang.String getDisplayString()
Description copied from interface: FwDisplayableIF
If toStringValue is non-null then return it. Otherwise return the class name.

Specified by:
getDisplayString in interface FwSimpleObjectIF

getDisplayStringFor

public java.lang.String getDisplayStringFor(java.lang.Object e)
Description copied from interface: FwDisplayableIF
If the parameter implements FwDisplayableIF then return e.getDisplayString(). Otherwise return e.toString().

Specified by:
getDisplayStringFor in interface FwSimpleObjectIF

getClassName

public java.lang.String getClassName()
Description copied from interface: FwDisplayableIF
This convenience method return the short class name. That is the class's name without the package prefix.

Specified by:
getClassName in interface FwSimpleObjectIF

printStackTrace

public void printStackTrace()