com.alibaba.tmq.common.domain.result.UpdateResult Maven / Gradle / Ivy
package com.alibaba.tmq.common.domain.result;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.tmq.common.domain.KeyValuePair;
import com.alibaba.tmq.common.domain.Message;
/**
* 更新结果
* @author tianyao.myc
*
*/
public class UpdateResult extends Result {
private static final long serialVersionUID = -5008530684299942479L;
/** 消息列表 */
private List> messageKeyValueList = new ArrayList>();
public UpdateResult() {
}
public UpdateResult(Boolean data) {
super(data);
}
public UpdateResult(ResultCode resultCode) {
super(resultCode);
}
public UpdateResult(Result result) {
super(result.getData(), result.getResultCode());
}
public UpdateResult(Result result, KeyValuePair messageKeyValue) {
super(result.getData(), result.getResultCode());
this.messageKeyValueList.add(messageKeyValue);
}
public UpdateResult(Result result, List> messageKeyValueList) {
super(result.getData(), result.getResultCode());
this.messageKeyValueList.addAll(messageKeyValueList);
}
public UpdateResult(Boolean data, ResultCode resultCode) {
super(data, resultCode);
}
public UpdateResult(Boolean data, ResultCode resultCode, KeyValuePair messageKeyValue) {
super(data, resultCode);
this.messageKeyValueList.add(messageKeyValue);
}
public UpdateResult(Boolean data, ResultCode resultCode, List> messageKeyValueList) {
super(data, resultCode);
this.messageKeyValueList.addAll(messageKeyValueList);
}
public List> getMessageKeyValueList() {
return messageKeyValueList;
}
public void setMessageKeyValueList(
List> messageKeyValueList) {
this.messageKeyValueList = messageKeyValueList;
}
@Override
public String toString() {
return "UpdateResult [messageKeyValueList=" + messageKeyValueList
+ ", getData()=" + getData() + ", getResultCode()="
+ getResultCode() + "]";
}
}