Subversion Repositories SmartDukaan

Rev

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

Rev 7968 Rev 7972
Line 329... Line 329...
329
 
329
 
330
    public List<AmazonInventorySnapshot> getAllAmazonInventory() throws org.apache.thrift.TException;
330
    public List<AmazonInventorySnapshot> getAllAmazonInventory() throws org.apache.thrift.TException;
331
 
331
 
332
    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot) throws org.apache.thrift.TException;
332
    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot) throws org.apache.thrift.TException;
333
 
333
 
-
 
334
    public String getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException;
-
 
335
 
334
  }
336
  }
335
 
337
 
336
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
338
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
337
 
339
 
338
    public void addWarehouse(Warehouse warehouse, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addWarehouse_call> resultHandler) throws org.apache.thrift.TException;
340
    public void addWarehouse(Warehouse warehouse, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addWarehouse_call> resultHandler) throws org.apache.thrift.TException;
Line 443... Line 445...
443
 
445
 
444
    public void getAllAmazonInventory(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAmazonInventory_call> resultHandler) throws org.apache.thrift.TException;
446
    public void getAllAmazonInventory(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAmazonInventory_call> resultHandler) throws org.apache.thrift.TException;
445
 
447
 
446
    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;
448
    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;
447
 
449
 
-
 
450
    public void getLastNdaySaleForItem(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLastNdaySaleForItem_call> resultHandler) throws org.apache.thrift.TException;
-
 
451
 
448
  }
452
  }
449
 
453
 
450
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
454
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
451
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
455
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
452
      public Factory() {}
456
      public Factory() {}
Line 1789... Line 1793...
1789
      addOrUpdateAmazonInventoryForItem_result result = new addOrUpdateAmazonInventoryForItem_result();
1793
      addOrUpdateAmazonInventoryForItem_result result = new addOrUpdateAmazonInventoryForItem_result();
1790
      receiveBase(result, "addOrUpdateAmazonInventoryForItem");
1794
      receiveBase(result, "addOrUpdateAmazonInventoryForItem");
1791
      return;
1795
      return;
1792
    }
1796
    }
1793
 
1797
 
-
 
1798
    public String getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException
-
 
1799
    {
-
 
1800
      send_getLastNdaySaleForItem(itemId, numberOfDays);
-
 
1801
      return recv_getLastNdaySaleForItem();
-
 
1802
    }
-
 
1803
 
-
 
1804
    public void send_getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException
-
 
1805
    {
-
 
1806
      getLastNdaySaleForItem_args args = new getLastNdaySaleForItem_args();
-
 
1807
      args.setItemId(itemId);
-
 
1808
      args.setNumberOfDays(numberOfDays);
-
 
1809
      sendBase("getLastNdaySaleForItem", args);
-
 
1810
    }
-
 
1811
 
-
 
1812
    public String recv_getLastNdaySaleForItem() throws org.apache.thrift.TException
-
 
1813
    {
-
 
1814
      getLastNdaySaleForItem_result result = new getLastNdaySaleForItem_result();
-
 
1815
      receiveBase(result, "getLastNdaySaleForItem");
-
 
1816
      if (result.isSetSuccess()) {
-
 
1817
        return result.success;
-
 
1818
      }
-
 
1819
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLastNdaySaleForItem failed: unknown result");
-
 
1820
    }
-
 
1821
 
1794
  }
1822
  }
1795
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1823
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
1796
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1824
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
1797
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1825
      private org.apache.thrift.async.TAsyncClientManager clientManager;
1798
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
1826
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 3681... Line 3709...
3681
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3709
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
3682
        (new Client(prot)).recv_addOrUpdateAmazonInventoryForItem();
3710
        (new Client(prot)).recv_addOrUpdateAmazonInventoryForItem();
3683
      }
3711
      }
3684
    }
3712
    }
3685
 
3713
 
-
 
3714
    public void getLastNdaySaleForItem(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<getLastNdaySaleForItem_call> resultHandler) throws org.apache.thrift.TException {
-
 
3715
      checkReady();
-
 
3716
      getLastNdaySaleForItem_call method_call = new getLastNdaySaleForItem_call(itemId, numberOfDays, resultHandler, this, ___protocolFactory, ___transport);
-
 
3717
      this.___currentMethod = method_call;
-
 
3718
      ___manager.call(method_call);
-
 
3719
    }
-
 
3720
 
-
 
3721
    public static class getLastNdaySaleForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
3722
      private long itemId;
-
 
3723
      private long numberOfDays;
-
 
3724
      public getLastNdaySaleForItem_call(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<getLastNdaySaleForItem_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 {
-
 
3725
        super(client, protocolFactory, transport, resultHandler, false);
-
 
3726
        this.itemId = itemId;
-
 
3727
        this.numberOfDays = numberOfDays;
-
 
3728
      }
-
 
3729
 
-
 
3730
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
3731
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLastNdaySaleForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
3732
        getLastNdaySaleForItem_args args = new getLastNdaySaleForItem_args();
-
 
3733
        args.setItemId(itemId);
-
 
3734
        args.setNumberOfDays(numberOfDays);
-
 
3735
        args.write(prot);
-
 
3736
        prot.writeMessageEnd();
-
 
3737
      }
-
 
3738
 
-
 
3739
      public String getResult() throws org.apache.thrift.TException {
-
 
3740
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
3741
          throw new IllegalStateException("Method call not finished!");
-
 
3742
        }
-
 
3743
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
3744
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
3745
        return (new Client(prot)).recv_getLastNdaySaleForItem();
-
 
3746
      }
-
 
3747
    }
-
 
3748
 
3686
  }
3749
  }
3687
 
3750
 
3688
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
3751
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
3689
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
3752
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
3690
    public Processor(I iface) {
3753
    public Processor(I iface) {
Line 3749... Line 3812...
3749
      processMap.put("getBillableInventoryAndPendingOrders", new getBillableInventoryAndPendingOrders());
3812
      processMap.put("getBillableInventoryAndPendingOrders", new getBillableInventoryAndPendingOrders());
3750
      processMap.put("getWarehouseName", new getWarehouseName());
3813
      processMap.put("getWarehouseName", new getWarehouseName());
3751
      processMap.put("getAmazonInventoryForItem", new getAmazonInventoryForItem());
3814
      processMap.put("getAmazonInventoryForItem", new getAmazonInventoryForItem());
3752
      processMap.put("getAllAmazonInventory", new getAllAmazonInventory());
3815
      processMap.put("getAllAmazonInventory", new getAllAmazonInventory());
3753
      processMap.put("addOrUpdateAmazonInventoryForItem", new addOrUpdateAmazonInventoryForItem());
3816
      processMap.put("addOrUpdateAmazonInventoryForItem", new addOrUpdateAmazonInventoryForItem());
-
 
3817
      processMap.put("getLastNdaySaleForItem", new getLastNdaySaleForItem());
3754
      return processMap;
3818
      return processMap;
3755
    }
3819
    }
3756
 
3820
 
3757
    private static class addWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addWarehouse_args> {
3821
    private static class addWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addWarehouse_args> {
3758
      public addWarehouse() {
3822
      public addWarehouse() {
Line 4735... Line 4799...
4735
        iface.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot);
4799
        iface.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot);
4736
        return result;
4800
        return result;
4737
      }
4801
      }
4738
    }
4802
    }
4739
 
4803
 
-
 
4804
    private static class getLastNdaySaleForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLastNdaySaleForItem_args> {
-
 
4805
      public getLastNdaySaleForItem() {
-
 
4806
        super("getLastNdaySaleForItem");
-
 
4807
      }
-
 
4808
 
-
 
4809
      protected getLastNdaySaleForItem_args getEmptyArgsInstance() {
-
 
4810
        return new getLastNdaySaleForItem_args();
-
 
4811
      }
-
 
4812
 
-
 
4813
      protected getLastNdaySaleForItem_result getResult(I iface, getLastNdaySaleForItem_args args) throws org.apache.thrift.TException {
-
 
4814
        getLastNdaySaleForItem_result result = new getLastNdaySaleForItem_result();
-
 
4815
        result.success = iface.getLastNdaySaleForItem(args.itemId, args.numberOfDays);
-
 
4816
        return result;
-
 
4817
      }
-
 
4818
    }
-
 
4819
 
4740
  }
4820
  }
4741
 
4821
 
4742
  public static class addWarehouse_args implements org.apache.thrift.TBase<addWarehouse_args, addWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
4822
  public static class addWarehouse_args implements org.apache.thrift.TBase<addWarehouse_args, addWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
4743
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addWarehouse_args");
4823
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addWarehouse_args");
4744
 
4824
 
Line 41749... Line 41829...
41749
      sb.append(")");
41829
      sb.append(")");
41750
      return sb.toString();
41830
      return sb.toString();
41751
    }
41831
    }
41752
 
41832
 
41753
    public void validate() throws org.apache.thrift.TException {
41833
    public void validate() throws org.apache.thrift.TException {
-
 
41834
      // check for required fields
-
 
41835
    }
-
 
41836
 
-
 
41837
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
41838
      try {
-
 
41839
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
41840
      } catch (org.apache.thrift.TException te) {
-
 
41841
        throw new java.io.IOException(te);
-
 
41842
      }
-
 
41843
    }
-
 
41844
 
-
 
41845
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
41846
      try {
-
 
41847
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
41848
      } catch (org.apache.thrift.TException te) {
-
 
41849
        throw new java.io.IOException(te);
-
 
41850
      }
-
 
41851
    }
-
 
41852
 
-
 
41853
  }
-
 
41854
 
-
 
41855
  public static class getLastNdaySaleForItem_args implements org.apache.thrift.TBase<getLastNdaySaleForItem_args, getLastNdaySaleForItem_args._Fields>, java.io.Serializable, Cloneable   {
-
 
41856
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLastNdaySaleForItem_args");
-
 
41857
 
-
 
41858
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
41859
    private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDays", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
41860
 
-
 
41861
    private long itemId; // required
-
 
41862
    private long numberOfDays; // required
-
 
41863
 
-
 
41864
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
41865
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
41866
      ITEM_ID((short)1, "itemId"),
-
 
41867
      NUMBER_OF_DAYS((short)2, "numberOfDays");
-
 
41868
 
-
 
41869
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
41870
 
-
 
41871
      static {
-
 
41872
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
41873
          byName.put(field.getFieldName(), field);
-
 
41874
        }
-
 
41875
      }
-
 
41876
 
-
 
41877
      /**
-
 
41878
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
41879
       */
-
 
41880
      public static _Fields findByThriftId(int fieldId) {
-
 
41881
        switch(fieldId) {
-
 
41882
          case 1: // ITEM_ID
-
 
41883
            return ITEM_ID;
-
 
41884
          case 2: // NUMBER_OF_DAYS
-
 
41885
            return NUMBER_OF_DAYS;
-
 
41886
          default:
-
 
41887
            return null;
-
 
41888
        }
-
 
41889
      }
-
 
41890
 
-
 
41891
      /**
-
 
41892
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
41893
       * if it is not found.
-
 
41894
       */
-
 
41895
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
41896
        _Fields fields = findByThriftId(fieldId);
-
 
41897
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
41898
        return fields;
-
 
41899
      }
-
 
41900
 
-
 
41901
      /**
-
 
41902
       * Find the _Fields constant that matches name, or null if its not found.
-
 
41903
       */
-
 
41904
      public static _Fields findByName(String name) {
-
 
41905
        return byName.get(name);
-
 
41906
      }
-
 
41907
 
-
 
41908
      private final short _thriftId;
-
 
41909
      private final String _fieldName;
-
 
41910
 
-
 
41911
      _Fields(short thriftId, String fieldName) {
-
 
41912
        _thriftId = thriftId;
-
 
41913
        _fieldName = fieldName;
-
 
41914
      }
-
 
41915
 
-
 
41916
      public short getThriftFieldId() {
-
 
41917
        return _thriftId;
-
 
41918
      }
-
 
41919
 
-
 
41920
      public String getFieldName() {
-
 
41921
        return _fieldName;
-
 
41922
      }
-
 
41923
    }
-
 
41924
 
-
 
41925
    // isset id assignments
-
 
41926
    private static final int __ITEMID_ISSET_ID = 0;
-
 
41927
    private static final int __NUMBEROFDAYS_ISSET_ID = 1;
-
 
41928
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
41929
 
-
 
41930
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
41931
    static {
-
 
41932
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
41933
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
41934
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
41935
      tmpMap.put(_Fields.NUMBER_OF_DAYS, new org.apache.thrift.meta_data.FieldMetaData("numberOfDays", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
41936
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
41937
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
41938
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastNdaySaleForItem_args.class, metaDataMap);
-
 
41939
    }
-
 
41940
 
-
 
41941
    public getLastNdaySaleForItem_args() {
-
 
41942
    }
-
 
41943
 
-
 
41944
    public getLastNdaySaleForItem_args(
-
 
41945
      long itemId,
-
 
41946
      long numberOfDays)
-
 
41947
    {
-
 
41948
      this();
-
 
41949
      this.itemId = itemId;
-
 
41950
      setItemIdIsSet(true);
-
 
41951
      this.numberOfDays = numberOfDays;
-
 
41952
      setNumberOfDaysIsSet(true);
-
 
41953
    }
-
 
41954
 
-
 
41955
    /**
-
 
41956
     * Performs a deep copy on <i>other</i>.
-
 
41957
     */
-
 
41958
    public getLastNdaySaleForItem_args(getLastNdaySaleForItem_args other) {
-
 
41959
      __isset_bit_vector.clear();
-
 
41960
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
41961
      this.itemId = other.itemId;
-
 
41962
      this.numberOfDays = other.numberOfDays;
-
 
41963
    }
-
 
41964
 
-
 
41965
    public getLastNdaySaleForItem_args deepCopy() {
-
 
41966
      return new getLastNdaySaleForItem_args(this);
-
 
41967
    }
-
 
41968
 
-
 
41969
    @Override
-
 
41970
    public void clear() {
-
 
41971
      setItemIdIsSet(false);
-
 
41972
      this.itemId = 0;
-
 
41973
      setNumberOfDaysIsSet(false);
-
 
41974
      this.numberOfDays = 0;
-
 
41975
    }
-
 
41976
 
-
 
41977
    public long getItemId() {
-
 
41978
      return this.itemId;
-
 
41979
    }
-
 
41980
 
-
 
41981
    public void setItemId(long itemId) {
-
 
41982
      this.itemId = itemId;
-
 
41983
      setItemIdIsSet(true);
-
 
41984
    }
-
 
41985
 
-
 
41986
    public void unsetItemId() {
-
 
41987
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
41988
    }
-
 
41989
 
-
 
41990
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
41991
    public boolean isSetItemId() {
-
 
41992
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
41993
    }
-
 
41994
 
-
 
41995
    public void setItemIdIsSet(boolean value) {
-
 
41996
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
41997
    }
-
 
41998
 
-
 
41999
    public long getNumberOfDays() {
-
 
42000
      return this.numberOfDays;
-
 
42001
    }
-
 
42002
 
-
 
42003
    public void setNumberOfDays(long numberOfDays) {
-
 
42004
      this.numberOfDays = numberOfDays;
-
 
42005
      setNumberOfDaysIsSet(true);
-
 
42006
    }
-
 
42007
 
-
 
42008
    public void unsetNumberOfDays() {
-
 
42009
      __isset_bit_vector.clear(__NUMBEROFDAYS_ISSET_ID);
-
 
42010
    }
-
 
42011
 
-
 
42012
    /** Returns true if field numberOfDays is set (has been assigned a value) and false otherwise */
-
 
42013
    public boolean isSetNumberOfDays() {
-
 
42014
      return __isset_bit_vector.get(__NUMBEROFDAYS_ISSET_ID);
-
 
42015
    }
-
 
42016
 
-
 
42017
    public void setNumberOfDaysIsSet(boolean value) {
-
 
42018
      __isset_bit_vector.set(__NUMBEROFDAYS_ISSET_ID, value);
-
 
42019
    }
-
 
42020
 
-
 
42021
    public void setFieldValue(_Fields field, Object value) {
-
 
42022
      switch (field) {
-
 
42023
      case ITEM_ID:
-
 
42024
        if (value == null) {
-
 
42025
          unsetItemId();
-
 
42026
        } else {
-
 
42027
          setItemId((Long)value);
-
 
42028
        }
-
 
42029
        break;
-
 
42030
 
-
 
42031
      case NUMBER_OF_DAYS:
-
 
42032
        if (value == null) {
-
 
42033
          unsetNumberOfDays();
-
 
42034
        } else {
-
 
42035
          setNumberOfDays((Long)value);
-
 
42036
        }
-
 
42037
        break;
-
 
42038
 
-
 
42039
      }
-
 
42040
    }
-
 
42041
 
-
 
42042
    public Object getFieldValue(_Fields field) {
-
 
42043
      switch (field) {
-
 
42044
      case ITEM_ID:
-
 
42045
        return Long.valueOf(getItemId());
-
 
42046
 
-
 
42047
      case NUMBER_OF_DAYS:
-
 
42048
        return Long.valueOf(getNumberOfDays());
-
 
42049
 
-
 
42050
      }
-
 
42051
      throw new IllegalStateException();
-
 
42052
    }
-
 
42053
 
-
 
42054
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
42055
    public boolean isSet(_Fields field) {
-
 
42056
      if (field == null) {
-
 
42057
        throw new IllegalArgumentException();
-
 
42058
      }
-
 
42059
 
-
 
42060
      switch (field) {
-
 
42061
      case ITEM_ID:
-
 
42062
        return isSetItemId();
-
 
42063
      case NUMBER_OF_DAYS:
-
 
42064
        return isSetNumberOfDays();
-
 
42065
      }
-
 
42066
      throw new IllegalStateException();
-
 
42067
    }
-
 
42068
 
-
 
42069
    @Override
-
 
42070
    public boolean equals(Object that) {
-
 
42071
      if (that == null)
-
 
42072
        return false;
-
 
42073
      if (that instanceof getLastNdaySaleForItem_args)
-
 
42074
        return this.equals((getLastNdaySaleForItem_args)that);
-
 
42075
      return false;
-
 
42076
    }
-
 
42077
 
-
 
42078
    public boolean equals(getLastNdaySaleForItem_args that) {
-
 
42079
      if (that == null)
-
 
42080
        return false;
-
 
42081
 
-
 
42082
      boolean this_present_itemId = true;
-
 
42083
      boolean that_present_itemId = true;
-
 
42084
      if (this_present_itemId || that_present_itemId) {
-
 
42085
        if (!(this_present_itemId && that_present_itemId))
-
 
42086
          return false;
-
 
42087
        if (this.itemId != that.itemId)
-
 
42088
          return false;
-
 
42089
      }
-
 
42090
 
-
 
42091
      boolean this_present_numberOfDays = true;
-
 
42092
      boolean that_present_numberOfDays = true;
-
 
42093
      if (this_present_numberOfDays || that_present_numberOfDays) {
-
 
42094
        if (!(this_present_numberOfDays && that_present_numberOfDays))
-
 
42095
          return false;
-
 
42096
        if (this.numberOfDays != that.numberOfDays)
-
 
42097
          return false;
-
 
42098
      }
-
 
42099
 
-
 
42100
      return true;
-
 
42101
    }
-
 
42102
 
-
 
42103
    @Override
-
 
42104
    public int hashCode() {
-
 
42105
      return 0;
-
 
42106
    }
-
 
42107
 
-
 
42108
    public int compareTo(getLastNdaySaleForItem_args other) {
-
 
42109
      if (!getClass().equals(other.getClass())) {
-
 
42110
        return getClass().getName().compareTo(other.getClass().getName());
-
 
42111
      }
-
 
42112
 
-
 
42113
      int lastComparison = 0;
-
 
42114
      getLastNdaySaleForItem_args typedOther = (getLastNdaySaleForItem_args)other;
-
 
42115
 
-
 
42116
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
42117
      if (lastComparison != 0) {
-
 
42118
        return lastComparison;
-
 
42119
      }
-
 
42120
      if (isSetItemId()) {
-
 
42121
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
42122
        if (lastComparison != 0) {
-
 
42123
          return lastComparison;
-
 
42124
        }
-
 
42125
      }
-
 
42126
      lastComparison = Boolean.valueOf(isSetNumberOfDays()).compareTo(typedOther.isSetNumberOfDays());
-
 
42127
      if (lastComparison != 0) {
-
 
42128
        return lastComparison;
-
 
42129
      }
-
 
42130
      if (isSetNumberOfDays()) {
-
 
42131
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDays, typedOther.numberOfDays);
-
 
42132
        if (lastComparison != 0) {
-
 
42133
          return lastComparison;
-
 
42134
        }
-
 
42135
      }
-
 
42136
      return 0;
-
 
42137
    }
-
 
42138
 
-
 
42139
    public _Fields fieldForId(int fieldId) {
-
 
42140
      return _Fields.findByThriftId(fieldId);
-
 
42141
    }
-
 
42142
 
-
 
42143
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
42144
      org.apache.thrift.protocol.TField field;
-
 
42145
      iprot.readStructBegin();
-
 
42146
      while (true)
-
 
42147
      {
-
 
42148
        field = iprot.readFieldBegin();
-
 
42149
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
42150
          break;
-
 
42151
        }
-
 
42152
        switch (field.id) {
-
 
42153
          case 1: // ITEM_ID
-
 
42154
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
42155
              this.itemId = iprot.readI64();
-
 
42156
              setItemIdIsSet(true);
-
 
42157
            } else { 
-
 
42158
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
42159
            }
-
 
42160
            break;
-
 
42161
          case 2: // NUMBER_OF_DAYS
-
 
42162
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
42163
              this.numberOfDays = iprot.readI64();
-
 
42164
              setNumberOfDaysIsSet(true);
-
 
42165
            } else { 
-
 
42166
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
42167
            }
-
 
42168
            break;
-
 
42169
          default:
-
 
42170
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
42171
        }
-
 
42172
        iprot.readFieldEnd();
-
 
42173
      }
-
 
42174
      iprot.readStructEnd();
-
 
42175
      validate();
-
 
42176
    }
-
 
42177
 
-
 
42178
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
42179
      validate();
-
 
42180
 
-
 
42181
      oprot.writeStructBegin(STRUCT_DESC);
-
 
42182
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
42183
      oprot.writeI64(this.itemId);
-
 
42184
      oprot.writeFieldEnd();
-
 
42185
      oprot.writeFieldBegin(NUMBER_OF_DAYS_FIELD_DESC);
-
 
42186
      oprot.writeI64(this.numberOfDays);
-
 
42187
      oprot.writeFieldEnd();
-
 
42188
      oprot.writeFieldStop();
-
 
42189
      oprot.writeStructEnd();
-
 
42190
    }
-
 
42191
 
-
 
42192
    @Override
-
 
42193
    public String toString() {
-
 
42194
      StringBuilder sb = new StringBuilder("getLastNdaySaleForItem_args(");
-
 
42195
      boolean first = true;
-
 
42196
 
-
 
42197
      sb.append("itemId:");
-
 
42198
      sb.append(this.itemId);
-
 
42199
      first = false;
-
 
42200
      if (!first) sb.append(", ");
-
 
42201
      sb.append("numberOfDays:");
-
 
42202
      sb.append(this.numberOfDays);
-
 
42203
      first = false;
-
 
42204
      sb.append(")");
-
 
42205
      return sb.toString();
-
 
42206
    }
-
 
42207
 
-
 
42208
    public void validate() throws org.apache.thrift.TException {
-
 
42209
      // check for required fields
-
 
42210
    }
-
 
42211
 
-
 
42212
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
42213
      try {
-
 
42214
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
42215
      } catch (org.apache.thrift.TException te) {
-
 
42216
        throw new java.io.IOException(te);
-
 
42217
      }
-
 
42218
    }
-
 
42219
 
-
 
42220
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
42221
      try {
-
 
42222
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
42223
        __isset_bit_vector = new BitSet(1);
-
 
42224
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
42225
      } catch (org.apache.thrift.TException te) {
-
 
42226
        throw new java.io.IOException(te);
-
 
42227
      }
-
 
42228
    }
-
 
42229
 
-
 
42230
  }
-
 
42231
 
-
 
42232
  public static class getLastNdaySaleForItem_result implements org.apache.thrift.TBase<getLastNdaySaleForItem_result, getLastNdaySaleForItem_result._Fields>, java.io.Serializable, Cloneable   {
-
 
42233
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLastNdaySaleForItem_result");
-
 
42234
 
-
 
42235
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
-
 
42236
 
-
 
42237
    private String success; // required
-
 
42238
 
-
 
42239
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
42240
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
42241
      SUCCESS((short)0, "success");
-
 
42242
 
-
 
42243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
42244
 
-
 
42245
      static {
-
 
42246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
42247
          byName.put(field.getFieldName(), field);
-
 
42248
        }
-
 
42249
      }
-
 
42250
 
-
 
42251
      /**
-
 
42252
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
42253
       */
-
 
42254
      public static _Fields findByThriftId(int fieldId) {
-
 
42255
        switch(fieldId) {
-
 
42256
          case 0: // SUCCESS
-
 
42257
            return SUCCESS;
-
 
42258
          default:
-
 
42259
            return null;
-
 
42260
        }
-
 
42261
      }
-
 
42262
 
-
 
42263
      /**
-
 
42264
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
42265
       * if it is not found.
-
 
42266
       */
-
 
42267
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
42268
        _Fields fields = findByThriftId(fieldId);
-
 
42269
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
42270
        return fields;
-
 
42271
      }
-
 
42272
 
-
 
42273
      /**
-
 
42274
       * Find the _Fields constant that matches name, or null if its not found.
-
 
42275
       */
-
 
42276
      public static _Fields findByName(String name) {
-
 
42277
        return byName.get(name);
-
 
42278
      }
-
 
42279
 
-
 
42280
      private final short _thriftId;
-
 
42281
      private final String _fieldName;
-
 
42282
 
-
 
42283
      _Fields(short thriftId, String fieldName) {
-
 
42284
        _thriftId = thriftId;
-
 
42285
        _fieldName = fieldName;
-
 
42286
      }
-
 
42287
 
-
 
42288
      public short getThriftFieldId() {
-
 
42289
        return _thriftId;
-
 
42290
      }
-
 
42291
 
-
 
42292
      public String getFieldName() {
-
 
42293
        return _fieldName;
-
 
42294
      }
-
 
42295
    }
-
 
42296
 
-
 
42297
    // isset id assignments
-
 
42298
 
-
 
42299
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
42300
    static {
-
 
42301
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
42302
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
42303
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
42304
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
42305
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastNdaySaleForItem_result.class, metaDataMap);
-
 
42306
    }
-
 
42307
 
-
 
42308
    public getLastNdaySaleForItem_result() {
-
 
42309
    }
-
 
42310
 
-
 
42311
    public getLastNdaySaleForItem_result(
-
 
42312
      String success)
-
 
42313
    {
-
 
42314
      this();
-
 
42315
      this.success = success;
-
 
42316
    }
-
 
42317
 
-
 
42318
    /**
-
 
42319
     * Performs a deep copy on <i>other</i>.
-
 
42320
     */
-
 
42321
    public getLastNdaySaleForItem_result(getLastNdaySaleForItem_result other) {
-
 
42322
      if (other.isSetSuccess()) {
-
 
42323
        this.success = other.success;
-
 
42324
      }
-
 
42325
    }
-
 
42326
 
-
 
42327
    public getLastNdaySaleForItem_result deepCopy() {
-
 
42328
      return new getLastNdaySaleForItem_result(this);
-
 
42329
    }
-
 
42330
 
-
 
42331
    @Override
-
 
42332
    public void clear() {
-
 
42333
      this.success = null;
-
 
42334
    }
-
 
42335
 
-
 
42336
    public String getSuccess() {
-
 
42337
      return this.success;
-
 
42338
    }
-
 
42339
 
-
 
42340
    public void setSuccess(String success) {
-
 
42341
      this.success = success;
-
 
42342
    }
-
 
42343
 
-
 
42344
    public void unsetSuccess() {
-
 
42345
      this.success = null;
-
 
42346
    }
-
 
42347
 
-
 
42348
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
42349
    public boolean isSetSuccess() {
-
 
42350
      return this.success != null;
-
 
42351
    }
-
 
42352
 
-
 
42353
    public void setSuccessIsSet(boolean value) {
-
 
42354
      if (!value) {
-
 
42355
        this.success = null;
-
 
42356
      }
-
 
42357
    }
-
 
42358
 
-
 
42359
    public void setFieldValue(_Fields field, Object value) {
-
 
42360
      switch (field) {
-
 
42361
      case SUCCESS:
-
 
42362
        if (value == null) {
-
 
42363
          unsetSuccess();
-
 
42364
        } else {
-
 
42365
          setSuccess((String)value);
-
 
42366
        }
-
 
42367
        break;
-
 
42368
 
-
 
42369
      }
-
 
42370
    }
-
 
42371
 
-
 
42372
    public Object getFieldValue(_Fields field) {
-
 
42373
      switch (field) {
-
 
42374
      case SUCCESS:
-
 
42375
        return getSuccess();
-
 
42376
 
-
 
42377
      }
-
 
42378
      throw new IllegalStateException();
-
 
42379
    }
-
 
42380
 
-
 
42381
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
42382
    public boolean isSet(_Fields field) {
-
 
42383
      if (field == null) {
-
 
42384
        throw new IllegalArgumentException();
-
 
42385
      }
-
 
42386
 
-
 
42387
      switch (field) {
-
 
42388
      case SUCCESS:
-
 
42389
        return isSetSuccess();
-
 
42390
      }
-
 
42391
      throw new IllegalStateException();
-
 
42392
    }
-
 
42393
 
-
 
42394
    @Override
-
 
42395
    public boolean equals(Object that) {
-
 
42396
      if (that == null)
-
 
42397
        return false;
-
 
42398
      if (that instanceof getLastNdaySaleForItem_result)
-
 
42399
        return this.equals((getLastNdaySaleForItem_result)that);
-
 
42400
      return false;
-
 
42401
    }
-
 
42402
 
-
 
42403
    public boolean equals(getLastNdaySaleForItem_result that) {
-
 
42404
      if (that == null)
-
 
42405
        return false;
-
 
42406
 
-
 
42407
      boolean this_present_success = true && this.isSetSuccess();
-
 
42408
      boolean that_present_success = true && that.isSetSuccess();
-
 
42409
      if (this_present_success || that_present_success) {
-
 
42410
        if (!(this_present_success && that_present_success))
-
 
42411
          return false;
-
 
42412
        if (!this.success.equals(that.success))
-
 
42413
          return false;
-
 
42414
      }
-
 
42415
 
-
 
42416
      return true;
-
 
42417
    }
-
 
42418
 
-
 
42419
    @Override
-
 
42420
    public int hashCode() {
-
 
42421
      return 0;
-
 
42422
    }
-
 
42423
 
-
 
42424
    public int compareTo(getLastNdaySaleForItem_result other) {
-
 
42425
      if (!getClass().equals(other.getClass())) {
-
 
42426
        return getClass().getName().compareTo(other.getClass().getName());
-
 
42427
      }
-
 
42428
 
-
 
42429
      int lastComparison = 0;
-
 
42430
      getLastNdaySaleForItem_result typedOther = (getLastNdaySaleForItem_result)other;
-
 
42431
 
-
 
42432
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
42433
      if (lastComparison != 0) {
-
 
42434
        return lastComparison;
-
 
42435
      }
-
 
42436
      if (isSetSuccess()) {
-
 
42437
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
42438
        if (lastComparison != 0) {
-
 
42439
          return lastComparison;
-
 
42440
        }
-
 
42441
      }
-
 
42442
      return 0;
-
 
42443
    }
-
 
42444
 
-
 
42445
    public _Fields fieldForId(int fieldId) {
-
 
42446
      return _Fields.findByThriftId(fieldId);
-
 
42447
    }
-
 
42448
 
-
 
42449
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
42450
      org.apache.thrift.protocol.TField field;
-
 
42451
      iprot.readStructBegin();
-
 
42452
      while (true)
-
 
42453
      {
-
 
42454
        field = iprot.readFieldBegin();
-
 
42455
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
42456
          break;
-
 
42457
        }
-
 
42458
        switch (field.id) {
-
 
42459
          case 0: // SUCCESS
-
 
42460
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
42461
              this.success = iprot.readString();
-
 
42462
            } else { 
-
 
42463
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
42464
            }
-
 
42465
            break;
-
 
42466
          default:
-
 
42467
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
42468
        }
-
 
42469
        iprot.readFieldEnd();
-
 
42470
      }
-
 
42471
      iprot.readStructEnd();
-
 
42472
      validate();
-
 
42473
    }
-
 
42474
 
-
 
42475
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
42476
      oprot.writeStructBegin(STRUCT_DESC);
-
 
42477
 
-
 
42478
      if (this.isSetSuccess()) {
-
 
42479
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
42480
        oprot.writeString(this.success);
-
 
42481
        oprot.writeFieldEnd();
-
 
42482
      }
-
 
42483
      oprot.writeFieldStop();
-
 
42484
      oprot.writeStructEnd();
-
 
42485
    }
-
 
42486
 
-
 
42487
    @Override
-
 
42488
    public String toString() {
-
 
42489
      StringBuilder sb = new StringBuilder("getLastNdaySaleForItem_result(");
-
 
42490
      boolean first = true;
-
 
42491
 
-
 
42492
      sb.append("success:");
-
 
42493
      if (this.success == null) {
-
 
42494
        sb.append("null");
-
 
42495
      } else {
-
 
42496
        sb.append(this.success);
-
 
42497
      }
-
 
42498
      first = false;
-
 
42499
      sb.append(")");
-
 
42500
      return sb.toString();
-
 
42501
    }
-
 
42502
 
-
 
42503
    public void validate() throws org.apache.thrift.TException {
41754
      // check for required fields
42504
      // check for required fields
41755
    }
42505
    }
41756
 
42506
 
41757
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
42507
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
41758
      try {
42508
      try {