public boolean equals(IndexExpression that) { if (that == null) return false; boolean this_present_column_name = true && this.isSetColumn_name(); boolean that_present_column_name = true && that.isSetColumn_name(); if (this_present_column_name || that_present_column_name) { if (!(this_present_column_name && that_present_column_name)) return false; if (!this.column_name.equals(that.column_name)) return false; } boolean this_present_op = true && this.isSetOp(); boolean that_present_op = true && that.isSetOp(); if (this_present_op || that_present_op) { if (!(this_present_op && that_present_op)) return false; if (!this.op.equals(that.op)) return false; } boolean this_present_value = true && this.isSetValue(); boolean that_present_value = true && that.isSetValue(); if (this_present_value || that_present_value) { if (!(this_present_value && that_present_value)) return false; if (!this.value.equals(that.value)) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public IndexExpression(IndexExpression other) { if (other.isSetColumn_name()) { this.column_name = org.apache.thrift.TBaseHelper.copyBinary(other.column_name); ; } if (other.isSetOp()) { this.op = other.op; } if (other.isSetValue()) { this.value = org.apache.thrift.TBaseHelper.copyBinary(other.value); ; } }
@Override public int compareTo(IndexExpression other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetColumn_name()).compareTo(other.isSetColumn_name()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_name()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_name, other.column_name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOp()).compareTo(other.isSetOp()); if (lastComparison != 0) { return lastComparison; } if (isSetOp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.op, other.op); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, IndexExpression struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.column_name = iprot.readBinary(); struct.setColumn_nameIsSet(true); struct.op = IndexOperator.findByValue(iprot.readI32()); struct.setOpIsSet(true); struct.value = iprot.readBinary(); struct.setValueIsSet(true); }
public void read(org.apache.thrift.protocol.TProtocol iprot, IndexExpression struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // COLUMN_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.column_name = iprot.readBinary(); struct.setColumn_nameIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // OP if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.op = IndexOperator.findByValue(iprot.readI32()); struct.setOpIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.value = iprot.readBinary(); struct.setValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, IndexExpression struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.column_name != null) { oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); oprot.writeBinary(struct.column_name); oprot.writeFieldEnd(); } if (struct.op != null) { oprot.writeFieldBegin(OP_FIELD_DESC); oprot.writeI32(struct.op.getValue()); oprot.writeFieldEnd(); } if (struct.value != null) { oprot.writeFieldBegin(VALUE_FIELD_DESC); oprot.writeBinary(struct.value); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }