public Mutation deepCopy() { return new Mutation(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof Mutation) return this.equals((Mutation)that); return false; }
@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IS_DELETE: return isIsDelete(); case COLUMN: return getColumn(); case VALUE: return getValue(); case WRITE_TO_WAL: return isWriteToWAL(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isDelete) ? 131071 : 524287); hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287); if (isSetColumn()) hashCode = hashCode * 8191 + column.hashCode(); hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); if (isSetValue()) hashCode = hashCode * 8191 + value.hashCode(); hashCode = hashCode * 8191 + ((writeToWAL) ? 131071 : 524287); return hashCode; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case IS_DELETE: return isSetIsDelete(); case COLUMN: return isSetColumn(); case VALUE: return isSetValue(); case WRITE_TO_WAL: return isSetWriteToWAL(); } throw new java.lang.IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.mutations = new java.util.ArrayList<Mutation>(_list5.size); @org.apache.thrift.annotation.Nullable Mutation _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new Mutation(); _elem6.read(iprot); struct.mutations.add(_elem6); } } struct.setMutationsIsSet(true); } } }
lastComparison = java.lang.Boolean.valueOf(isSetIsDelete()).compareTo(other.isSetIsDelete()); if (lastComparison != 0) { return lastComparison; if (isSetIsDelete()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDelete, other.isDelete); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn()); if (lastComparison != 0) { return lastComparison; if (isSetColumn()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, other.column); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { lastComparison = java.lang.Boolean.valueOf(isSetWriteToWAL()).compareTo(other.isSetWriteToWAL()); if (lastComparison != 0) { return lastComparison; if (isSetWriteToWAL()) {
boolean this_present_column = true && this.isSetColumn(); boolean that_present_column = true && that.isSetColumn(); if (this_present_column || that_present_column) { if (!(this_present_column && that_present_column)) boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value))
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetIsDelete()) { optionals.set(0); } if (struct.isSetColumn()) { optionals.set(1); } if (struct.isSetValue()) { optionals.set(2); } if (struct.isSetWriteToWAL()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetIsDelete()) { oprot.writeBool(struct.isDelete); } if (struct.isSetColumn()) { oprot.writeBinary(struct.column); } if (struct.isSetValue()) { oprot.writeBinary(struct.value); } if (struct.isSetWriteToWAL()) { oprot.writeBool(struct.writeToWAL); } }
/** * @return a List of Mutations for a row, with columnA having valueA * and columnB having valueB */ private static List<Mutation> getMutations() { List<Mutation> mutations = new ArrayList<>(2); mutations.add(new Mutation(false, columnAname, valueAname, true)); mutations.add(new Mutation(false, columnBname, valueBname, true)); return mutations; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.mutations = new ArrayList<Mutation>(_list5.size); Mutation _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new Mutation(); _elem6.read(iprot); struct.mutations.add(_elem6); } } struct.setMutationsIsSet(true); } } }
public Object getFieldValue(_Fields field) { switch (field) { case IS_DELETE: return Boolean.valueOf(isIsDelete()); case COLUMN: return getColumn(); case VALUE: return getValue(); case WRITE_TO_WAL: return Boolean.valueOf(isWriteToWAL()); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public Mutation(Mutation other) { __isset_bitfield = other.__isset_bitfield; this.isDelete = other.isDelete; if (other.isSetColumn()) { this.column = org.apache.thrift.TBaseHelper.copyBinary(other.column); } if (other.isSetValue()) { this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); } this.writeToWAL = other.writeToWAL; }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Mutation) return this.equals((Mutation)that); return false; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case IS_DELETE: return isSetIsDelete(); case COLUMN: return isSetColumn(); case VALUE: return isSetValue(); case WRITE_TO_WAL: return isSetWriteToWAL(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public BatchMutation(BatchMutation other) { if (other.isSetRow()) { this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row); } if (other.isSetMutations()) { java.util.List<Mutation> __this__mutations = new java.util.ArrayList<Mutation>(other.mutations.size()); for (Mutation other_element : other.mutations) { __this__mutations.add(new Mutation(other_element)); } this.mutations = __this__mutations; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.mutations = new ArrayList<Mutation>(_list5.size); Mutation _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new Mutation(); _elem6.read(iprot); struct.mutations.add(_elem6); } } struct.setMutationsIsSet(true); } } }
public Object getFieldValue(_Fields field) { switch (field) { case IS_DELETE: return Boolean.valueOf(isIsDelete()); case COLUMN: return getColumn(); case VALUE: return getValue(); case WRITE_TO_WAL: return Boolean.valueOf(isWriteToWAL()); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public Mutation(Mutation other) { __isset_bitfield = other.__isset_bitfield; this.isDelete = other.isDelete; if (other.isSetColumn()) { this.column = other.column; } if (other.isSetValue()) { this.value = other.value; } this.writeToWAL = other.writeToWAL; }