planetj.common
Class BusinessObject

java.lang.Object
  |
  +--planetj.common.BusinessObject
All Implemented Interfaces:
Invokeable, Serializable
Direct Known Subclasses:
CMUtility, ConvertUtility

public abstract class BusinessObject
extends Object
implements Serializable, Invokeable

Business Object is the highest level business domain object. It is a place holder for implementing common operations and attributes common to all busines objects such as business object security, exception handling, etc.

See Also:
Serialized Form

Constructor Summary
BusinessObject()
           
 
Method Summary
 CMException generateException(String exceptionKey)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, Object[] replacementVars)
          Generate a new CMException.
 CMException generateException(String exceptionKey, String parm1)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, String parm1, String parm2)
          Convenience method which simply creates the replacement text variables as an array
 CMException generateException(String exceptionKey, String parm1, String parm2, String parm3)
          Convenience method which simply creates the replacement text variables as an array
static String getTranslation(String messageToTranslate)
          Translate the message to the appropriate international text.
 Object invoke(String methodName)
          This method was created by a SmartGuide.
 boolean toBoolean(String flag)
          This method was created by a SmartGuide.
 String toString(boolean flag)
          This method was created by a SmartGuide.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BusinessObject

public BusinessObject()
Method Detail

generateException

public CMException generateException(String exceptionKey)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     Object[] replacementVars)
Generate a new CMException. This uses the TranslationManager since exceptions and messages need to be translated. The message are retrieved from a properties file called MessageBundle.properties. This also depends on a naming scheme where the "Detailed" text is appended to the exceptionKey to be used in finding the "detailed" message for this exception.


generateException

public CMException generateException(String exceptionKey,
                                     String parm1)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     String parm1,
                                     String parm2)
Convenience method which simply creates the replacement text variables as an array


generateException

public CMException generateException(String exceptionKey,
                                     String parm1,
                                     String parm2,
                                     String parm3)
Convenience method which simply creates the replacement text variables as an array


getTranslation

public static String getTranslation(String messageToTranslate)
Translate the message to the appropriate international text. This is normally done in GUI only but there are cases when BusinessObjects need to translate.


invoke

public Object invoke(String methodName)
This method was created by a SmartGuide.

Specified by:
invoke in interface Invokeable
Parameters:
methodName - java.lang.String
Returns:
java.lang.Object

toBoolean

public boolean toBoolean(String flag)
This method was created by a SmartGuide.


toString

public String toString(boolean flag)
This method was created by a SmartGuide.