@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.TransactionOptions)) { return super.equals(obj); } com.google.datastore.v1.TransactionOptions other = (com.google.datastore.v1.TransactionOptions) obj; boolean result = true; result = result && getModeCase().equals(other.getModeCase()); if (!result) return false; switch (modeCase_) { case 1: result = result && getReadWrite().equals(other.getReadWrite()); break; case 2: result = result && getReadOnly().equals(other.getReadOnly()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(com.google.datastore.v1.TransactionOptions other) { if (other == com.google.datastore.v1.TransactionOptions.getDefaultInstance()) return this; switch (other.getModeCase()) { case READ_WRITE: { mergeReadWrite(other.getReadWrite()); break; } case READ_ONLY: { mergeReadOnly(other.getReadOnly()); break; } case MODE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public T call() throws DatastoreException { transaction = datastore.newTransaction(options); try { T value = callable.run(transaction); transaction.commit(); return value; } catch (Exception ex) { transaction.rollback(); throw DatastoreException.propagateUserException(ex); } finally { if (transaction.isActive()) { transaction.rollback(); } if (options != null && options.getModeCase().equals(TransactionOptions.ModeCase.READ_WRITE)) { setPrevTransactionId(transaction.getTransactionId()); } } } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.TransactionOptions)) { return super.equals(obj); } com.google.datastore.v1.TransactionOptions other = (com.google.datastore.v1.TransactionOptions) obj; boolean result = true; result = result && getModeCase().equals(other.getModeCase()); if (!result) return false; switch (modeCase_) { case 1: result = result && getReadWrite().equals(other.getReadWrite()); break; case 2: result = result && getReadOnly().equals(other.getReadOnly()); break; case 0: default: } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.datastore.v1.TransactionOptions)) { return super.equals(obj); } com.google.datastore.v1.TransactionOptions other = (com.google.datastore.v1.TransactionOptions) obj; boolean result = true; result = result && getModeCase().equals( other.getModeCase()); if (!result) return false; switch (modeCase_) { case 1: result = result && getReadWrite() .equals(other.getReadWrite()); break; case 2: result = result && getReadOnly() .equals(other.getReadOnly()); break; case 0: default: } return result; }
public Builder mergeFrom(com.google.datastore.v1.TransactionOptions other) { if (other == com.google.datastore.v1.TransactionOptions.getDefaultInstance()) return this; switch (other.getModeCase()) { case READ_WRITE: { mergeReadWrite(other.getReadWrite()); break; } case READ_ONLY: { mergeReadOnly(other.getReadOnly()); break; } case MODE_NOT_SET: { break; } } onChanged(); return this; }
public Builder mergeFrom(com.google.datastore.v1.TransactionOptions other) { if (other == com.google.datastore.v1.TransactionOptions.getDefaultInstance()) return this; switch (other.getModeCase()) { case READ_WRITE: { mergeReadWrite(other.getReadWrite()); break; } case READ_ONLY: { mergeReadOnly(other.getReadOnly()); break; } case MODE_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@Override public T call() throws DatastoreException { transaction = datastore.newTransaction(options); try { T value = callable.run(transaction); transaction.commit(); return value; } catch (Exception ex) { transaction.rollback(); throw DatastoreException.propagateUserException(ex); } finally { if (transaction.isActive()) { transaction.rollback(); } if (options != null && options.getModeCase().equals(TransactionOptions.ModeCase.READ_WRITE)) { setPrevTransactionId(transaction.getTransactionId()); } } } }