@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_value = true && (isSetValue()); builder.append(present_value); if (present_value) builder.append(value); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_ttl = true && (isSetTtl()); builder.append(present_ttl); if (present_ttl) builder.append(ttl); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_value = true && (isSetValue()); builder.append(present_value); if (present_value) builder.append(value); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_ttl = true && (isSetTtl()); builder.append(present_ttl); if (present_ttl) builder.append(ttl); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_name = true && (isSetName()); builder.append(present_name); if (present_name) builder.append(name); boolean present_value = true && (isSetValue()); builder.append(present_value); if (present_value) builder.append(value); boolean present_timestamp = true && (isSetTimestamp()); builder.append(present_timestamp); if (present_timestamp) builder.append(timestamp); boolean present_ttl = true && (isSetTtl()); builder.append(present_ttl); if (present_ttl) builder.append(ttl); 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 NAME: return isSetName(); case VALUE: return isSetValue(); case TIMESTAMP: return isSetTimestamp(); case TTL: return isSetTtl(); } 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 NAME: return isSetName(); case VALUE: return isSetValue(); case TIMESTAMP: return isSetTimestamp(); case TTL: return isSetTtl(); } 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 NAME: return isSetName(); case VALUE: return isSetValue(); case TIMESTAMP: return isSetTimestamp(); case TTL: return isSetTtl(); } throw new IllegalStateException(); }
if (isSetTimestamp()) { if (!first) sb.append(", "); sb.append("timestamp:");
if (isSetTimestamp()) { if (!first) sb.append(", "); sb.append("timestamp:");
if (isSetTimestamp()) { if (!first) sb.append(", "); sb.append("timestamp:");
public void write(org.apache.thrift.protocol.TProtocol oprot, Column struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeBinary(struct.name); oprot.writeFieldEnd(); } if (struct.value != null) { if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(struct.value); oprot.writeFieldEnd(); } } if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.isSetTtl()) { oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI32(struct.ttl); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Column struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeBinary(struct.name); oprot.writeFieldEnd(); } if (struct.value != null) { if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(struct.value); oprot.writeFieldEnd(); } } if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.isSetTtl()) { oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI32(struct.ttl); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Column struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.name != null) { oprot.writeFieldBegin(NAME_FIELD_DESC); oprot.writeBinary(struct.name); oprot.writeFieldEnd(); } if (struct.value != null) { if (struct.isSetValue()) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(struct.value); oprot.writeFieldEnd(); } } if (struct.isSetTimestamp()) { oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); oprot.writeI64(struct.timestamp); oprot.writeFieldEnd(); } if (struct.isSetTtl()) { oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI32(struct.ttl); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Column struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeBinary(struct.name); BitSet optionals = new BitSet(); if (struct.isSetValue()) { optionals.set(0); } if (struct.isSetTimestamp()) { optionals.set(1); } if (struct.isSetTtl()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetValue()) { oprot.writeBinary(struct.value); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetTtl()) { oprot.writeI32(struct.ttl); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Column struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeBinary(struct.name); BitSet optionals = new BitSet(); if (struct.isSetValue()) { optionals.set(0); } if (struct.isSetTimestamp()) { optionals.set(1); } if (struct.isSetTtl()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetValue()) { oprot.writeBinary(struct.value); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetTtl()) { oprot.writeI32(struct.ttl); } }
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))
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))
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Column struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeBinary(struct.name); BitSet optionals = new BitSet(); if (struct.isSetValue()) { optionals.set(0); } if (struct.isSetTimestamp()) { optionals.set(1); } if (struct.isSetTtl()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetValue()) { oprot.writeBinary(struct.value); } if (struct.isSetTimestamp()) { oprot.writeI64(struct.timestamp); } if (struct.isSetTtl()) { oprot.writeI32(struct.ttl); } }
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))
/** * Validates the data part of the column (everything in the column object but the name, which is assumed to be valid) */ public static void validateColumnData(CFMetaData metadata, ByteBuffer scName, Column column) throws org.apache.cassandra.exceptions.InvalidRequestException { validateTtl(metadata, column); if (!column.isSetValue()) throw new org.apache.cassandra.exceptions.InvalidRequestException("Column value is required"); if (!column.isSetTimestamp()) throw new org.apache.cassandra.exceptions.InvalidRequestException("Column timestamp is required"); try { LegacyLayout.LegacyCellName cn = LegacyLayout.decodeCellName(metadata, scName, column.name); cn.column.type.validateCellValue(column.value); } catch (UnknownColumnException e) { throw new org.apache.cassandra.exceptions.InvalidRequestException(e.getMessage()); } catch (MarshalException me) { if (logger.isTraceEnabled()) logger.trace("rejecting invalid value {}", ByteBufferUtil.bytesToHex(summarize(column.value))); throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("(%s) [%s][%s][%s] failed validation", me.getMessage(), metadata.ksName, metadata.cfName, (getThriftColumnNameComparator(metadata, scName)).getString(column.name))); } }
/** * Validates the data part of the column (everything in the column object but the name, which is assumed to be valid) */ public static void validateColumnData(CFMetaData metadata, ByteBuffer scName, Column column) throws org.apache.cassandra.exceptions.InvalidRequestException { validateTtl(metadata, column); if (!column.isSetValue()) throw new org.apache.cassandra.exceptions.InvalidRequestException("Column value is required"); if (!column.isSetTimestamp()) throw new org.apache.cassandra.exceptions.InvalidRequestException("Column timestamp is required"); try { LegacyLayout.LegacyCellName cn = LegacyLayout.decodeCellName(metadata, scName, column.name); cn.column.type.validateCellValue(column.value); } catch (UnknownColumnException e) { throw new org.apache.cassandra.exceptions.InvalidRequestException(e.getMessage()); } catch (MarshalException me) { if (logger.isTraceEnabled()) logger.trace("rejecting invalid value {}", ByteBufferUtil.bytesToHex(summarize(column.value))); throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("(%s) [%s][%s][%s] failed validation", me.getMessage(), metadata.ksName, metadata.cfName, (getThriftColumnNameComparator(metadata, scName)).getString(column.name))); } }