@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_column = true && (isSetColumn()); builder.append(present_column); if (present_column) builder.append(column); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_counter_column = true && (isSetCounter_column()); builder.append(present_counter_column); if (present_counter_column) builder.append(counter_column); boolean present_counter_super_column = true && (isSetCounter_super_column()); builder.append(present_counter_super_column); if (present_counter_super_column) builder.append(counter_super_column); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_column = true && (isSetColumn()); builder.append(present_column); if (present_column) builder.append(column); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_counter_column = true && (isSetCounter_column()); builder.append(present_counter_column); if (present_counter_column) builder.append(counter_column); boolean present_counter_super_column = true && (isSetCounter_super_column()); builder.append(present_counter_super_column); if (present_counter_super_column) builder.append(counter_super_column); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_column = true && (isSetColumn()); builder.append(present_column); if (present_column) builder.append(column); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_counter_column = true && (isSetCounter_column()); builder.append(present_counter_column); if (present_counter_column) builder.append(counter_column); boolean present_counter_super_column = true && (isSetCounter_super_column()); builder.append(present_counter_super_column); if (present_counter_super_column) builder.append(counter_super_column); return builder.toHashCode(); }
private static ByteBuffer getName(ColumnOrSuperColumn cosc) { return cosc.isSetSuper_column() ? cosc.super_column.name : (cosc.isSetColumn() ? cosc.column.name : (cosc.isSetCounter_column() ? cosc.counter_column.name : cosc.counter_super_column.name)); }
/** 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 COLUMN: return isSetColumn(); case SUPER_COLUMN: return isSetSuper_column(); case COUNTER_COLUMN: return isSetCounter_column(); case COUNTER_SUPER_COLUMN: return isSetCounter_super_column(); } throw new IllegalStateException(); }
/** 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 COLUMN: return isSetColumn(); case SUPER_COLUMN: return isSetSuper_column(); case COUNTER_COLUMN: return isSetCounter_column(); case COUNTER_SUPER_COLUMN: return isSetCounter_super_column(); } throw new IllegalStateException(); }
/** 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 COLUMN: return isSetColumn(); case SUPER_COLUMN: return isSetSuper_column(); case COUNTER_COLUMN: return isSetCounter_column(); case COUNTER_SUPER_COLUMN: return isSetCounter_super_column(); } throw new IllegalStateException(); }
if (struct.isSetColumn()) { oprot.writeFieldBegin(COLUMN_FIELD_DESC); struct.column.write(oprot);
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ColumnOrSuperColumn struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetColumn()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetCounter_column()) { optionals.set(2); } if (struct.isSetCounter_super_column()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetColumn()) { struct.column.write(oprot); } if (struct.isSetSuper_column()) { struct.super_column.write(oprot); } if (struct.isSetCounter_column()) { struct.counter_column.write(oprot); } if (struct.isSetCounter_super_column()) { struct.counter_super_column.write(oprot); } }
@Override public Column<C> getColumnByName(C columnName) { ColumnOrSuperColumn column = getColumn(columnName); if (column == null) { return null; } else if (column.isSetColumn()) { return new ThriftColumnImpl<C>(columnName, column.getColumn()); } else if (column.isSetCounter_column()) { return new ThriftCounterColumnImpl<C>(columnName, column.getCounter_column()); } throw new UnsupportedOperationException("SuperColumn " + columnName + " has no value"); }
@Override public Column<C> getColumnByName(C columnName) { ColumnOrSuperColumn column = getColumn(columnName); if (column == null) { return null; } else if (column.isSetColumn()) { return new ThriftColumnImpl<C>(columnName, column.getColumn()); } else if (column.isSetCounter_column()) { return new ThriftCounterColumnImpl<C>(columnName, column.getCounter_column()); } throw new UnsupportedOperationException("SuperColumn " + columnName + " has no value"); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ColumnOrSuperColumn struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetColumn()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetCounter_column()) { optionals.set(2); } if (struct.isSetCounter_super_column()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetColumn()) { struct.column.write(oprot); } if (struct.isSetSuper_column()) { struct.super_column.write(oprot); } if (struct.isSetCounter_column()) { struct.counter_column.write(oprot); } if (struct.isSetCounter_super_column()) { struct.counter_super_column.write(oprot); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, ColumnOrSuperColumn struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetColumn()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetCounter_column()) { optionals.set(2); } if (struct.isSetCounter_super_column()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetColumn()) { struct.column.write(oprot); } if (struct.isSetSuper_column()) { struct.super_column.write(oprot); } if (struct.isSetCounter_column()) { struct.counter_column.write(oprot); } if (struct.isSetCounter_super_column()) { struct.counter_super_column.write(oprot); } }
private void constructMap() { if (lookup == null) { lookup = Maps.newHashMap(); for (ColumnOrSuperColumn column : columns) { if (column.isSetSuper_column()) { lookup.put(colSer.fromBytes(column.getSuper_column().getName()), column); } else if (column.isSetColumn()) { lookup.put(colSer.fromBytes(column.getColumn().getName()), column); } else if (column.isSetCounter_column()) { lookup.put(colSer.fromBytes(column.getCounter_column().getName()), column); } else if (column.isSetCounter_super_column()) { lookup.put(colSer.fromBytes(column.getCounter_super_column().getName()), column); } else { throw new UnsupportedOperationException("Unknown column type"); } } } }
private void constructMap() { if (lookup == null) { lookup = Maps.newHashMap(); for (ColumnOrSuperColumn column : columns) { if (column.isSetSuper_column()) { lookup.put(colSer.fromBytes(column.getSuper_column().getName()), column); } else if (column.isSetColumn()) { lookup.put(colSer.fromBytes(column.getColumn().getName()), column); } else if (column.isSetCounter_column()) { lookup.put(colSer.fromBytes(column.getCounter_column().getName()), column); } else if (column.isSetCounter_super_column()) { lookup.put(colSer.fromBytes(column.getCounter_super_column().getName()), column); } else { throw new UnsupportedOperationException("Unknown column type"); } } } }
@Override public Column<C> getColumnByIndex(int idx) { ColumnOrSuperColumn column = columns.get(idx); if (column == null) { // TODO: throw an exception return null; } else if (column.isSetColumn()) { return new ThriftColumnImpl<C>(this.colSer.fromBytes(column.getColumn().getName()), column.getColumn()); } else if (column.isSetCounter_column()) { return new ThriftCounterColumnImpl<C>(this.colSer.fromBytes(column.getCounter_column().getName()), column.getCounter_column()); } throw new UnsupportedOperationException("SuperColumn " + idx + " has no value"); }
@Override public Column<C> getColumnByIndex(int idx) { ColumnOrSuperColumn column = columns.get(idx); if (column == null) { // TODO: throw an exception return null; } else if (column.isSetColumn()) { return new ThriftColumnImpl<C>(this.colSer.fromBytes(column.getColumn().getName()), column.getColumn()); } else if (column.isSetCounter_column()) { return new ThriftCounterColumnImpl<C>(this.colSer.fromBytes(column.getCounter_column().getName()), column.getCounter_column()); } throw new UnsupportedOperationException("SuperColumn " + idx + " has no value"); }
/** * Performs a deep copy on <i>other</i>. */ public ColumnOrSuperColumn(ColumnOrSuperColumn other) { if (other.isSetColumn()) { this.column = new Column(other.column); } if (other.isSetSuper_column()) { this.super_column = new SuperColumn(other.super_column); } if (other.isSetCounter_column()) { this.counter_column = new CounterColumn(other.counter_column); } if (other.isSetCounter_super_column()) { this.counter_super_column = new CounterSuperColumn(other.counter_super_column); } }
/** * Performs a deep copy on <i>other</i>. */ public ColumnOrSuperColumn(ColumnOrSuperColumn other) { if (other.isSetColumn()) { this.column = new Column(other.column); } if (other.isSetSuper_column()) { this.super_column = new SuperColumn(other.super_column); } if (other.isSetCounter_column()) { this.counter_column = new CounterColumn(other.counter_column); } if (other.isSetCounter_super_column()) { this.counter_super_column = new CounterSuperColumn(other.counter_super_column); } }
/** * Performs a deep copy on <i>other</i>. */ public ColumnOrSuperColumn(ColumnOrSuperColumn other) { if (other.isSetColumn()) { this.column = new Column(other.column); } if (other.isSetSuper_column()) { this.super_column = new SuperColumn(other.super_column); } if (other.isSetCounter_column()) { this.counter_column = new CounterColumn(other.counter_column); } if (other.isSetCounter_super_column()) { this.counter_super_column = new CounterSuperColumn(other.counter_super_column); } }