@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_super_column = true && (isSetSuper_column()); builder.append(present_super_column); if (present_super_column) builder.append(super_column); boolean present_predicate = true && (isSetPredicate()); builder.append(present_predicate); if (present_predicate) builder.append(predicate); return builder.toHashCode(); }
/** 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 TIMESTAMP: return isSetTimestamp(); case SUPER_COLUMN: return isSetSuper_column(); case PREDICATE: return isSetPredicate(); } 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 TIMESTAMP: return isSetTimestamp(); case SUPER_COLUMN: return isSetSuper_column(); case PREDICATE: return isSetPredicate(); } 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 TIMESTAMP: return isSetTimestamp(); case SUPER_COLUMN: return isSetSuper_column(); case PREDICATE: return isSetPredicate(); } throw new IllegalStateException(); }
boolean first = true; if (isSetTimestamp()) { sb.append("timestamp:"); sb.append(this.timestamp);
boolean first = true; if (isSetTimestamp()) { sb.append("timestamp:"); sb.append(this.timestamp);
lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); if (lastComparison != 0) {
public void write(org.apache.thrift.protocol.TProtocol oprot, Deletion struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.super_column != null) { if (struct.isSetSuper_column()) { oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC); oprot.writeBinary(struct.super_column); oprot.writeFieldEnd(); } } if (struct.predicate != null) { if (struct.isSetPredicate()) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); struct.predicate.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Deletion struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.super_column != null) { if (struct.isSetSuper_column()) { oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC); oprot.writeBinary(struct.super_column); oprot.writeFieldEnd(); } } if (struct.predicate != null) { if (struct.isSetPredicate()) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); struct.predicate.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Deletion struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.super_column != null) { if (struct.isSetSuper_column()) { oprot.writeFieldBegin(SUPER_COLUMN_FIELD_DESC); oprot.writeBinary(struct.super_column); oprot.writeFieldEnd(); } } if (struct.predicate != null) { if (struct.isSetPredicate()) { oprot.writeFieldBegin(PREDICATE_FIELD_DESC); struct.predicate.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(Deletion that) { if (that == null) return false; boolean this_present_timestamp = true && this.isSetTimestamp(); boolean that_present_timestamp = true && that.isSetTimestamp(); if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_super_column = true && this.isSetSuper_column(); boolean that_present_super_column = true && that.isSetSuper_column(); if (this_present_super_column || that_present_super_column) { if (!(this_present_super_column && that_present_super_column)) return false; if (!this.super_column.equals(that.super_column)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } return true; }
public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (metadata.cfType == ColumnFamilyType.Standard && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard ColumnFamily (KeySpace=%s ColumnFamily=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = System.currentTimeMillis(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative column family " + metadata.cfName); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetPredicate()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetSuper_column()) { oprot.writeBinary(struct.super_column); } if (struct.isSetPredicate()) { struct.predicate.write(oprot); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetPredicate()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetSuper_column()) { oprot.writeBinary(struct.super_column); } if (struct.isSetPredicate()) { struct.predicate.write(oprot); } }
public boolean equals(Deletion that) { if (that == null) return false; boolean this_present_timestamp = true && this.isSetTimestamp(); boolean that_present_timestamp = true && that.isSetTimestamp(); if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_super_column = true && this.isSetSuper_column(); boolean that_present_super_column = true && that.isSetSuper_column(); if (this_present_super_column || that_present_super_column) { if (!(this_present_super_column && that_present_super_column)) return false; if (!this.super_column.equals(that.super_column)) return false; } boolean this_present_predicate = true && this.isSetPredicate(); boolean that_present_predicate = true && that.isSetPredicate(); if (this_present_predicate || that_present_predicate) { if (!(this_present_predicate && that_present_predicate)) return false; if (!this.predicate.equals(that.predicate)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Deletion struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTimestamp()) { optionals.set(0); } if (struct.isSetSuper_column()) { optionals.set(1); } if (struct.isSetPredicate()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetSuper_column()) { oprot.writeBinary(struct.super_column); } if (struct.isSetPredicate()) { struct.predicate.write(oprot); } }
public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (!metadata.isSuper() && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard table (KeySpace=%s Table=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = FBUtilities.timestampMicros(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative table " + metadata.cfName); } }
public static void validateDeletion(CFMetaData metadata, Deletion del) throws org.apache.cassandra.exceptions.InvalidRequestException { if (del.super_column != null) validateColumnNames(metadata, (ByteBuffer)null, Arrays.asList(del.super_column)); if (del.predicate != null) validateSlicePredicate(metadata, del.super_column, del.predicate); if (!metadata.isSuper() && del.super_column != null) { String msg = String.format("Deletion of super columns is not possible on a standard table (KeySpace=%s Table=%s Deletion=%s)", metadata.ksName, metadata.cfName, del); throw new org.apache.cassandra.exceptions.InvalidRequestException(msg); } if (metadata.isCounter()) { // forcing server timestamp even if a timestamp was set for coherence with other counter operation del.timestamp = FBUtilities.timestampMicros(); } else if (!del.isSetTimestamp()) { throw new org.apache.cassandra.exceptions.InvalidRequestException("Deletion timestamp is not optional for non commutative table " + metadata.cfName); } }