use of io.seata.core.protocol.transaction.GlobalBeginResponse in project seata by seata.
the class MergeResultMessageTest method buildGlobalBeginResponse.
private GlobalBeginResponse buildGlobalBeginResponse() {
final GlobalBeginResponse globalBeginResponse = new GlobalBeginResponse();
globalBeginResponse.setXid("xid");
globalBeginResponse.setExtraData("data");
globalBeginResponse.setMsg("success");
globalBeginResponse.setResultCode(ResultCode.Success);
return globalBeginResponse;
}
use of io.seata.core.protocol.transaction.GlobalBeginResponse in project seata by seata.
the class GlobalBeginResponseConvertor method convert2Model.
@Override
public GlobalBeginResponse convert2Model(GlobalBeginResponseProto globalBeginResponseProto) {
GlobalBeginResponse branchCommitResponse = new GlobalBeginResponse();
branchCommitResponse.setXid(globalBeginResponseProto.getXid());
branchCommitResponse.setExtraData(globalBeginResponseProto.getExtraData());
branchCommitResponse.setMsg(globalBeginResponseProto.getAbstractTransactionResponse().getAbstractResultMessage().getMsg());
branchCommitResponse.setResultCode(ResultCode.valueOf(globalBeginResponseProto.getAbstractTransactionResponse().getAbstractResultMessage().getResultCode().name()));
branchCommitResponse.setTransactionExceptionCode(TransactionExceptionCode.valueOf(globalBeginResponseProto.getAbstractTransactionResponse().getTransactionExceptionCode().name()));
return branchCommitResponse;
}
Aggregations