static KahaTransactionInfo convert(TransactionId txid) { if (txid == null) { return null; } KahaTransactionInfo rc; if (txid.isLocalTransaction()) { rc = convertToLocal(txid); } else { rc = new KahaTransactionInfo(); XATransactionId t = (XATransactionId) txid; KahaXATransactionId kahaTxId = new KahaXATransactionId(); kahaTxId.setBranchQualifier(new Buffer(t.getBranchQualifier())); kahaTxId.setGlobalTransactionId(new Buffer(t.getGlobalTransactionId())); kahaTxId.setFormatId(t.getFormatId()); rc.setXaTransactionId(kahaTxId); } return rc; }
static TransactionId convert(KahaTransactionInfo transactionInfo) { if (transactionInfo.hasLocalTransactionId()) { KahaLocalTransactionId tx = transactionInfo.getLocalTransactionId(); LocalTransactionId rc = new LocalTransactionId(); rc.setConnectionId(new ConnectionId(tx.getConnectionId())); rc.setValue(tx.getTransactionId()); return rc; } else { KahaXATransactionId tx = transactionInfo.getXaTransactionId(); XATransactionId rc = new XATransactionId(); rc.setBranchQualifier(tx.getBranchQualifier().toByteArray()); rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray()); rc.setFormatId(tx.getFormatId()); return rc; } } }
public boolean equals(KahaXATransactionId obj) { if (hasFormatId() ^ obj.hasFormatId() ) return false; if (hasFormatId() && ( getFormatId()!=obj.getFormatId() )) return false; if (hasBranchQualifier() ^ obj.hasBranchQualifier() ) return false; if (hasBranchQualifier() && ( !getBranchQualifier().equals(obj.getBranchQualifier()) )) return false; if (hasGlobalTransactionId() ^ obj.hasGlobalTransactionId() ) return false; if (hasGlobalTransactionId() && ( !getGlobalTransactionId().equals(obj.getGlobalTransactionId()) )) return false; return true; }
public KahaXATransactionId mergeFrom(KahaXATransactionId other) { if (other.hasFormatId()) { setFormatId(other.getFormatId()); } if (other.hasBranchQualifier()) { setBranchQualifier(other.getBranchQualifier()); } if (other.hasGlobalTransactionId()) { setGlobalTransactionId(other.getGlobalTransactionId()); } return this; }
public static KahaXATransactionId parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaXATransactionId().mergeUnframed(data).checktInitialized(); }
public static KahaXATransactionId parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaXATransactionId().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearFormatId(); clearBranchQualifier(); clearGlobalTransactionId(); }
public KahaXATransactionId clone() { return new KahaXATransactionId().mergeFrom(this); }
public KahaTransactionInfo mergeFrom(KahaTransactionInfo other) { if (other.hasLocalTransactionId()) { if (hasLocalTransactionId()) { getLocalTransactionId().mergeFrom(other.getLocalTransactionId()); } else { setLocalTransactionId(other.getLocalTransactionId().clone()); } } if (other.hasXaTransactionId()) { if (hasXaTransactionId()) { getXaTransactionId().mergeFrom(other.getXaTransactionId()); } else { setXaTransactionId(other.getXaTransactionId().clone()); } } if (other.hasPreviousEntry()) { if (hasPreviousEntry()) { getPreviousEntry().mergeFrom(other.getPreviousEntry()); } else { setPreviousEntry(other.getPreviousEntry().clone()); } } return this; }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaXATransactionId.class ) return false; return equals((KahaXATransactionId)obj); }
case 18: if (hasXaTransactionId()) { getXaTransactionId().mergeFramed(input); } else { setXaTransactionId(new KahaXATransactionId().mergeFramed(input));
public KahaXATransactionId getXaTransactionId() { if( this.f_xaTransactionId == null ) { this.f_xaTransactionId = new KahaXATransactionId(); } return this.f_xaTransactionId; }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( hasLocalTransactionId() ) { try { getLocalTransactionId().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"local_transaction_id.")); } } if( hasXaTransactionId() ) { try { getXaTransactionId().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"xa_transaction_id.")); } } if( hasPreviousEntry() ) { try { getPreviousEntry().assertInitialized(); } catch (org.apache.activemq.protobuf.UninitializedMessageException e){ missingFields.addAll(prefix(e.getMissingFields(),"previous_entry.")); } } return missingFields; }
public boolean equals(KahaXATransactionId obj) { if (hasFormatId() ^ obj.hasFormatId() ) return false; if (hasFormatId() && ( getFormatId()!=obj.getFormatId() )) return false; if (hasBranchQualifier() ^ obj.hasBranchQualifier() ) return false; if (hasBranchQualifier() && ( !getBranchQualifier().equals(obj.getBranchQualifier()) )) return false; if (hasGlobalTransactionId() ^ obj.hasGlobalTransactionId() ) return false; if (hasGlobalTransactionId() && ( !getGlobalTransactionId().equals(obj.getGlobalTransactionId()) )) return false; return true; }
public KahaXATransactionId mergeFrom(KahaXATransactionId other) { if (other.hasFormatId()) { setFormatId(other.getFormatId()); } if (other.hasBranchQualifier()) { setBranchQualifier(other.getBranchQualifier()); } if (other.hasGlobalTransactionId()) { setGlobalTransactionId(other.getGlobalTransactionId()); } return this; }
public static KahaXATransactionId parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaXATransactionId().mergeUnframed(data).checktInitialized(); }
public static KahaXATransactionId parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaXATransactionId().mergeFramed(data).checktInitialized(); }
public void clear() { super.clear(); clearFormatId(); clearBranchQualifier(); clearGlobalTransactionId(); }
public KahaXATransactionId clone() { return new KahaXATransactionId().mergeFrom(this); }
public KahaTransactionInfo mergeFrom(KahaTransactionInfo other) { if (other.hasLocalTransactionId()) { if (hasLocalTransactionId()) { getLocalTransactionId().mergeFrom(other.getLocalTransactionId()); } else { setLocalTransactionId(other.getLocalTransactionId().clone()); } } if (other.hasXaTransactionId()) { if (hasXaTransactionId()) { getXaTransactionId().mergeFrom(other.getXaTransactionId()); } else { setXaTransactionId(other.getXaTransactionId().clone()); } } if (other.hasPreviousEntry()) { if (hasPreviousEntry()) { getPreviousEntry().mergeFrom(other.getPreviousEntry()); } else { setPreviousEntry(other.getPreviousEntry().clone()); } } return this; }