com.zphinx.spine.vo
Class ResultObject

java.lang.Object
  extended by com.zphinx.spine.vo.CommandComponent
      extended by com.zphinx.spine.vo.ResultObject
All Implemented Interfaces:
DataTransferAssembler, Serializable

public class ResultObject
extends CommandComponent

ResultObject acts as a DataTransferAssembler used to send the output of data transactions accross layers for onward processing

Version:
1.0

created 10-Jan-2005 18:33:01

copyright © Zphinx Software Solutions

Author:
David Ladapo
See Also:
Serialized Form

Field Summary
static String ERRORS
          The key which used to persist errors in this object
static String MESSAGES
          The key which used to persist messages in this object
 
Constructor Summary
ResultObject()
          Constructor initializes a displayMessages object using the default locale,client developers are advised to use addMessageOrError(DisplayMessage) to set the messages.
 
Method Summary
 void addMessageOrError(DisplayMessage message)
          Sets a DisplayMessage or DisplayError into this Object
 DisplayMessages getDisplayMessages()
          Gets the DisplayMessages object associated with this object, using the default locale for this jvm
 String getErrors()
          Gets the errors saved in this object
 String getMessages()
          Gets the messages
 boolean isErrorFlag()
          Gets the flag indicating failure or success.True if there was an error during processing
 boolean isMessageFlag()
          Gets a flag indicating the presence of messages in this object
 void setDisplayMessages(DisplayMessages displayMessages)
          Sets the displayMessages
 void setErrors(String errorString)
          Sets the errors saved in this object,and sets the errorFlag to true the errors must be a String with length greater than 1, and cannot be a blank String
 void setMessages(String messages)
          Sets the messages returned with this Object, accepts a String value
 String toString()
           
 
Methods inherited from class com.zphinx.spine.vo.CommandComponent
getDaoConstructor, getDataObject, getDataObjectClass, getDataType, getObj, getOperation, setDaoConstructor, setDataObject, setDataObjectClass, setDataType, setObj, setOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MESSAGES

public static final String MESSAGES
The key which used to persist messages in this object

See Also:
Constant Field Values

ERRORS

public static final String ERRORS
The key which used to persist errors in this object

See Also:
Constant Field Values
Constructor Detail

ResultObject

public ResultObject()
Constructor initializes a displayMessages object using the default locale,client developers are advised to use addMessageOrError(DisplayMessage) to set the messages. ViewProcessor

Method Detail

getErrors

public String getErrors()
Gets the errors saved in this object

Returns:
Returns the errors.

setErrors

public void setErrors(String errorString)
Sets the errors saved in this object,and sets the errorFlag to true the errors must be a String with length greater than 1, and cannot be a blank String

Parameters:
errorString - The errors to set.

isErrorFlag

public boolean isErrorFlag()
Gets the flag indicating failure or success.True if there was an error during processing

Returns:
Returns the errorFlag.

getDisplayMessages

public DisplayMessages getDisplayMessages()
Gets the DisplayMessages object associated with this object, using the default locale for this jvm

Returns:
The DisplayMessages object associated with this object

isMessageFlag

public boolean isMessageFlag()
Gets a flag indicating the presence of messages in this object

Returns:
the messageFlag

toString

public String toString()
Overrides:
toString in class Object

setDisplayMessages

public void setDisplayMessages(DisplayMessages displayMessages)
Sets the displayMessages

Parameters:
displayMessages - the displayMessages to set

getMessages

public String getMessages()
Gets the messages

Returns:
the messages

setMessages

public void setMessages(String messages)
Sets the messages returned with this Object, accepts a String value

Parameters:
messages - the messages to set

addMessageOrError

public void addMessageOrError(DisplayMessage message)
Sets a DisplayMessage or DisplayError into this Object

Parameters:
message - the message or error object to set