Subversion Repositories SmartDukaan

Rev

Rev 7792 | Rev 7936 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7792 Rev 7822
Line 1001... Line 1001...
1001
 
1001
 
1002
    public List<Order> getOrdersByAmazonOrderCode(String amazonId) throws org.apache.thrift.TException;
1002
    public List<Order> getOrdersByAmazonOrderCode(String amazonId) throws org.apache.thrift.TException;
1003
 
1003
 
1004
    public boolean convertStoreToNormal(long orderId) throws org.apache.thrift.TException;
1004
    public boolean convertStoreToNormal(long orderId) throws org.apache.thrift.TException;
1005
 
1005
 
-
 
1006
    public Order updateFreebieItem(long orderId, long newFreebieItemId) throws org.apache.thrift.TException;
-
 
1007
 
1006
  }
1008
  }
1007
 
1009
 
1008
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
1010
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
1009
 
1011
 
1010
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
1012
    public void createTransaction(Transaction transaction, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createTransaction_call> resultHandler) throws org.apache.thrift.TException;
Line 1391... Line 1393...
1391
 
1393
 
1392
    public void getOrdersByAmazonOrderCode(String amazonId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOrdersByAmazonOrderCode_call> resultHandler) throws org.apache.thrift.TException;
1394
    public void getOrdersByAmazonOrderCode(String amazonId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOrdersByAmazonOrderCode_call> resultHandler) throws org.apache.thrift.TException;
1393
 
1395
 
1394
    public void convertStoreToNormal(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.convertStoreToNormal_call> resultHandler) throws org.apache.thrift.TException;
1396
    public void convertStoreToNormal(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.convertStoreToNormal_call> resultHandler) throws org.apache.thrift.TException;
1395
 
1397
 
-
 
1398
    public void updateFreebieItem(long orderId, long newFreebieItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateFreebieItem_call> resultHandler) throws org.apache.thrift.TException;
-
 
1399
 
1396
  }
1400
  }
1397
 
1401
 
1398
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1402
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
1399
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1403
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
1400
      public Factory() {}
1404
      public Factory() {}
Line 6216... Line 6220...
6216
        return result.success;
6220
        return result.success;
6217
      }
6221
      }
6218
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "convertStoreToNormal failed: unknown result");
6222
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "convertStoreToNormal failed: unknown result");
6219
    }
6223
    }
6220
 
6224
 
-
 
6225
    public Order updateFreebieItem(long orderId, long newFreebieItemId) throws org.apache.thrift.TException
-
 
6226
    {
-
 
6227
      send_updateFreebieItem(orderId, newFreebieItemId);
-
 
6228
      return recv_updateFreebieItem();
-
 
6229
    }
-
 
6230
 
-
 
6231
    public void send_updateFreebieItem(long orderId, long newFreebieItemId) throws org.apache.thrift.TException
-
 
6232
    {
-
 
6233
      updateFreebieItem_args args = new updateFreebieItem_args();
-
 
6234
      args.setOrderId(orderId);
-
 
6235
      args.setNewFreebieItemId(newFreebieItemId);
-
 
6236
      sendBase("updateFreebieItem", args);
-
 
6237
    }
-
 
6238
 
-
 
6239
    public Order recv_updateFreebieItem() throws org.apache.thrift.TException
-
 
6240
    {
-
 
6241
      updateFreebieItem_result result = new updateFreebieItem_result();
-
 
6242
      receiveBase(result, "updateFreebieItem");
-
 
6243
      if (result.isSetSuccess()) {
-
 
6244
        return result.success;
-
 
6245
      }
-
 
6246
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateFreebieItem failed: unknown result");
-
 
6247
    }
-
 
6248
 
6221
  }
6249
  }
6222
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
6250
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
6223
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
6251
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
6224
      private org.apache.thrift.async.TAsyncClientManager clientManager;
6252
      private org.apache.thrift.async.TAsyncClientManager clientManager;
6225
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
6253
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 12962... Line 12990...
12962
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
12990
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
12963
        return (new Client(prot)).recv_convertStoreToNormal();
12991
        return (new Client(prot)).recv_convertStoreToNormal();
12964
      }
12992
      }
12965
    }
12993
    }
12966
 
12994
 
-
 
12995
    public void updateFreebieItem(long orderId, long newFreebieItemId, org.apache.thrift.async.AsyncMethodCallback<updateFreebieItem_call> resultHandler) throws org.apache.thrift.TException {
-
 
12996
      checkReady();
-
 
12997
      updateFreebieItem_call method_call = new updateFreebieItem_call(orderId, newFreebieItemId, resultHandler, this, ___protocolFactory, ___transport);
-
 
12998
      this.___currentMethod = method_call;
-
 
12999
      ___manager.call(method_call);
-
 
13000
    }
-
 
13001
 
-
 
13002
    public static class updateFreebieItem_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
13003
      private long orderId;
-
 
13004
      private long newFreebieItemId;
-
 
13005
      public updateFreebieItem_call(long orderId, long newFreebieItemId, org.apache.thrift.async.AsyncMethodCallback<updateFreebieItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
13006
        super(client, protocolFactory, transport, resultHandler, false);
-
 
13007
        this.orderId = orderId;
-
 
13008
        this.newFreebieItemId = newFreebieItemId;
-
 
13009
      }
-
 
13010
 
-
 
13011
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
13012
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateFreebieItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
13013
        updateFreebieItem_args args = new updateFreebieItem_args();
-
 
13014
        args.setOrderId(orderId);
-
 
13015
        args.setNewFreebieItemId(newFreebieItemId);
-
 
13016
        args.write(prot);
-
 
13017
        prot.writeMessageEnd();
-
 
13018
      }
-
 
13019
 
-
 
13020
      public Order getResult() throws org.apache.thrift.TException {
-
 
13021
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
13022
          throw new IllegalStateException("Method call not finished!");
-
 
13023
        }
-
 
13024
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
13025
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
13026
        return (new Client(prot)).recv_updateFreebieItem();
-
 
13027
      }
-
 
13028
    }
-
 
13029
 
12967
  }
13030
  }
12968
 
13031
 
12969
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
13032
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
12970
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
13033
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
12971
    public Processor(I iface) {
13034
    public Processor(I iface) {
Line 13168... Line 13231...
13168
      processMap.put("updateTimestampForAmazonOrder", new updateTimestampForAmazonOrder());
13231
      processMap.put("updateTimestampForAmazonOrder", new updateTimestampForAmazonOrder());
13169
      processMap.put("updateSourceDetailTimestamp", new updateSourceDetailTimestamp());
13232
      processMap.put("updateSourceDetailTimestamp", new updateSourceDetailTimestamp());
13170
      processMap.put("getOrdersByMobileNumber", new getOrdersByMobileNumber());
13233
      processMap.put("getOrdersByMobileNumber", new getOrdersByMobileNumber());
13171
      processMap.put("getOrdersByAmazonOrderCode", new getOrdersByAmazonOrderCode());
13234
      processMap.put("getOrdersByAmazonOrderCode", new getOrdersByAmazonOrderCode());
13172
      processMap.put("convertStoreToNormal", new convertStoreToNormal());
13235
      processMap.put("convertStoreToNormal", new convertStoreToNormal());
-
 
13236
      processMap.put("updateFreebieItem", new updateFreebieItem());
13173
      return processMap;
13237
      return processMap;
13174
    }
13238
    }
13175
 
13239
 
13176
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
13240
    private static class createTransaction<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createTransaction_args> {
13177
      public createTransaction() {
13241
      public createTransaction() {
Line 16703... Line 16767...
16703
        result.setSuccessIsSet(true);
16767
        result.setSuccessIsSet(true);
16704
        return result;
16768
        return result;
16705
      }
16769
      }
16706
    }
16770
    }
16707
 
16771
 
-
 
16772
    private static class updateFreebieItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateFreebieItem_args> {
-
 
16773
      public updateFreebieItem() {
-
 
16774
        super("updateFreebieItem");
-
 
16775
      }
-
 
16776
 
-
 
16777
      protected updateFreebieItem_args getEmptyArgsInstance() {
-
 
16778
        return new updateFreebieItem_args();
-
 
16779
      }
-
 
16780
 
-
 
16781
      protected updateFreebieItem_result getResult(I iface, updateFreebieItem_args args) throws org.apache.thrift.TException {
-
 
16782
        updateFreebieItem_result result = new updateFreebieItem_result();
-
 
16783
        result.success = iface.updateFreebieItem(args.orderId, args.newFreebieItemId);
-
 
16784
        return result;
-
 
16785
      }
-
 
16786
    }
-
 
16787
 
16708
  }
16788
  }
16709
 
16789
 
16710
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
16790
  public static class createTransaction_args implements org.apache.thrift.TBase<createTransaction_args, createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
16711
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
16791
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTransaction_args");
16712
 
16792
 
Line 61324... Line 61404...
61324
      }
61404
      }
61325
    }
61405
    }
61326
 
61406
 
61327
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
61407
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
61328
      try {
61408
      try {
-
 
61409
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
61410
        __isset_bit_vector = new BitSet(1);
61329
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
61411
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
61330
      } catch (org.apache.thrift.TException te) {
61412
      } catch (org.apache.thrift.TException te) {
61331
        throw new java.io.IOException(te);
61413
        throw new java.io.IOException(te);
61332
      }
61414
      }
61333
    }
61415
    }
Line 154856... Line 154938...
154856
      first = false;
154938
      first = false;
154857
      sb.append(")");
154939
      sb.append(")");
154858
      return sb.toString();
154940
      return sb.toString();
154859
    }
154941
    }
154860
 
154942
 
-
 
154943
    public void validate() throws org.apache.thrift.TException {
-
 
154944
      // check for required fields
-
 
154945
    }
-
 
154946
 
-
 
154947
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
154948
      try {
-
 
154949
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
154950
      } catch (org.apache.thrift.TException te) {
-
 
154951
        throw new java.io.IOException(te);
-
 
154952
      }
-
 
154953
    }
-
 
154954
 
-
 
154955
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
154956
      try {
-
 
154957
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
154958
      } catch (org.apache.thrift.TException te) {
-
 
154959
        throw new java.io.IOException(te);
-
 
154960
      }
-
 
154961
    }
-
 
154962
 
-
 
154963
  }
-
 
154964
 
-
 
154965
  public static class updateFreebieItem_args implements org.apache.thrift.TBase<updateFreebieItem_args, updateFreebieItem_args._Fields>, java.io.Serializable, Cloneable   {
-
 
154966
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateFreebieItem_args");
-
 
154967
 
-
 
154968
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
154969
    private static final org.apache.thrift.protocol.TField NEW_FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newFreebieItemId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
154970
 
-
 
154971
    private long orderId; // required
-
 
154972
    private long newFreebieItemId; // required
-
 
154973
 
-
 
154974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
154975
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
154976
      ORDER_ID((short)1, "orderId"),
-
 
154977
      NEW_FREEBIE_ITEM_ID((short)2, "newFreebieItemId");
-
 
154978
 
-
 
154979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
154980
 
-
 
154981
      static {
-
 
154982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
154983
          byName.put(field.getFieldName(), field);
-
 
154984
        }
-
 
154985
      }
-
 
154986
 
-
 
154987
      /**
-
 
154988
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
154989
       */
-
 
154990
      public static _Fields findByThriftId(int fieldId) {
-
 
154991
        switch(fieldId) {
-
 
154992
          case 1: // ORDER_ID
-
 
154993
            return ORDER_ID;
-
 
154994
          case 2: // NEW_FREEBIE_ITEM_ID
-
 
154995
            return NEW_FREEBIE_ITEM_ID;
-
 
154996
          default:
-
 
154997
            return null;
-
 
154998
        }
-
 
154999
      }
-
 
155000
 
-
 
155001
      /**
-
 
155002
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
155003
       * if it is not found.
-
 
155004
       */
-
 
155005
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
155006
        _Fields fields = findByThriftId(fieldId);
-
 
155007
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
155008
        return fields;
-
 
155009
      }
-
 
155010
 
-
 
155011
      /**
-
 
155012
       * Find the _Fields constant that matches name, or null if its not found.
-
 
155013
       */
-
 
155014
      public static _Fields findByName(String name) {
-
 
155015
        return byName.get(name);
-
 
155016
      }
-
 
155017
 
-
 
155018
      private final short _thriftId;
-
 
155019
      private final String _fieldName;
-
 
155020
 
-
 
155021
      _Fields(short thriftId, String fieldName) {
-
 
155022
        _thriftId = thriftId;
-
 
155023
        _fieldName = fieldName;
-
 
155024
      }
-
 
155025
 
-
 
155026
      public short getThriftFieldId() {
-
 
155027
        return _thriftId;
-
 
155028
      }
-
 
155029
 
-
 
155030
      public String getFieldName() {
-
 
155031
        return _fieldName;
-
 
155032
      }
-
 
155033
    }
-
 
155034
 
-
 
155035
    // isset id assignments
-
 
155036
    private static final int __ORDERID_ISSET_ID = 0;
-
 
155037
    private static final int __NEWFREEBIEITEMID_ISSET_ID = 1;
-
 
155038
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
155039
 
-
 
155040
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
155041
    static {
-
 
155042
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
155043
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
155044
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
155045
      tmpMap.put(_Fields.NEW_FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("newFreebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
155046
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
155047
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
155048
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateFreebieItem_args.class, metaDataMap);
-
 
155049
    }
-
 
155050
 
-
 
155051
    public updateFreebieItem_args() {
-
 
155052
    }
-
 
155053
 
-
 
155054
    public updateFreebieItem_args(
-
 
155055
      long orderId,
-
 
155056
      long newFreebieItemId)
-
 
155057
    {
-
 
155058
      this();
-
 
155059
      this.orderId = orderId;
-
 
155060
      setOrderIdIsSet(true);
-
 
155061
      this.newFreebieItemId = newFreebieItemId;
-
 
155062
      setNewFreebieItemIdIsSet(true);
-
 
155063
    }
-
 
155064
 
-
 
155065
    /**
-
 
155066
     * Performs a deep copy on <i>other</i>.
-
 
155067
     */
-
 
155068
    public updateFreebieItem_args(updateFreebieItem_args other) {
-
 
155069
      __isset_bit_vector.clear();
-
 
155070
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
155071
      this.orderId = other.orderId;
-
 
155072
      this.newFreebieItemId = other.newFreebieItemId;
-
 
155073
    }
-
 
155074
 
-
 
155075
    public updateFreebieItem_args deepCopy() {
-
 
155076
      return new updateFreebieItem_args(this);
-
 
155077
    }
-
 
155078
 
-
 
155079
    @Override
-
 
155080
    public void clear() {
-
 
155081
      setOrderIdIsSet(false);
-
 
155082
      this.orderId = 0;
-
 
155083
      setNewFreebieItemIdIsSet(false);
-
 
155084
      this.newFreebieItemId = 0;
-
 
155085
    }
-
 
155086
 
-
 
155087
    public long getOrderId() {
-
 
155088
      return this.orderId;
-
 
155089
    }
-
 
155090
 
-
 
155091
    public void setOrderId(long orderId) {
-
 
155092
      this.orderId = orderId;
-
 
155093
      setOrderIdIsSet(true);
-
 
155094
    }
-
 
155095
 
-
 
155096
    public void unsetOrderId() {
-
 
155097
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
-
 
155098
    }
-
 
155099
 
-
 
155100
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
-
 
155101
    public boolean isSetOrderId() {
-
 
155102
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
-
 
155103
    }
-
 
155104
 
-
 
155105
    public void setOrderIdIsSet(boolean value) {
-
 
155106
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
-
 
155107
    }
-
 
155108
 
-
 
155109
    public long getNewFreebieItemId() {
-
 
155110
      return this.newFreebieItemId;
-
 
155111
    }
-
 
155112
 
-
 
155113
    public void setNewFreebieItemId(long newFreebieItemId) {
-
 
155114
      this.newFreebieItemId = newFreebieItemId;
-
 
155115
      setNewFreebieItemIdIsSet(true);
-
 
155116
    }
-
 
155117
 
-
 
155118
    public void unsetNewFreebieItemId() {
-
 
155119
      __isset_bit_vector.clear(__NEWFREEBIEITEMID_ISSET_ID);
-
 
155120
    }
-
 
155121
 
-
 
155122
    /** Returns true if field newFreebieItemId is set (has been assigned a value) and false otherwise */
-
 
155123
    public boolean isSetNewFreebieItemId() {
-
 
155124
      return __isset_bit_vector.get(__NEWFREEBIEITEMID_ISSET_ID);
-
 
155125
    }
-
 
155126
 
-
 
155127
    public void setNewFreebieItemIdIsSet(boolean value) {
-
 
155128
      __isset_bit_vector.set(__NEWFREEBIEITEMID_ISSET_ID, value);
-
 
155129
    }
-
 
155130
 
-
 
155131
    public void setFieldValue(_Fields field, Object value) {
-
 
155132
      switch (field) {
-
 
155133
      case ORDER_ID:
-
 
155134
        if (value == null) {
-
 
155135
          unsetOrderId();
-
 
155136
        } else {
-
 
155137
          setOrderId((Long)value);
-
 
155138
        }
-
 
155139
        break;
-
 
155140
 
-
 
155141
      case NEW_FREEBIE_ITEM_ID:
-
 
155142
        if (value == null) {
-
 
155143
          unsetNewFreebieItemId();
-
 
155144
        } else {
-
 
155145
          setNewFreebieItemId((Long)value);
-
 
155146
        }
-
 
155147
        break;
-
 
155148
 
-
 
155149
      }
-
 
155150
    }
-
 
155151
 
-
 
155152
    public Object getFieldValue(_Fields field) {
-
 
155153
      switch (field) {
-
 
155154
      case ORDER_ID:
-
 
155155
        return Long.valueOf(getOrderId());
-
 
155156
 
-
 
155157
      case NEW_FREEBIE_ITEM_ID:
-
 
155158
        return Long.valueOf(getNewFreebieItemId());
-
 
155159
 
-
 
155160
      }
-
 
155161
      throw new IllegalStateException();
-
 
155162
    }
-
 
155163
 
-
 
155164
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
155165
    public boolean isSet(_Fields field) {
-
 
155166
      if (field == null) {
-
 
155167
        throw new IllegalArgumentException();
-
 
155168
      }
-
 
155169
 
-
 
155170
      switch (field) {
-
 
155171
      case ORDER_ID:
-
 
155172
        return isSetOrderId();
-
 
155173
      case NEW_FREEBIE_ITEM_ID:
-
 
155174
        return isSetNewFreebieItemId();
-
 
155175
      }
-
 
155176
      throw new IllegalStateException();
-
 
155177
    }
-
 
155178
 
-
 
155179
    @Override
-
 
155180
    public boolean equals(Object that) {
-
 
155181
      if (that == null)
-
 
155182
        return false;
-
 
155183
      if (that instanceof updateFreebieItem_args)
-
 
155184
        return this.equals((updateFreebieItem_args)that);
-
 
155185
      return false;
-
 
155186
    }
-
 
155187
 
-
 
155188
    public boolean equals(updateFreebieItem_args that) {
-
 
155189
      if (that == null)
-
 
155190
        return false;
-
 
155191
 
-
 
155192
      boolean this_present_orderId = true;
-
 
155193
      boolean that_present_orderId = true;
-
 
155194
      if (this_present_orderId || that_present_orderId) {
-
 
155195
        if (!(this_present_orderId && that_present_orderId))
-
 
155196
          return false;
-
 
155197
        if (this.orderId != that.orderId)
-
 
155198
          return false;
-
 
155199
      }
-
 
155200
 
-
 
155201
      boolean this_present_newFreebieItemId = true;
-
 
155202
      boolean that_present_newFreebieItemId = true;
-
 
155203
      if (this_present_newFreebieItemId || that_present_newFreebieItemId) {
-
 
155204
        if (!(this_present_newFreebieItemId && that_present_newFreebieItemId))
-
 
155205
          return false;
-
 
155206
        if (this.newFreebieItemId != that.newFreebieItemId)
-
 
155207
          return false;
-
 
155208
      }
-
 
155209
 
-
 
155210
      return true;
-
 
155211
    }
-
 
155212
 
-
 
155213
    @Override
-
 
155214
    public int hashCode() {
-
 
155215
      return 0;
-
 
155216
    }
-
 
155217
 
-
 
155218
    public int compareTo(updateFreebieItem_args other) {
-
 
155219
      if (!getClass().equals(other.getClass())) {
-
 
155220
        return getClass().getName().compareTo(other.getClass().getName());
-
 
155221
      }
-
 
155222
 
-
 
155223
      int lastComparison = 0;
-
 
155224
      updateFreebieItem_args typedOther = (updateFreebieItem_args)other;
-
 
155225
 
-
 
155226
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
-
 
155227
      if (lastComparison != 0) {
-
 
155228
        return lastComparison;
-
 
155229
      }
-
 
155230
      if (isSetOrderId()) {
-
 
155231
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
-
 
155232
        if (lastComparison != 0) {
-
 
155233
          return lastComparison;
-
 
155234
        }
-
 
155235
      }
-
 
155236
      lastComparison = Boolean.valueOf(isSetNewFreebieItemId()).compareTo(typedOther.isSetNewFreebieItemId());
-
 
155237
      if (lastComparison != 0) {
-
 
155238
        return lastComparison;
-
 
155239
      }
-
 
155240
      if (isSetNewFreebieItemId()) {
-
 
155241
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newFreebieItemId, typedOther.newFreebieItemId);
-
 
155242
        if (lastComparison != 0) {
-
 
155243
          return lastComparison;
-
 
155244
        }
-
 
155245
      }
-
 
155246
      return 0;
-
 
155247
    }
-
 
155248
 
-
 
155249
    public _Fields fieldForId(int fieldId) {
-
 
155250
      return _Fields.findByThriftId(fieldId);
-
 
155251
    }
-
 
155252
 
-
 
155253
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
155254
      org.apache.thrift.protocol.TField field;
-
 
155255
      iprot.readStructBegin();
-
 
155256
      while (true)
-
 
155257
      {
-
 
155258
        field = iprot.readFieldBegin();
-
 
155259
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
155260
          break;
-
 
155261
        }
-
 
155262
        switch (field.id) {
-
 
155263
          case 1: // ORDER_ID
-
 
155264
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
155265
              this.orderId = iprot.readI64();
-
 
155266
              setOrderIdIsSet(true);
-
 
155267
            } else { 
-
 
155268
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
155269
            }
-
 
155270
            break;
-
 
155271
          case 2: // NEW_FREEBIE_ITEM_ID
-
 
155272
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
155273
              this.newFreebieItemId = iprot.readI64();
-
 
155274
              setNewFreebieItemIdIsSet(true);
-
 
155275
            } else { 
-
 
155276
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
155277
            }
-
 
155278
            break;
-
 
155279
          default:
-
 
155280
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
155281
        }
-
 
155282
        iprot.readFieldEnd();
-
 
155283
      }
-
 
155284
      iprot.readStructEnd();
-
 
155285
      validate();
-
 
155286
    }
-
 
155287
 
-
 
155288
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
155289
      validate();
-
 
155290
 
-
 
155291
      oprot.writeStructBegin(STRUCT_DESC);
-
 
155292
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
-
 
155293
      oprot.writeI64(this.orderId);
-
 
155294
      oprot.writeFieldEnd();
-
 
155295
      oprot.writeFieldBegin(NEW_FREEBIE_ITEM_ID_FIELD_DESC);
-
 
155296
      oprot.writeI64(this.newFreebieItemId);
-
 
155297
      oprot.writeFieldEnd();
-
 
155298
      oprot.writeFieldStop();
-
 
155299
      oprot.writeStructEnd();
-
 
155300
    }
-
 
155301
 
-
 
155302
    @Override
-
 
155303
    public String toString() {
-
 
155304
      StringBuilder sb = new StringBuilder("updateFreebieItem_args(");
-
 
155305
      boolean first = true;
-
 
155306
 
-
 
155307
      sb.append("orderId:");
-
 
155308
      sb.append(this.orderId);
-
 
155309
      first = false;
-
 
155310
      if (!first) sb.append(", ");
-
 
155311
      sb.append("newFreebieItemId:");
-
 
155312
      sb.append(this.newFreebieItemId);
-
 
155313
      first = false;
-
 
155314
      sb.append(")");
-
 
155315
      return sb.toString();
-
 
155316
    }
-
 
155317
 
-
 
155318
    public void validate() throws org.apache.thrift.TException {
-
 
155319
      // check for required fields
-
 
155320
    }
-
 
155321
 
-
 
155322
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
155323
      try {
-
 
155324
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
155325
      } catch (org.apache.thrift.TException te) {
-
 
155326
        throw new java.io.IOException(te);
-
 
155327
      }
-
 
155328
    }
-
 
155329
 
-
 
155330
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
155331
      try {
-
 
155332
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
155333
        __isset_bit_vector = new BitSet(1);
-
 
155334
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
155335
      } catch (org.apache.thrift.TException te) {
-
 
155336
        throw new java.io.IOException(te);
-
 
155337
      }
-
 
155338
    }
-
 
155339
 
-
 
155340
  }
-
 
155341
 
-
 
155342
  public static class updateFreebieItem_result implements org.apache.thrift.TBase<updateFreebieItem_result, updateFreebieItem_result._Fields>, java.io.Serializable, Cloneable   {
-
 
155343
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateFreebieItem_result");
-
 
155344
 
-
 
155345
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
155346
 
-
 
155347
    private Order success; // required
-
 
155348
 
-
 
155349
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
155350
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
155351
      SUCCESS((short)0, "success");
-
 
155352
 
-
 
155353
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
155354
 
-
 
155355
      static {
-
 
155356
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
155357
          byName.put(field.getFieldName(), field);
-
 
155358
        }
-
 
155359
      }
-
 
155360
 
-
 
155361
      /**
-
 
155362
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
155363
       */
-
 
155364
      public static _Fields findByThriftId(int fieldId) {
-
 
155365
        switch(fieldId) {
-
 
155366
          case 0: // SUCCESS
-
 
155367
            return SUCCESS;
-
 
155368
          default:
-
 
155369
            return null;
-
 
155370
        }
-
 
155371
      }
-
 
155372
 
-
 
155373
      /**
-
 
155374
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
155375
       * if it is not found.
-
 
155376
       */
-
 
155377
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
155378
        _Fields fields = findByThriftId(fieldId);
-
 
155379
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
155380
        return fields;
-
 
155381
      }
-
 
155382
 
-
 
155383
      /**
-
 
155384
       * Find the _Fields constant that matches name, or null if its not found.
-
 
155385
       */
-
 
155386
      public static _Fields findByName(String name) {
-
 
155387
        return byName.get(name);
-
 
155388
      }
-
 
155389
 
-
 
155390
      private final short _thriftId;
-
 
155391
      private final String _fieldName;
-
 
155392
 
-
 
155393
      _Fields(short thriftId, String fieldName) {
-
 
155394
        _thriftId = thriftId;
-
 
155395
        _fieldName = fieldName;
-
 
155396
      }
-
 
155397
 
-
 
155398
      public short getThriftFieldId() {
-
 
155399
        return _thriftId;
-
 
155400
      }
-
 
155401
 
-
 
155402
      public String getFieldName() {
-
 
155403
        return _fieldName;
-
 
155404
      }
-
 
155405
    }
-
 
155406
 
-
 
155407
    // isset id assignments
-
 
155408
 
-
 
155409
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
155410
    static {
-
 
155411
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
155412
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
155413
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Order.class)));
-
 
155414
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
155415
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateFreebieItem_result.class, metaDataMap);
-
 
155416
    }
-
 
155417
 
-
 
155418
    public updateFreebieItem_result() {
-
 
155419
    }
-
 
155420
 
-
 
155421
    public updateFreebieItem_result(
-
 
155422
      Order success)
-
 
155423
    {
-
 
155424
      this();
-
 
155425
      this.success = success;
-
 
155426
    }
-
 
155427
 
-
 
155428
    /**
-
 
155429
     * Performs a deep copy on <i>other</i>.
-
 
155430
     */
-
 
155431
    public updateFreebieItem_result(updateFreebieItem_result other) {
-
 
155432
      if (other.isSetSuccess()) {
-
 
155433
        this.success = new Order(other.success);
-
 
155434
      }
-
 
155435
    }
-
 
155436
 
-
 
155437
    public updateFreebieItem_result deepCopy() {
-
 
155438
      return new updateFreebieItem_result(this);
-
 
155439
    }
-
 
155440
 
-
 
155441
    @Override
-
 
155442
    public void clear() {
-
 
155443
      this.success = null;
-
 
155444
    }
-
 
155445
 
-
 
155446
    public Order getSuccess() {
-
 
155447
      return this.success;
-
 
155448
    }
-
 
155449
 
-
 
155450
    public void setSuccess(Order success) {
-
 
155451
      this.success = success;
-
 
155452
    }
-
 
155453
 
-
 
155454
    public void unsetSuccess() {
-
 
155455
      this.success = null;
-
 
155456
    }
-
 
155457
 
-
 
155458
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
155459
    public boolean isSetSuccess() {
-
 
155460
      return this.success != null;
-
 
155461
    }
-
 
155462
 
-
 
155463
    public void setSuccessIsSet(boolean value) {
-
 
155464
      if (!value) {
-
 
155465
        this.success = null;
-
 
155466
      }
-
 
155467
    }
-
 
155468
 
-
 
155469
    public void setFieldValue(_Fields field, Object value) {
-
 
155470
      switch (field) {
-
 
155471
      case SUCCESS:
-
 
155472
        if (value == null) {
-
 
155473
          unsetSuccess();
-
 
155474
        } else {
-
 
155475
          setSuccess((Order)value);
-
 
155476
        }
-
 
155477
        break;
-
 
155478
 
-
 
155479
      }
-
 
155480
    }
-
 
155481
 
-
 
155482
    public Object getFieldValue(_Fields field) {
-
 
155483
      switch (field) {
-
 
155484
      case SUCCESS:
-
 
155485
        return getSuccess();
-
 
155486
 
-
 
155487
      }
-
 
155488
      throw new IllegalStateException();
-
 
155489
    }
-
 
155490
 
-
 
155491
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
155492
    public boolean isSet(_Fields field) {
-
 
155493
      if (field == null) {
-
 
155494
        throw new IllegalArgumentException();
-
 
155495
      }
-
 
155496
 
-
 
155497
      switch (field) {
-
 
155498
      case SUCCESS:
-
 
155499
        return isSetSuccess();
-
 
155500
      }
-
 
155501
      throw new IllegalStateException();
-
 
155502
    }
-
 
155503
 
-
 
155504
    @Override
-
 
155505
    public boolean equals(Object that) {
-
 
155506
      if (that == null)
-
 
155507
        return false;
-
 
155508
      if (that instanceof updateFreebieItem_result)
-
 
155509
        return this.equals((updateFreebieItem_result)that);
-
 
155510
      return false;
-
 
155511
    }
-
 
155512
 
-
 
155513
    public boolean equals(updateFreebieItem_result that) {
-
 
155514
      if (that == null)
-
 
155515
        return false;
-
 
155516
 
-
 
155517
      boolean this_present_success = true && this.isSetSuccess();
-
 
155518
      boolean that_present_success = true && that.isSetSuccess();
-
 
155519
      if (this_present_success || that_present_success) {
-
 
155520
        if (!(this_present_success && that_present_success))
-
 
155521
          return false;
-
 
155522
        if (!this.success.equals(that.success))
-
 
155523
          return false;
-
 
155524
      }
-
 
155525
 
-
 
155526
      return true;
-
 
155527
    }
-
 
155528
 
-
 
155529
    @Override
-
 
155530
    public int hashCode() {
-
 
155531
      return 0;
-
 
155532
    }
-
 
155533
 
-
 
155534
    public int compareTo(updateFreebieItem_result other) {
-
 
155535
      if (!getClass().equals(other.getClass())) {
-
 
155536
        return getClass().getName().compareTo(other.getClass().getName());
-
 
155537
      }
-
 
155538
 
-
 
155539
      int lastComparison = 0;
-
 
155540
      updateFreebieItem_result typedOther = (updateFreebieItem_result)other;
-
 
155541
 
-
 
155542
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
155543
      if (lastComparison != 0) {
-
 
155544
        return lastComparison;
-
 
155545
      }
-
 
155546
      if (isSetSuccess()) {
-
 
155547
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
155548
        if (lastComparison != 0) {
-
 
155549
          return lastComparison;
-
 
155550
        }
-
 
155551
      }
-
 
155552
      return 0;
-
 
155553
    }
-
 
155554
 
-
 
155555
    public _Fields fieldForId(int fieldId) {
-
 
155556
      return _Fields.findByThriftId(fieldId);
-
 
155557
    }
-
 
155558
 
-
 
155559
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
155560
      org.apache.thrift.protocol.TField field;
-
 
155561
      iprot.readStructBegin();
-
 
155562
      while (true)
-
 
155563
      {
-
 
155564
        field = iprot.readFieldBegin();
-
 
155565
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
155566
          break;
-
 
155567
        }
-
 
155568
        switch (field.id) {
-
 
155569
          case 0: // SUCCESS
-
 
155570
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
155571
              this.success = new Order();
-
 
155572
              this.success.read(iprot);
-
 
155573
            } else { 
-
 
155574
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
155575
            }
-
 
155576
            break;
-
 
155577
          default:
-
 
155578
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
155579
        }
-
 
155580
        iprot.readFieldEnd();
-
 
155581
      }
-
 
155582
      iprot.readStructEnd();
-
 
155583
      validate();
-
 
155584
    }
-
 
155585
 
-
 
155586
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
155587
      oprot.writeStructBegin(STRUCT_DESC);
-
 
155588
 
-
 
155589
      if (this.isSetSuccess()) {
-
 
155590
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
155591
        this.success.write(oprot);
-
 
155592
        oprot.writeFieldEnd();
-
 
155593
      }
-
 
155594
      oprot.writeFieldStop();
-
 
155595
      oprot.writeStructEnd();
-
 
155596
    }
-
 
155597
 
-
 
155598
    @Override
-
 
155599
    public String toString() {
-
 
155600
      StringBuilder sb = new StringBuilder("updateFreebieItem_result(");
-
 
155601
      boolean first = true;
-
 
155602
 
-
 
155603
      sb.append("success:");
-
 
155604
      if (this.success == null) {
-
 
155605
        sb.append("null");
-
 
155606
      } else {
-
 
155607
        sb.append(this.success);
-
 
155608
      }
-
 
155609
      first = false;
-
 
155610
      sb.append(")");
-
 
155611
      return sb.toString();
-
 
155612
    }
-
 
155613
 
154861
    public void validate() throws org.apache.thrift.TException {
155614
    public void validate() throws org.apache.thrift.TException {
154862
      // check for required fields
155615
      // check for required fields
154863
    }
155616
    }
154864
 
155617
 
154865
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
155618
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {