net.sf.jabb.util.bean
Class GenericResult

java.lang.Object
  extended by net.sf.jabb.util.bean.GenericResult

public class GenericResult
extends Object

Generic bean to contain result/response information.
通用的存放返回结果的Bean。

Author:
Zhengmao HU (James)

Field Summary
protected  Object attachment
          Any further information. 更进一步的信息。
protected  String errorMessage
          Detail of the error if there is any.
出错消息(仅针对操作不成功的情况)
protected  boolean successful
          Whether the request was processed successfully.
是否成功处理了请求。
 
Constructor Summary
GenericResult()
           
GenericResult(boolean successful)
           
GenericResult(boolean successful, String errorMsg)
          Constructor without the need of attachment parameter.
GenericResult(boolean successful, String errorMsg, Object att)
          Constructor.
创建一个对象实例。
 
Method Summary
 Object getAttachment()
           
 String getErrorMessage()
           
 boolean isSuccessful()
           
 void setAttachment(Object attachment)
           
 void setErrorMessage(String errorMessage)
           
 void setSuccessful(boolean successful)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

successful

protected boolean successful
Whether the request was processed successfully.
是否成功处理了请求。


errorMessage

protected String errorMessage
Detail of the error if there is any.
出错消息(仅针对操作不成功的情况)


attachment

protected Object attachment
Any further information. 更进一步的信息。

Constructor Detail

GenericResult

public GenericResult(boolean successful,
                     String errorMsg,
                     Object att)
Constructor.
创建一个对象实例。

Parameters:
successful - Successful or not
errorMsg - Error message
att - Attachement

GenericResult

public GenericResult(boolean successful,
                     String errorMsg)
Constructor without the need of attachment parameter.

Parameters:
successful - Successful or not
errorMsg - Error message

GenericResult

public GenericResult(boolean successful)

GenericResult

public GenericResult()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

isSuccessful

public boolean isSuccessful()

setSuccessful

public void setSuccessful(boolean successful)

getErrorMessage

public String getErrorMessage()

setErrorMessage

public void setErrorMessage(String errorMessage)

getAttachment

public Object getAttachment()

setAttachment

public void setAttachment(Object attachment)


Copyright © 2012. All Rights Reserved.