static KahaTransactionInfo convertToLocal(TransactionId tx) { KahaTransactionInfo rc = new KahaTransactionInfo(); LocalTransactionId t = (LocalTransactionId) tx; KahaLocalTransactionId kahaTxId = new KahaLocalTransactionId(); kahaTxId.setConnectionId(t.getConnectionId().getValue()); kahaTxId.setTransactionId(t.getValue()); rc.setLocalTransactionId(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(KahaLocalTransactionId obj) { if (hasConnectionId() ^ obj.hasConnectionId() ) return false; if (hasConnectionId() && ( !getConnectionId().equals(obj.getConnectionId()) )) return false; if (hasTransactionId() ^ obj.hasTransactionId() ) return false; if (hasTransactionId() && ( getTransactionId()!=obj.getTransactionId() )) return false; return true; }
public static KahaLocalTransactionId parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaLocalTransactionId().mergeFramed(data).checktInitialized(); }
public static KahaLocalTransactionId parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { return new KahaLocalTransactionId().mergeUnframed(data).checktInitialized(); }
public KahaLocalTransactionId mergeFrom(KahaLocalTransactionId other) { if (other.hasConnectionId()) { setConnectionId(other.getConnectionId()); } if (other.hasTransactionId()) { setTransactionId(other.getTransactionId()); } return this; }
public boolean equals(KahaLocalTransactionId obj) { if (hasConnectionId() ^ obj.hasConnectionId() ) return false; if (hasConnectionId() && ( !getConnectionId().equals(obj.getConnectionId()) )) return false; if (hasTransacitonId() ^ obj.hasTransacitonId() ) return false; if (hasTransacitonId() && ( getTransacitonId()!=obj.getTransacitonId() )) return false; return true; }
public KahaLocalTransactionId mergeFrom(KahaLocalTransactionId other) { if (other.hasConnectionId()) { setConnectionId(other.getConnectionId()); } if (other.hasTransacitonId()) { setTransacitonId(other.getTransacitonId()); } return 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; }
getLocalTransactionId().mergeFramed(input); } else { setLocalTransactionId(new KahaLocalTransactionId().mergeFramed(input));
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasConnectionId() ) { missingFields.add("connection_id"); } if( !hasTransactionId() ) { missingFields.add("transaction_id"); } return missingFields; }
public void clear() { super.clear(); clearConnectionId(); clearTransactionId(); }
public boolean equals(Object obj) { if( obj==this ) return true; if( obj==null || obj.getClass()!=KahaLocalTransactionId.class ) return false; return equals((KahaLocalTransactionId)obj); }
public KahaLocalTransactionId getLocalTransactionId() { if( this.f_localTransactionId == null ) { this.f_localTransactionId = new KahaLocalTransactionId(); } return this.f_localTransactionId; }
public int hashCode() { int rc=156129213; if (hasLocalTransacitonId()) { rc ^= ( 507511492^getLocalTransacitonId().hashCode() ); } if (hasXaTransacitonId()) { rc ^= ( -1331532858^getXaTransacitonId().hashCode() ); } if (hasPreviousEntry()) { rc ^= ( 508350363^getPreviousEntry().hashCode() ); } return rc; }
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 void clear() { super.clear(); clearConnectionId(); clearTransacitonId(); }
public java.util.ArrayList<String> missingFields() { java.util.ArrayList<String> missingFields = super.missingFields(); if( !hasConnectionId() ) { missingFields.add("connection_id"); } if( !hasTransacitonId() ) { missingFields.add("transaciton_id"); } return missingFields; }
private TransactionId key(KahaTransactionInfo transactionInfo) { if (transactionInfo.hasLocalTransacitonId()) { KahaLocalTransactionId tx = transactionInfo.getLocalTransacitonId(); LocalTransactionId rc = new LocalTransactionId(); rc.setConnectionId(new ConnectionId(tx.getConnectionId())); rc.setValue(tx.getTransacitonId()); return rc; } else { KahaXATransactionId tx = transactionInfo.getXaTransacitonId(); XATransactionId rc = new XATransactionId(); rc.setBranchQualifier(tx.getBranchQualifier().toByteArray()); rc.setGlobalTransactionId(tx.getGlobalTransactionId().toByteArray()); rc.setFormatId(tx.getFormatId()); return rc; } }
public boolean equals(KahaLocalTransactionId obj) { if (hasConnectionId() ^ obj.hasConnectionId() ) return false; if (hasConnectionId() && ( !getConnectionId().equals(obj.getConnectionId()) )) return false; if (hasTransactionId() ^ obj.hasTransactionId() ) return false; if (hasTransactionId() && ( getTransactionId()!=obj.getTransactionId() )) return false; return true; }