@Override public void write(org.apache.thrift.protocol.TProtocol prot, FetchTweetQuery struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetTids()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetTids()) { { oprot.writeI32(struct.tids.size()); for (long _iter4 : struct.tids) { oprot.writeI64(_iter4); } } } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, FetchTweetQuery struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.tids = new ArrayList<Long>(_list5.size); long _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = iprot.readI64(); struct.tids.add(_elem6); } } struct.setTidsIsSet(true); } }
@Override public int compareTo(FetchTweetQuery other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTids()).compareTo(other.isSetTids()); if (lastComparison != 0) { return lastComparison; } if (isSetTids()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tids, other.tids); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(FetchTweetQuery that) { if (that == null) return false; boolean this_present_tids = true && this.isSetTids(); boolean that_present_tids = true && that.isSetTids(); if (this_present_tids || that_present_tids) { if (!(this_present_tids && that_present_tids)) return false; if (!this.tids.equals(that.tids)) return false; } return true; }
public void read(org.apache.thrift.protocol.TProtocol iprot, FetchTweetQuery 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: // TIDS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); struct.tids = new ArrayList<Long>(_list0.size); long _elem1; for (int _i2 = 0; _i2 < _list0.size; ++_i2) { _elem1 = iprot.readI64(); struct.tids.add(_elem1); } iprot.readListEnd(); } struct.setTidsIsSet(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, FetchTweetQuery struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tids != null) { oprot.writeFieldBegin(TIDS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.I64, struct.tids.size())); for (long _iter3 : struct.tids) { oprot.writeI64(_iter3); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** Performs a deep copy on <i>other</i>. */ public FetchTweetQuery(FetchTweetQuery other) { if (other.isSetTids()) { List<Long> __this__tids = new ArrayList<Long>(other.tids); this.tids = __this__tids; } }