Skip to content

Instantly share code, notes, and snippets.

@armed
Created December 3, 2010 07:01
Show Gist options
  • Save armed/726669 to your computer and use it in GitHub Desktop.
Save armed/726669 to your computer and use it in GitHub Desktop.
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType
public class CsResult {
//@XmlAttribute
@XmlSchemaType(name="anyType")
protected Object result;
@XmlElement(type=String.class, required=true)
protected String errCode;
@XmlElement(type=String.class)
protected String errMsg;
public CsResult() {
this.result = null;
this.errCode = CsExceptions.SUCCESS_CODE;
this.errMsg = "";
}
public CsResult(Object result, String errCode, String errMsg) {
this.result = result;
this.errCode = errCode;
this.errMsg = errMsg;
}
public CsResult(Object result) {
this.result = result;
this.errCode = CsExceptions.SUCCESS_CODE;
this.errMsg = "";
}
public CsResult(String errCode, String errMsg) {
this.result = null;
this.errCode = errCode;
this.errMsg = errMsg;
}
public String getErrCode() {
return errCode;
}
public void setErrCode(String errCode) {
this.errCode = errCode;
}
public String getErrMsg() {
return errMsg;
}
public void setErrMsg(String errMsg) {
this.errMsg = errMsg;
}
public Object getResult() {
return result;
}
public void setResult(Object result) {
this.result = result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment