public void read(org.apache.thrift.protocol.TProtocol iprot, LocationProperty 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: // PROPERTY if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.property = new LocationPropertyValue(); struct.property.read(iprot); struct.setPropertyIsSet(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(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, LocationProperty struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.property = new LocationPropertyValue(); struct.property.read(iprot); struct.setPropertyIsSet(true); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, LocationProperty struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetProperty()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetProperty()) { struct.property.write(oprot); } }
public int compareTo(LocationProperty other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; LocationProperty typedOther = (LocationProperty) other; lastComparison = Boolean.valueOf(isSetProperty()).compareTo(typedOther.isSetProperty()); if (lastComparison != 0) { return lastComparison; } if (isSetProperty()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.property, typedOther.property); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(LocationProperty that) { if (that == null) return false; boolean this_present_property = true && this.isSetProperty(); boolean that_present_property = true && that.isSetProperty(); if (this_present_property || that_present_property) { if (!(this_present_property && that_present_property)) return false; if (!this.property.equals(that.property)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, LocationProperty struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.property != null) { oprot.writeFieldBegin(PROPERTY_FIELD_DESC); struct.property.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** Performs a deep copy on <i>other</i>. */ public LocationProperty(LocationProperty other) { if (other.isSetProperty()) { this.property = new LocationPropertyValue(other.property); } }