@org.apache.thrift.annotation.Nullable public java.lang.Object getFieldValue(_Fields field) { switch (field) { case TABLE: return getTable(); case ROW: return getRow(); case COLUMNS: return getColumns(); case VALUES: return getValues(); } throw new java.lang.IllegalStateException(); }
/** * From a {@link TAppend} create an {@link Append}. * @param tappend the Thrift version of an append. * @return an increment that the {@link TAppend} represented. */ public static Append appendFromThrift(TAppend tappend) { Append append = new Append(tappend.getRow()); List<ByteBuffer> columns = tappend.getColumns(); List<ByteBuffer> values = tappend.getValues(); if (columns.size() != values.size()) { throw new IllegalArgumentException( "Sizes of columns and values in tappend object are not matching"); } int length = columns.size(); for (int i = 0; i < length; i++) { byte[][] famAndQf = CellUtil.parseColumn(getBytes(columns.get(i))); append.addColumn(famAndQf[0], famAndQf[1], getBytes(values.get(i))); } return append; } }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE: return getTable(); case ROW: return getRow(); case COLUMNS: return getColumns(); case VALUES: return getValues(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE: return getTable(); case ROW: return getRow(); case COLUMNS: return getColumns(); case VALUES: return getValues(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE: return getTable(); case ROW: return getRow(); case COLUMNS: return getColumns(); case VALUES: return getValues(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case TABLE: return getTable(); case ROW: return getRow(); case COLUMNS: return getColumns(); case VALUES: return getValues(); } throw new IllegalStateException(); }
/** * From a {@link TAppend} create an {@link Append}. * @param tappend the Thrift version of an append. * @return an increment that the {@link TAppend} represented. */ public static Append appendFromThrift(TAppend tappend) { Append append = new Append(tappend.getRow()); List<ByteBuffer> columns = tappend.getColumns(); List<ByteBuffer> values = tappend.getValues(); if (columns.size() != values.size()) { throw new IllegalArgumentException( "Sizes of columns and values in tappend object are not matching"); } int length = columns.size(); for (int i = 0; i < length; i++) { byte[][] famAndQf = CellUtil.parseColumn(getBytes(columns.get(i))); append.addColumn(famAndQf[0], famAndQf[1], getBytes(values.get(i))); } return append; } }
/** * From a {@link TAppend} create an {@link Append}. * @param tappend the Thrift version of an append. * @return an increment that the {@link TAppend} represented. */ public static Append appendFromThrift(TAppend tappend) { Append append = new Append(tappend.getRow()); List<ByteBuffer> columns = tappend.getColumns(); List<ByteBuffer> values = tappend.getValues(); if (columns.size() != values.size()) { throw new IllegalArgumentException( "Sizes of columns and values in tappend object are not matching"); } int length = columns.size(); for (int i = 0; i < length; i++) { byte[][] famAndQf = CellUtil.parseColumn(getBytes(columns.get(i))); append.addColumn(famAndQf[0], famAndQf[1], getBytes(values.get(i))); } return append; } }