Subversion Repositories SmartDukaan

Rev

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

Rev 5361 Rev 5372
Line 144... Line 144...
144
     * 
144
     * 
145
     * @param inventoryItemId
145
     * @param inventoryItemId
146
     */
146
     */
147
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
147
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
148
 
148
 
-
 
149
    /**
-
 
150
     * Returns the purchase scans grouped by items for Purchase register reconciliation
-
 
151
     * 
-
 
152
     * @param startDate
-
 
153
     * @param endDate
-
 
154
     */
-
 
155
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
-
 
156
 
149
  }
157
  }
150
 
158
 
151
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
159
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
152
 
160
 
153
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
161
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 176... Line 184...
176
 
184
 
177
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
185
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
178
 
186
 
179
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
187
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
180
 
188
 
-
 
189
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
-
 
190
 
181
  }
191
  }
182
 
192
 
183
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
193
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
184
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
194
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
185
      public Factory() {}
195
      public Factory() {}
Line 568... Line 578...
568
        throw result.wex;
578
        throw result.wex;
569
      }
579
      }
570
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
580
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
571
    }
581
    }
572
 
582
 
-
 
583
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
-
 
584
    {
-
 
585
      send_getPurchaseScans(startDate, endDate);
-
 
586
      return recv_getPurchaseScans();
-
 
587
    }
-
 
588
 
-
 
589
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
-
 
590
    {
-
 
591
      getPurchaseScans_args args = new getPurchaseScans_args();
-
 
592
      args.setStartDate(startDate);
-
 
593
      args.setEndDate(endDate);
-
 
594
      sendBase("getPurchaseScans", args);
-
 
595
    }
-
 
596
 
-
 
597
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
-
 
598
    {
-
 
599
      getPurchaseScans_result result = new getPurchaseScans_result();
-
 
600
      receiveBase(result, "getPurchaseScans");
-
 
601
      if (result.isSetSuccess()) {
-
 
602
        return result.success;
-
 
603
      }
-
 
604
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
-
 
605
    }
-
 
606
 
573
  }
607
  }
574
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
608
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
575
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
609
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
576
      private org.apache.thrift.async.TAsyncClientManager clientManager;
610
      private org.apache.thrift.async.TAsyncClientManager clientManager;
577
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
611
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1106... Line 1140...
1106
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1140
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1107
        return (new Client(prot)).recv_getInventoryItemFromId();
1141
        return (new Client(prot)).recv_getInventoryItemFromId();
1108
      }
1142
      }
1109
    }
1143
    }
1110
 
1144
 
-
 
1145
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
-
 
1146
      checkReady();
-
 
1147
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
-
 
1148
      this.___currentMethod = method_call;
-
 
1149
      ___manager.call(method_call);
-
 
1150
    }
-
 
1151
 
-
 
1152
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1153
      private long startDate;
-
 
1154
      private long endDate;
-
 
1155
      public getPurchaseScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_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 {
-
 
1156
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1157
        this.startDate = startDate;
-
 
1158
        this.endDate = endDate;
-
 
1159
      }
-
 
1160
 
-
 
1161
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1162
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1163
        getPurchaseScans_args args = new getPurchaseScans_args();
-
 
1164
        args.setStartDate(startDate);
-
 
1165
        args.setEndDate(endDate);
-
 
1166
        args.write(prot);
-
 
1167
        prot.writeMessageEnd();
-
 
1168
      }
-
 
1169
 
-
 
1170
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
-
 
1171
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1172
          throw new IllegalStateException("Method call not finished!");
-
 
1173
        }
-
 
1174
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1175
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1176
        return (new Client(prot)).recv_getPurchaseScans();
-
 
1177
      }
-
 
1178
    }
-
 
1179
 
1111
  }
1180
  }
1112
 
1181
 
1113
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1182
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1114
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1183
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1115
    public Processor(I iface) {
1184
    public Processor(I iface) {
Line 1133... Line 1202...
1133
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
1202
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
1134
      processMap.put("getItemNumbers", new getItemNumbers());
1203
      processMap.put("getItemNumbers", new getItemNumbers());
1135
      processMap.put("getItemIds", new getItemIds());
1204
      processMap.put("getItemIds", new getItemIds());
1136
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1205
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1137
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
1206
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
-
 
1207
      processMap.put("getPurchaseScans", new getPurchaseScans());
1138
      return processMap;
1208
      return processMap;
1139
    }
1209
    }
1140
 
1210
 
1141
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
1211
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
1142
      public createSerializedInventoryItem() {
1212
      public createSerializedInventoryItem() {
Line 1404... Line 1474...
1404
        }
1474
        }
1405
        return result;
1475
        return result;
1406
      }
1476
      }
1407
    }
1477
    }
1408
 
1478
 
-
 
1479
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
-
 
1480
      public getPurchaseScans() {
-
 
1481
        super("getPurchaseScans");
-
 
1482
      }
-
 
1483
 
-
 
1484
      protected getPurchaseScans_args getEmptyArgsInstance() {
-
 
1485
        return new getPurchaseScans_args();
-
 
1486
      }
-
 
1487
 
-
 
1488
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
-
 
1489
        getPurchaseScans_result result = new getPurchaseScans_result();
-
 
1490
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
-
 
1491
        return result;
-
 
1492
      }
-
 
1493
    }
-
 
1494
 
1409
  }
1495
  }
1410
 
1496
 
1411
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1497
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
1498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
1413
 
1499
 
Line 12170... Line 12256...
12170
      }
12256
      }
12171
    }
12257
    }
12172
 
12258
 
12173
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12259
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12174
      try {
12260
      try {
-
 
12261
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
12262
        __isset_bit_vector = new BitSet(1);
12175
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12263
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12176
      } catch (org.apache.thrift.TException te) {
12264
      } catch (org.apache.thrift.TException te) {
12177
        throw new java.io.IOException(te);
12265
        throw new java.io.IOException(te);
12178
      }
12266
      }
12179
    }
12267
    }
Line 12537... Line 12625...
12537
      }
12625
      }
12538
      first = false;
12626
      first = false;
12539
      sb.append(")");
12627
      sb.append(")");
12540
      return sb.toString();
12628
      return sb.toString();
12541
    }
12629
    }
-
 
12630
 
-
 
12631
    public void validate() throws org.apache.thrift.TException {
-
 
12632
      // check for required fields
-
 
12633
    }
-
 
12634
 
-
 
12635
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
12636
      try {
-
 
12637
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
12638
      } catch (org.apache.thrift.TException te) {
-
 
12639
        throw new java.io.IOException(te);
-
 
12640
      }
-
 
12641
    }
-
 
12642
 
-
 
12643
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
12644
      try {
-
 
12645
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
12646
      } catch (org.apache.thrift.TException te) {
-
 
12647
        throw new java.io.IOException(te);
-
 
12648
      }
-
 
12649
    }
-
 
12650
 
-
 
12651
  }
-
 
12652
 
-
 
12653
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
-
 
12654
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
-
 
12655
 
-
 
12656
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
12657
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
12658
 
-
 
12659
    private long startDate; // required
-
 
12660
    private long endDate; // required
-
 
12661
 
-
 
12662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12663
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
12664
      START_DATE((short)1, "startDate"),
-
 
12665
      END_DATE((short)2, "endDate");
-
 
12666
 
-
 
12667
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12668
 
-
 
12669
      static {
-
 
12670
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12671
          byName.put(field.getFieldName(), field);
-
 
12672
        }
-
 
12673
      }
-
 
12674
 
-
 
12675
      /**
-
 
12676
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12677
       */
-
 
12678
      public static _Fields findByThriftId(int fieldId) {
-
 
12679
        switch(fieldId) {
-
 
12680
          case 1: // START_DATE
-
 
12681
            return START_DATE;
-
 
12682
          case 2: // END_DATE
-
 
12683
            return END_DATE;
-
 
12684
          default:
-
 
12685
            return null;
-
 
12686
        }
-
 
12687
      }
-
 
12688
 
-
 
12689
      /**
-
 
12690
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12691
       * if it is not found.
-
 
12692
       */
-
 
12693
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12694
        _Fields fields = findByThriftId(fieldId);
-
 
12695
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12696
        return fields;
-
 
12697
      }
-
 
12698
 
-
 
12699
      /**
-
 
12700
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12701
       */
-
 
12702
      public static _Fields findByName(String name) {
-
 
12703
        return byName.get(name);
-
 
12704
      }
-
 
12705
 
-
 
12706
      private final short _thriftId;
-
 
12707
      private final String _fieldName;
-
 
12708
 
-
 
12709
      _Fields(short thriftId, String fieldName) {
-
 
12710
        _thriftId = thriftId;
-
 
12711
        _fieldName = fieldName;
-
 
12712
      }
-
 
12713
 
-
 
12714
      public short getThriftFieldId() {
-
 
12715
        return _thriftId;
-
 
12716
      }
-
 
12717
 
-
 
12718
      public String getFieldName() {
-
 
12719
        return _fieldName;
-
 
12720
      }
-
 
12721
    }
-
 
12722
 
-
 
12723
    // isset id assignments
-
 
12724
    private static final int __STARTDATE_ISSET_ID = 0;
-
 
12725
    private static final int __ENDDATE_ISSET_ID = 1;
-
 
12726
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
12727
 
-
 
12728
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
12729
    static {
-
 
12730
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
12731
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12732
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
12733
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12734
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
12735
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
12736
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
-
 
12737
    }
-
 
12738
 
-
 
12739
    public getPurchaseScans_args() {
-
 
12740
    }
-
 
12741
 
-
 
12742
    public getPurchaseScans_args(
-
 
12743
      long startDate,
-
 
12744
      long endDate)
-
 
12745
    {
-
 
12746
      this();
-
 
12747
      this.startDate = startDate;
-
 
12748
      setStartDateIsSet(true);
-
 
12749
      this.endDate = endDate;
-
 
12750
      setEndDateIsSet(true);
-
 
12751
    }
-
 
12752
 
-
 
12753
    /**
-
 
12754
     * Performs a deep copy on <i>other</i>.
-
 
12755
     */
-
 
12756
    public getPurchaseScans_args(getPurchaseScans_args other) {
-
 
12757
      __isset_bit_vector.clear();
-
 
12758
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
12759
      this.startDate = other.startDate;
-
 
12760
      this.endDate = other.endDate;
-
 
12761
    }
-
 
12762
 
-
 
12763
    public getPurchaseScans_args deepCopy() {
-
 
12764
      return new getPurchaseScans_args(this);
-
 
12765
    }
-
 
12766
 
-
 
12767
    @Override
-
 
12768
    public void clear() {
-
 
12769
      setStartDateIsSet(false);
-
 
12770
      this.startDate = 0;
-
 
12771
      setEndDateIsSet(false);
-
 
12772
      this.endDate = 0;
-
 
12773
    }
-
 
12774
 
-
 
12775
    public long getStartDate() {
-
 
12776
      return this.startDate;
-
 
12777
    }
-
 
12778
 
-
 
12779
    public void setStartDate(long startDate) {
-
 
12780
      this.startDate = startDate;
-
 
12781
      setStartDateIsSet(true);
-
 
12782
    }
-
 
12783
 
-
 
12784
    public void unsetStartDate() {
-
 
12785
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
-
 
12786
    }
-
 
12787
 
-
 
12788
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
-
 
12789
    public boolean isSetStartDate() {
-
 
12790
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
-
 
12791
    }
-
 
12792
 
-
 
12793
    public void setStartDateIsSet(boolean value) {
-
 
12794
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
-
 
12795
    }
-
 
12796
 
-
 
12797
    public long getEndDate() {
-
 
12798
      return this.endDate;
-
 
12799
    }
-
 
12800
 
-
 
12801
    public void setEndDate(long endDate) {
-
 
12802
      this.endDate = endDate;
-
 
12803
      setEndDateIsSet(true);
-
 
12804
    }
-
 
12805
 
-
 
12806
    public void unsetEndDate() {
-
 
12807
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
-
 
12808
    }
-
 
12809
 
-
 
12810
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
-
 
12811
    public boolean isSetEndDate() {
-
 
12812
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
-
 
12813
    }
-
 
12814
 
-
 
12815
    public void setEndDateIsSet(boolean value) {
-
 
12816
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
-
 
12817
    }
-
 
12818
 
-
 
12819
    public void setFieldValue(_Fields field, Object value) {
-
 
12820
      switch (field) {
-
 
12821
      case START_DATE:
-
 
12822
        if (value == null) {
-
 
12823
          unsetStartDate();
-
 
12824
        } else {
-
 
12825
          setStartDate((Long)value);
-
 
12826
        }
-
 
12827
        break;
-
 
12828
 
-
 
12829
      case END_DATE:
-
 
12830
        if (value == null) {
-
 
12831
          unsetEndDate();
-
 
12832
        } else {
-
 
12833
          setEndDate((Long)value);
-
 
12834
        }
-
 
12835
        break;
-
 
12836
 
-
 
12837
      }
-
 
12838
    }
-
 
12839
 
-
 
12840
    public Object getFieldValue(_Fields field) {
-
 
12841
      switch (field) {
-
 
12842
      case START_DATE:
-
 
12843
        return Long.valueOf(getStartDate());
-
 
12844
 
-
 
12845
      case END_DATE:
-
 
12846
        return Long.valueOf(getEndDate());
-
 
12847
 
-
 
12848
      }
-
 
12849
      throw new IllegalStateException();
-
 
12850
    }
-
 
12851
 
-
 
12852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
12853
    public boolean isSet(_Fields field) {
-
 
12854
      if (field == null) {
-
 
12855
        throw new IllegalArgumentException();
-
 
12856
      }
-
 
12857
 
-
 
12858
      switch (field) {
-
 
12859
      case START_DATE:
-
 
12860
        return isSetStartDate();
-
 
12861
      case END_DATE:
-
 
12862
        return isSetEndDate();
-
 
12863
      }
-
 
12864
      throw new IllegalStateException();
-
 
12865
    }
-
 
12866
 
-
 
12867
    @Override
-
 
12868
    public boolean equals(Object that) {
-
 
12869
      if (that == null)
-
 
12870
        return false;
-
 
12871
      if (that instanceof getPurchaseScans_args)
-
 
12872
        return this.equals((getPurchaseScans_args)that);
-
 
12873
      return false;
-
 
12874
    }
-
 
12875
 
-
 
12876
    public boolean equals(getPurchaseScans_args that) {
-
 
12877
      if (that == null)
-
 
12878
        return false;
-
 
12879
 
-
 
12880
      boolean this_present_startDate = true;
-
 
12881
      boolean that_present_startDate = true;
-
 
12882
      if (this_present_startDate || that_present_startDate) {
-
 
12883
        if (!(this_present_startDate && that_present_startDate))
-
 
12884
          return false;
-
 
12885
        if (this.startDate != that.startDate)
-
 
12886
          return false;
-
 
12887
      }
-
 
12888
 
-
 
12889
      boolean this_present_endDate = true;
-
 
12890
      boolean that_present_endDate = true;
-
 
12891
      if (this_present_endDate || that_present_endDate) {
-
 
12892
        if (!(this_present_endDate && that_present_endDate))
-
 
12893
          return false;
-
 
12894
        if (this.endDate != that.endDate)
-
 
12895
          return false;
-
 
12896
      }
-
 
12897
 
-
 
12898
      return true;
-
 
12899
    }
-
 
12900
 
-
 
12901
    @Override
-
 
12902
    public int hashCode() {
-
 
12903
      return 0;
-
 
12904
    }
-
 
12905
 
-
 
12906
    public int compareTo(getPurchaseScans_args other) {
-
 
12907
      if (!getClass().equals(other.getClass())) {
-
 
12908
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12909
      }
-
 
12910
 
-
 
12911
      int lastComparison = 0;
-
 
12912
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
-
 
12913
 
-
 
12914
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
-
 
12915
      if (lastComparison != 0) {
-
 
12916
        return lastComparison;
-
 
12917
      }
-
 
12918
      if (isSetStartDate()) {
-
 
12919
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
-
 
12920
        if (lastComparison != 0) {
-
 
12921
          return lastComparison;
-
 
12922
        }
-
 
12923
      }
-
 
12924
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
-
 
12925
      if (lastComparison != 0) {
-
 
12926
        return lastComparison;
-
 
12927
      }
-
 
12928
      if (isSetEndDate()) {
-
 
12929
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
-
 
12930
        if (lastComparison != 0) {
-
 
12931
          return lastComparison;
-
 
12932
        }
-
 
12933
      }
-
 
12934
      return 0;
-
 
12935
    }
-
 
12936
 
-
 
12937
    public _Fields fieldForId(int fieldId) {
-
 
12938
      return _Fields.findByThriftId(fieldId);
-
 
12939
    }
-
 
12940
 
-
 
12941
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
12942
      org.apache.thrift.protocol.TField field;
-
 
12943
      iprot.readStructBegin();
-
 
12944
      while (true)
-
 
12945
      {
-
 
12946
        field = iprot.readFieldBegin();
-
 
12947
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
12948
          break;
-
 
12949
        }
-
 
12950
        switch (field.id) {
-
 
12951
          case 1: // START_DATE
-
 
12952
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
12953
              this.startDate = iprot.readI64();
-
 
12954
              setStartDateIsSet(true);
-
 
12955
            } else { 
-
 
12956
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12957
            }
-
 
12958
            break;
-
 
12959
          case 2: // END_DATE
-
 
12960
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
12961
              this.endDate = iprot.readI64();
-
 
12962
              setEndDateIsSet(true);
-
 
12963
            } else { 
-
 
12964
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12965
            }
-
 
12966
            break;
-
 
12967
          default:
-
 
12968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12969
        }
-
 
12970
        iprot.readFieldEnd();
-
 
12971
      }
-
 
12972
      iprot.readStructEnd();
-
 
12973
      validate();
-
 
12974
    }
-
 
12975
 
-
 
12976
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
12977
      validate();
-
 
12978
 
-
 
12979
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12980
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
-
 
12981
      oprot.writeI64(this.startDate);
-
 
12982
      oprot.writeFieldEnd();
-
 
12983
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
-
 
12984
      oprot.writeI64(this.endDate);
-
 
12985
      oprot.writeFieldEnd();
-
 
12986
      oprot.writeFieldStop();
-
 
12987
      oprot.writeStructEnd();
-
 
12988
    }
-
 
12989
 
-
 
12990
    @Override
-
 
12991
    public String toString() {
-
 
12992
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
-
 
12993
      boolean first = true;
-
 
12994
 
-
 
12995
      sb.append("startDate:");
-
 
12996
      sb.append(this.startDate);
-
 
12997
      first = false;
-
 
12998
      if (!first) sb.append(", ");
-
 
12999
      sb.append("endDate:");
-
 
13000
      sb.append(this.endDate);
-
 
13001
      first = false;
-
 
13002
      sb.append(")");
-
 
13003
      return sb.toString();
-
 
13004
    }
-
 
13005
 
-
 
13006
    public void validate() throws org.apache.thrift.TException {
-
 
13007
      // check for required fields
-
 
13008
    }
-
 
13009
 
-
 
13010
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
13011
      try {
-
 
13012
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
13013
      } catch (org.apache.thrift.TException te) {
-
 
13014
        throw new java.io.IOException(te);
-
 
13015
      }
-
 
13016
    }
-
 
13017
 
-
 
13018
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
13019
      try {
-
 
13020
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
13021
        __isset_bit_vector = new BitSet(1);
-
 
13022
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
13023
      } catch (org.apache.thrift.TException te) {
-
 
13024
        throw new java.io.IOException(te);
-
 
13025
      }
-
 
13026
    }
-
 
13027
 
-
 
13028
  }
-
 
13029
 
-
 
13030
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
-
 
13031
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
-
 
13032
 
-
 
13033
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
 
13034
 
-
 
13035
    private List<DetailedPurchaseScan> success; // required
-
 
13036
 
-
 
13037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13038
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
13039
      SUCCESS((short)0, "success");
-
 
13040
 
-
 
13041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13042
 
-
 
13043
      static {
-
 
13044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13045
          byName.put(field.getFieldName(), field);
-
 
13046
        }
-
 
13047
      }
-
 
13048
 
-
 
13049
      /**
-
 
13050
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13051
       */
-
 
13052
      public static _Fields findByThriftId(int fieldId) {
-
 
13053
        switch(fieldId) {
-
 
13054
          case 0: // SUCCESS
-
 
13055
            return SUCCESS;
-
 
13056
          default:
-
 
13057
            return null;
-
 
13058
        }
-
 
13059
      }
-
 
13060
 
-
 
13061
      /**
-
 
13062
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13063
       * if it is not found.
-
 
13064
       */
-
 
13065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13066
        _Fields fields = findByThriftId(fieldId);
-
 
13067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13068
        return fields;
-
 
13069
      }
-
 
13070
 
-
 
13071
      /**
-
 
13072
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13073
       */
-
 
13074
      public static _Fields findByName(String name) {
-
 
13075
        return byName.get(name);
-
 
13076
      }
-
 
13077
 
-
 
13078
      private final short _thriftId;
-
 
13079
      private final String _fieldName;
-
 
13080
 
-
 
13081
      _Fields(short thriftId, String fieldName) {
-
 
13082
        _thriftId = thriftId;
-
 
13083
        _fieldName = fieldName;
-
 
13084
      }
-
 
13085
 
-
 
13086
      public short getThriftFieldId() {
-
 
13087
        return _thriftId;
-
 
13088
      }
-
 
13089
 
-
 
13090
      public String getFieldName() {
-
 
13091
        return _fieldName;
-
 
13092
      }
-
 
13093
    }
-
 
13094
 
-
 
13095
    // isset id assignments
-
 
13096
 
-
 
13097
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
13098
    static {
-
 
13099
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
13100
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
13101
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
13102
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
-
 
13103
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
13104
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
-
 
13105
    }
-
 
13106
 
-
 
13107
    public getPurchaseScans_result() {
-
 
13108
    }
-
 
13109
 
-
 
13110
    public getPurchaseScans_result(
-
 
13111
      List<DetailedPurchaseScan> success)
-
 
13112
    {
-
 
13113
      this();
-
 
13114
      this.success = success;
-
 
13115
    }
-
 
13116
 
-
 
13117
    /**
-
 
13118
     * Performs a deep copy on <i>other</i>.
-
 
13119
     */
-
 
13120
    public getPurchaseScans_result(getPurchaseScans_result other) {
-
 
13121
      if (other.isSetSuccess()) {
-
 
13122
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
-
 
13123
        for (DetailedPurchaseScan other_element : other.success) {
-
 
13124
          __this__success.add(new DetailedPurchaseScan(other_element));
-
 
13125
        }
-
 
13126
        this.success = __this__success;
-
 
13127
      }
-
 
13128
    }
-
 
13129
 
-
 
13130
    public getPurchaseScans_result deepCopy() {
-
 
13131
      return new getPurchaseScans_result(this);
-
 
13132
    }
-
 
13133
 
-
 
13134
    @Override
-
 
13135
    public void clear() {
-
 
13136
      this.success = null;
-
 
13137
    }
-
 
13138
 
-
 
13139
    public int getSuccessSize() {
-
 
13140
      return (this.success == null) ? 0 : this.success.size();
-
 
13141
    }
-
 
13142
 
-
 
13143
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
-
 
13144
      return (this.success == null) ? null : this.success.iterator();
-
 
13145
    }
-
 
13146
 
-
 
13147
    public void addToSuccess(DetailedPurchaseScan elem) {
-
 
13148
      if (this.success == null) {
-
 
13149
        this.success = new ArrayList<DetailedPurchaseScan>();
-
 
13150
      }
-
 
13151
      this.success.add(elem);
-
 
13152
    }
-
 
13153
 
-
 
13154
    public List<DetailedPurchaseScan> getSuccess() {
-
 
13155
      return this.success;
-
 
13156
    }
-
 
13157
 
-
 
13158
    public void setSuccess(List<DetailedPurchaseScan> success) {
-
 
13159
      this.success = success;
-
 
13160
    }
-
 
13161
 
-
 
13162
    public void unsetSuccess() {
-
 
13163
      this.success = null;
-
 
13164
    }
-
 
13165
 
-
 
13166
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
13167
    public boolean isSetSuccess() {
-
 
13168
      return this.success != null;
-
 
13169
    }
-
 
13170
 
-
 
13171
    public void setSuccessIsSet(boolean value) {
-
 
13172
      if (!value) {
-
 
13173
        this.success = null;
-
 
13174
      }
-
 
13175
    }
-
 
13176
 
-
 
13177
    public void setFieldValue(_Fields field, Object value) {
-
 
13178
      switch (field) {
-
 
13179
      case SUCCESS:
-
 
13180
        if (value == null) {
-
 
13181
          unsetSuccess();
-
 
13182
        } else {
-
 
13183
          setSuccess((List<DetailedPurchaseScan>)value);
-
 
13184
        }
-
 
13185
        break;
-
 
13186
 
-
 
13187
      }
-
 
13188
    }
-
 
13189
 
-
 
13190
    public Object getFieldValue(_Fields field) {
-
 
13191
      switch (field) {
-
 
13192
      case SUCCESS:
-
 
13193
        return getSuccess();
-
 
13194
 
-
 
13195
      }
-
 
13196
      throw new IllegalStateException();
-
 
13197
    }
-
 
13198
 
-
 
13199
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
13200
    public boolean isSet(_Fields field) {
-
 
13201
      if (field == null) {
-
 
13202
        throw new IllegalArgumentException();
-
 
13203
      }
-
 
13204
 
-
 
13205
      switch (field) {
-
 
13206
      case SUCCESS:
-
 
13207
        return isSetSuccess();
-
 
13208
      }
-
 
13209
      throw new IllegalStateException();
-
 
13210
    }
-
 
13211
 
-
 
13212
    @Override
-
 
13213
    public boolean equals(Object that) {
-
 
13214
      if (that == null)
-
 
13215
        return false;
-
 
13216
      if (that instanceof getPurchaseScans_result)
-
 
13217
        return this.equals((getPurchaseScans_result)that);
-
 
13218
      return false;
-
 
13219
    }
-
 
13220
 
-
 
13221
    public boolean equals(getPurchaseScans_result that) {
-
 
13222
      if (that == null)
-
 
13223
        return false;
-
 
13224
 
-
 
13225
      boolean this_present_success = true && this.isSetSuccess();
-
 
13226
      boolean that_present_success = true && that.isSetSuccess();
-
 
13227
      if (this_present_success || that_present_success) {
-
 
13228
        if (!(this_present_success && that_present_success))
-
 
13229
          return false;
-
 
13230
        if (!this.success.equals(that.success))
-
 
13231
          return false;
-
 
13232
      }
-
 
13233
 
-
 
13234
      return true;
-
 
13235
    }
-
 
13236
 
-
 
13237
    @Override
-
 
13238
    public int hashCode() {
-
 
13239
      return 0;
-
 
13240
    }
-
 
13241
 
-
 
13242
    public int compareTo(getPurchaseScans_result other) {
-
 
13243
      if (!getClass().equals(other.getClass())) {
-
 
13244
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13245
      }
-
 
13246
 
-
 
13247
      int lastComparison = 0;
-
 
13248
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
-
 
13249
 
-
 
13250
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
13251
      if (lastComparison != 0) {
-
 
13252
        return lastComparison;
-
 
13253
      }
-
 
13254
      if (isSetSuccess()) {
-
 
13255
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
13256
        if (lastComparison != 0) {
-
 
13257
          return lastComparison;
-
 
13258
        }
-
 
13259
      }
-
 
13260
      return 0;
-
 
13261
    }
-
 
13262
 
-
 
13263
    public _Fields fieldForId(int fieldId) {
-
 
13264
      return _Fields.findByThriftId(fieldId);
-
 
13265
    }
-
 
13266
 
-
 
13267
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
13268
      org.apache.thrift.protocol.TField field;
-
 
13269
      iprot.readStructBegin();
-
 
13270
      while (true)
-
 
13271
      {
-
 
13272
        field = iprot.readFieldBegin();
-
 
13273
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
13274
          break;
-
 
13275
        }
-
 
13276
        switch (field.id) {
-
 
13277
          case 0: // SUCCESS
-
 
13278
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
13279
              {
-
 
13280
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
-
 
13281
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
-
 
13282
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
-
 
13283
                {
-
 
13284
                  DetailedPurchaseScan _elem14; // required
-
 
13285
                  _elem14 = new DetailedPurchaseScan();
-
 
13286
                  _elem14.read(iprot);
-
 
13287
                  this.success.add(_elem14);
-
 
13288
                }
-
 
13289
                iprot.readListEnd();
-
 
13290
              }
-
 
13291
            } else { 
-
 
13292
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
13293
            }
-
 
13294
            break;
-
 
13295
          default:
-
 
13296
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
13297
        }
-
 
13298
        iprot.readFieldEnd();
-
 
13299
      }
-
 
13300
      iprot.readStructEnd();
-
 
13301
      validate();
-
 
13302
    }
-
 
13303
 
-
 
13304
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
13305
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13306
 
-
 
13307
      if (this.isSetSuccess()) {
-
 
13308
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
13309
        {
-
 
13310
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
13311
          for (DetailedPurchaseScan _iter15 : this.success)
-
 
13312
          {
-
 
13313
            _iter15.write(oprot);
-
 
13314
          }
-
 
13315
          oprot.writeListEnd();
-
 
13316
        }
-
 
13317
        oprot.writeFieldEnd();
-
 
13318
      }
-
 
13319
      oprot.writeFieldStop();
-
 
13320
      oprot.writeStructEnd();
-
 
13321
    }
-
 
13322
 
-
 
13323
    @Override
-
 
13324
    public String toString() {
-
 
13325
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
-
 
13326
      boolean first = true;
-
 
13327
 
-
 
13328
      sb.append("success:");
-
 
13329
      if (this.success == null) {
-
 
13330
        sb.append("null");
-
 
13331
      } else {
-
 
13332
        sb.append(this.success);
-
 
13333
      }
-
 
13334
      first = false;
-
 
13335
      sb.append(")");
-
 
13336
      return sb.toString();
-
 
13337
    }
12542
 
13338
 
12543
    public void validate() throws org.apache.thrift.TException {
13339
    public void validate() throws org.apache.thrift.TException {
12544
      // check for required fields
13340
      // check for required fields
12545
    }
13341
    }
12546
 
13342