public TRowMutations deepCopy() { return new TRowMutations(this); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof TRowMutations) return this.equals((TRowMutations)that); return false; }
@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case ROW: return getRow(); case MUTATIONS: return getMutations(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetRow()) ? 131071 : 524287); if (isSetRow()) hashCode = hashCode * 8191 + row.hashCode(); hashCode = hashCode * 8191 + ((isSetMutations()) ? 131071 : 524287); if (isSetMutations()) hashCode = hashCode * 8191 + mutations.hashCode(); return hashCode; }
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { switch (field) { case ROW: if (value == null) { unsetRow(); } else { if (value instanceof byte[]) { setRow((byte[])value); } else { setRow((java.nio.ByteBuffer)value); } } break; case MUTATIONS: if (value == null) { unsetMutations(); } else { setMutations((java.util.List<TMutation>)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.table = iprot.readBinary(); struct.setTableIsSet(true); struct.rowMutations = new TRowMutations(); struct.rowMutations.read(iprot); struct.setRowMutationsIsSet(true); } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setMutationsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); { org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.mutations = new java.util.ArrayList<TMutation>(_list139.size); @org.apache.thrift.annotation.Nullable TMutation _elem140; for (int _i141 = 0; _i141 < _list139.size; ++_i141) { _elem140 = new TMutation(); _elem140.read(iprot); struct.mutations.add(_elem140); } } struct.setMutationsIsSet(true); } }
public static TRowMutations rowMutationsFromHBase(RowMutations in) { TRowMutations tRowMutations = new TRowMutations(); tRowMutations.setRow(in.getRow()); for (Mutation mutation : in.getMutations()) { TMutation tMutation = new TMutation(); if (mutation instanceof Put) { tMutation.setPut(ThriftUtilities.putFromHBase((Put)mutation)); } else if (mutation instanceof Delete) { tMutation.setDeleteSingle(ThriftUtilities.deleteFromHBase((Delete)mutation)); } else { throw new IllegalArgumentException( "Only Put and Delete is supported in mutateRow, but muation=" + mutation); } tRowMutations.addToMutations(tMutation); } return tRowMutations; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public byte[] getRow() { setRow(org.apache.thrift.TBaseHelper.rightSize(row)); return row == null ? null : row.array(); }
/** 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 ROW: return isSetRow(); case MUTATIONS: return isSetMutations(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ROW: if (value == null) { unsetRow(); } else { setRow((ByteBuffer)value); } break; case MUTATIONS: if (value == null) { unsetMutations(); } else { setMutations((List<TMutation>)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.table = iprot.readBinary(); struct.setTableIsSet(true); struct.rowMutations = new TRowMutations(); struct.rowMutations.read(iprot); struct.setRowMutationsIsSet(true); } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.row = iprot.readBinary(); struct.setRowIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setMutationsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TRowMutations struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.row = iprot.readBinary(); struct.setRowIsSet(true); { org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.mutations = new ArrayList<TMutation>(_list129.size); TMutation _elem130; for (int _i131 = 0; _i131 < _list129.size; ++_i131) { _elem130 = new TMutation(); _elem130.read(iprot); struct.mutations.add(_elem130); } } struct.setMutationsIsSet(true); } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public byte[] getRow() { setRow(org.apache.thrift.TBaseHelper.rightSize(row)); return row == null ? null : row.array(); }
public boolean equals(TRowMutations that) { if (that == null) return false; if (this == that) return true; boolean this_present_row = true && this.isSetRow(); boolean that_present_row = true && that.isSetRow(); if (this_present_row || that_present_row) { if (!(this_present_row && that_present_row)) return false; if (!this.row.equals(that.row)) return false; } boolean this_present_mutations = true && this.isSetMutations(); boolean that_present_mutations = true && that.isSetMutations(); if (this_present_mutations || that_present_mutations) { if (!(this_present_mutations && that_present_mutations)) return false; if (!this.mutations.equals(that.mutations)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ROW: if (value == null) { unsetRow(); } else { setRow((ByteBuffer)value); } break; case MUTATIONS: if (value == null) { unsetMutations(); } else { setMutations((List<TMutation>)value); } break; } }