Subversion Repositories SmartDukaan

Rev

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

Rev 5437 Rev 5496
Line 124... Line 124...
124
     * @param startDate
124
     * @param startDate
125
     * @param endDate
125
     * @param endDate
126
     */
126
     */
127
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
127
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
128
 
128
 
-
 
129
    /**
-
 
130
     * Returns the invoices and the count of scans against on a given day.
-
 
131
     * 
-
 
132
     * @param date
-
 
133
     */
-
 
134
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
-
 
135
 
129
  }
136
  }
130
 
137
 
131
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
138
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
132
 
139
 
133
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
140
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 152... Line 159...
152
 
159
 
153
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
160
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
154
 
161
 
155
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
162
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
156
 
163
 
-
 
164
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
-
 
165
 
157
  }
166
  }
158
 
167
 
159
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
168
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
160
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
169
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
161
      public Factory() {}
170
      public Factory() {}
Line 483... Line 492...
483
        return result.success;
492
        return result.success;
484
      }
493
      }
485
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
494
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
486
    }
495
    }
487
 
496
 
-
 
497
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
-
 
498
    {
-
 
499
      send_fetchScansPerInvoiceNumber(date);
-
 
500
      return recv_fetchScansPerInvoiceNumber();
-
 
501
    }
-
 
502
 
-
 
503
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
-
 
504
    {
-
 
505
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
-
 
506
      args.setDate(date);
-
 
507
      sendBase("fetchScansPerInvoiceNumber", args);
-
 
508
    }
-
 
509
 
-
 
510
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
-
 
511
    {
-
 
512
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
-
 
513
      receiveBase(result, "fetchScansPerInvoiceNumber");
-
 
514
      if (result.isSetSuccess()) {
-
 
515
        return result.success;
-
 
516
      }
-
 
517
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
-
 
518
    }
-
 
519
 
488
  }
520
  }
489
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
521
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
490
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
522
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
491
      private org.apache.thrift.async.TAsyncClientManager clientManager;
523
      private org.apache.thrift.async.TAsyncClientManager clientManager;
492
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
524
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 939... Line 971...
939
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
971
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
940
        return (new Client(prot)).recv_getPurchaseScans();
972
        return (new Client(prot)).recv_getPurchaseScans();
941
      }
973
      }
942
    }
974
    }
943
 
975
 
-
 
976
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
-
 
977
      checkReady();
-
 
978
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
-
 
979
      this.___currentMethod = method_call;
-
 
980
      ___manager.call(method_call);
-
 
981
    }
-
 
982
 
-
 
983
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
984
      private long date;
-
 
985
      public fetchScansPerInvoiceNumber_call(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_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 {
-
 
986
        super(client, protocolFactory, transport, resultHandler, false);
-
 
987
        this.date = date;
-
 
988
      }
-
 
989
 
-
 
990
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
991
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
992
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
-
 
993
        args.setDate(date);
-
 
994
        args.write(prot);
-
 
995
        prot.writeMessageEnd();
-
 
996
      }
-
 
997
 
-
 
998
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
-
 
999
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1000
          throw new IllegalStateException("Method call not finished!");
-
 
1001
        }
-
 
1002
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1003
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1004
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
-
 
1005
      }
-
 
1006
    }
-
 
1007
 
944
  }
1008
  }
945
 
1009
 
946
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1010
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
947
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1011
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
948
    public Processor(I iface) {
1012
    public Processor(I iface) {
Line 964... Line 1028...
964
      processMap.put("getItemNumbers", new getItemNumbers());
1028
      processMap.put("getItemNumbers", new getItemNumbers());
965
      processMap.put("getItemIds", new getItemIds());
1029
      processMap.put("getItemIds", new getItemIds());
966
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1030
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
967
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
1031
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
968
      processMap.put("getPurchaseScans", new getPurchaseScans());
1032
      processMap.put("getPurchaseScans", new getPurchaseScans());
-
 
1033
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
969
      return processMap;
1034
      return processMap;
970
    }
1035
    }
971
 
1036
 
972
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1037
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
973
      public getInventoryItem() {
1038
      public getInventoryItem() {
Line 1191... Line 1256...
1191
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1256
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1192
        return result;
1257
        return result;
1193
      }
1258
      }
1194
    }
1259
    }
1195
 
1260
 
-
 
1261
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
-
 
1262
      public fetchScansPerInvoiceNumber() {
-
 
1263
        super("fetchScansPerInvoiceNumber");
-
 
1264
      }
-
 
1265
 
-
 
1266
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
-
 
1267
        return new fetchScansPerInvoiceNumber_args();
-
 
1268
      }
-
 
1269
 
-
 
1270
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
-
 
1271
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
-
 
1272
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
-
 
1273
        return result;
-
 
1274
      }
-
 
1275
    }
-
 
1276
 
1196
  }
1277
  }
1197
 
1278
 
1198
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1279
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1280
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1200
 
1281
 
Line 10398... Line 10479...
10398
      boolean first = true;
10479
      boolean first = true;
10399
 
10480
 
10400
      sb.append("success:");
10481
      sb.append("success:");
10401
      if (this.success == null) {
10482
      if (this.success == null) {
10402
        sb.append("null");
10483
        sb.append("null");
-
 
10484
      } else {
-
 
10485
        sb.append(this.success);
-
 
10486
      }
-
 
10487
      first = false;
-
 
10488
      sb.append(")");
-
 
10489
      return sb.toString();
-
 
10490
    }
-
 
10491
 
-
 
10492
    public void validate() throws org.apache.thrift.TException {
-
 
10493
      // check for required fields
-
 
10494
    }
-
 
10495
 
-
 
10496
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10497
      try {
-
 
10498
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10499
      } catch (org.apache.thrift.TException te) {
-
 
10500
        throw new java.io.IOException(te);
-
 
10501
      }
-
 
10502
    }
-
 
10503
 
-
 
10504
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10505
      try {
-
 
10506
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10507
      } catch (org.apache.thrift.TException te) {
-
 
10508
        throw new java.io.IOException(te);
-
 
10509
      }
-
 
10510
    }
-
 
10511
 
-
 
10512
  }
-
 
10513
 
-
 
10514
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
-
 
10515
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
-
 
10516
 
-
 
10517
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
10518
 
-
 
10519
    private long date; // required
-
 
10520
 
-
 
10521
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10522
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10523
      DATE((short)1, "date");
-
 
10524
 
-
 
10525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10526
 
-
 
10527
      static {
-
 
10528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10529
          byName.put(field.getFieldName(), field);
-
 
10530
        }
-
 
10531
      }
-
 
10532
 
-
 
10533
      /**
-
 
10534
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10535
       */
-
 
10536
      public static _Fields findByThriftId(int fieldId) {
-
 
10537
        switch(fieldId) {
-
 
10538
          case 1: // DATE
-
 
10539
            return DATE;
-
 
10540
          default:
-
 
10541
            return null;
-
 
10542
        }
-
 
10543
      }
-
 
10544
 
-
 
10545
      /**
-
 
10546
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10547
       * if it is not found.
-
 
10548
       */
-
 
10549
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10550
        _Fields fields = findByThriftId(fieldId);
-
 
10551
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10552
        return fields;
-
 
10553
      }
-
 
10554
 
-
 
10555
      /**
-
 
10556
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10557
       */
-
 
10558
      public static _Fields findByName(String name) {
-
 
10559
        return byName.get(name);
-
 
10560
      }
-
 
10561
 
-
 
10562
      private final short _thriftId;
-
 
10563
      private final String _fieldName;
-
 
10564
 
-
 
10565
      _Fields(short thriftId, String fieldName) {
-
 
10566
        _thriftId = thriftId;
-
 
10567
        _fieldName = fieldName;
-
 
10568
      }
-
 
10569
 
-
 
10570
      public short getThriftFieldId() {
-
 
10571
        return _thriftId;
-
 
10572
      }
-
 
10573
 
-
 
10574
      public String getFieldName() {
-
 
10575
        return _fieldName;
-
 
10576
      }
-
 
10577
    }
-
 
10578
 
-
 
10579
    // isset id assignments
-
 
10580
    private static final int __DATE_ISSET_ID = 0;
-
 
10581
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
10582
 
-
 
10583
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10584
    static {
-
 
10585
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10586
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10587
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10588
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10589
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
-
 
10590
    }
-
 
10591
 
-
 
10592
    public fetchScansPerInvoiceNumber_args() {
-
 
10593
    }
-
 
10594
 
-
 
10595
    public fetchScansPerInvoiceNumber_args(
-
 
10596
      long date)
-
 
10597
    {
-
 
10598
      this();
-
 
10599
      this.date = date;
-
 
10600
      setDateIsSet(true);
-
 
10601
    }
-
 
10602
 
-
 
10603
    /**
-
 
10604
     * Performs a deep copy on <i>other</i>.
-
 
10605
     */
-
 
10606
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
-
 
10607
      __isset_bit_vector.clear();
-
 
10608
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
10609
      this.date = other.date;
-
 
10610
    }
-
 
10611
 
-
 
10612
    public fetchScansPerInvoiceNumber_args deepCopy() {
-
 
10613
      return new fetchScansPerInvoiceNumber_args(this);
-
 
10614
    }
-
 
10615
 
-
 
10616
    @Override
-
 
10617
    public void clear() {
-
 
10618
      setDateIsSet(false);
-
 
10619
      this.date = 0;
-
 
10620
    }
-
 
10621
 
-
 
10622
    public long getDate() {
-
 
10623
      return this.date;
-
 
10624
    }
-
 
10625
 
-
 
10626
    public void setDate(long date) {
-
 
10627
      this.date = date;
-
 
10628
      setDateIsSet(true);
-
 
10629
    }
-
 
10630
 
-
 
10631
    public void unsetDate() {
-
 
10632
      __isset_bit_vector.clear(__DATE_ISSET_ID);
-
 
10633
    }
-
 
10634
 
-
 
10635
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
-
 
10636
    public boolean isSetDate() {
-
 
10637
      return __isset_bit_vector.get(__DATE_ISSET_ID);
-
 
10638
    }
-
 
10639
 
-
 
10640
    public void setDateIsSet(boolean value) {
-
 
10641
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
-
 
10642
    }
-
 
10643
 
-
 
10644
    public void setFieldValue(_Fields field, Object value) {
-
 
10645
      switch (field) {
-
 
10646
      case DATE:
-
 
10647
        if (value == null) {
-
 
10648
          unsetDate();
-
 
10649
        } else {
-
 
10650
          setDate((Long)value);
-
 
10651
        }
-
 
10652
        break;
-
 
10653
 
-
 
10654
      }
-
 
10655
    }
-
 
10656
 
-
 
10657
    public Object getFieldValue(_Fields field) {
-
 
10658
      switch (field) {
-
 
10659
      case DATE:
-
 
10660
        return Long.valueOf(getDate());
-
 
10661
 
-
 
10662
      }
-
 
10663
      throw new IllegalStateException();
-
 
10664
    }
-
 
10665
 
-
 
10666
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10667
    public boolean isSet(_Fields field) {
-
 
10668
      if (field == null) {
-
 
10669
        throw new IllegalArgumentException();
-
 
10670
      }
-
 
10671
 
-
 
10672
      switch (field) {
-
 
10673
      case DATE:
-
 
10674
        return isSetDate();
-
 
10675
      }
-
 
10676
      throw new IllegalStateException();
-
 
10677
    }
-
 
10678
 
-
 
10679
    @Override
-
 
10680
    public boolean equals(Object that) {
-
 
10681
      if (that == null)
-
 
10682
        return false;
-
 
10683
      if (that instanceof fetchScansPerInvoiceNumber_args)
-
 
10684
        return this.equals((fetchScansPerInvoiceNumber_args)that);
-
 
10685
      return false;
-
 
10686
    }
-
 
10687
 
-
 
10688
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
-
 
10689
      if (that == null)
-
 
10690
        return false;
-
 
10691
 
-
 
10692
      boolean this_present_date = true;
-
 
10693
      boolean that_present_date = true;
-
 
10694
      if (this_present_date || that_present_date) {
-
 
10695
        if (!(this_present_date && that_present_date))
-
 
10696
          return false;
-
 
10697
        if (this.date != that.date)
-
 
10698
          return false;
-
 
10699
      }
-
 
10700
 
-
 
10701
      return true;
-
 
10702
    }
-
 
10703
 
-
 
10704
    @Override
-
 
10705
    public int hashCode() {
-
 
10706
      return 0;
-
 
10707
    }
-
 
10708
 
-
 
10709
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
-
 
10710
      if (!getClass().equals(other.getClass())) {
-
 
10711
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10712
      }
-
 
10713
 
-
 
10714
      int lastComparison = 0;
-
 
10715
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
-
 
10716
 
-
 
10717
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
-
 
10718
      if (lastComparison != 0) {
-
 
10719
        return lastComparison;
-
 
10720
      }
-
 
10721
      if (isSetDate()) {
-
 
10722
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
-
 
10723
        if (lastComparison != 0) {
-
 
10724
          return lastComparison;
-
 
10725
        }
-
 
10726
      }
-
 
10727
      return 0;
-
 
10728
    }
-
 
10729
 
-
 
10730
    public _Fields fieldForId(int fieldId) {
-
 
10731
      return _Fields.findByThriftId(fieldId);
-
 
10732
    }
-
 
10733
 
-
 
10734
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10735
      org.apache.thrift.protocol.TField field;
-
 
10736
      iprot.readStructBegin();
-
 
10737
      while (true)
-
 
10738
      {
-
 
10739
        field = iprot.readFieldBegin();
-
 
10740
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10741
          break;
-
 
10742
        }
-
 
10743
        switch (field.id) {
-
 
10744
          case 1: // DATE
-
 
10745
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10746
              this.date = iprot.readI64();
-
 
10747
              setDateIsSet(true);
-
 
10748
            } else { 
-
 
10749
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10750
            }
-
 
10751
            break;
-
 
10752
          default:
-
 
10753
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10754
        }
-
 
10755
        iprot.readFieldEnd();
-
 
10756
      }
-
 
10757
      iprot.readStructEnd();
-
 
10758
      validate();
-
 
10759
    }
-
 
10760
 
-
 
10761
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10762
      validate();
-
 
10763
 
-
 
10764
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10765
      oprot.writeFieldBegin(DATE_FIELD_DESC);
-
 
10766
      oprot.writeI64(this.date);
-
 
10767
      oprot.writeFieldEnd();
-
 
10768
      oprot.writeFieldStop();
-
 
10769
      oprot.writeStructEnd();
-
 
10770
    }
-
 
10771
 
-
 
10772
    @Override
-
 
10773
    public String toString() {
-
 
10774
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
-
 
10775
      boolean first = true;
-
 
10776
 
-
 
10777
      sb.append("date:");
-
 
10778
      sb.append(this.date);
-
 
10779
      first = false;
-
 
10780
      sb.append(")");
-
 
10781
      return sb.toString();
-
 
10782
    }
-
 
10783
 
-
 
10784
    public void validate() throws org.apache.thrift.TException {
-
 
10785
      // check for required fields
-
 
10786
    }
-
 
10787
 
-
 
10788
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10789
      try {
-
 
10790
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10791
      } catch (org.apache.thrift.TException te) {
-
 
10792
        throw new java.io.IOException(te);
-
 
10793
      }
-
 
10794
    }
-
 
10795
 
-
 
10796
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10797
      try {
-
 
10798
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10799
        __isset_bit_vector = new BitSet(1);
-
 
10800
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10801
      } catch (org.apache.thrift.TException te) {
-
 
10802
        throw new java.io.IOException(te);
-
 
10803
      }
-
 
10804
    }
-
 
10805
 
-
 
10806
  }
-
 
10807
 
-
 
10808
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10809
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
-
 
10810
 
-
 
10811
    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);
-
 
10812
 
-
 
10813
    private List<InvoiceScan> success; // required
-
 
10814
 
-
 
10815
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10816
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10817
      SUCCESS((short)0, "success");
-
 
10818
 
-
 
10819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10820
 
-
 
10821
      static {
-
 
10822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10823
          byName.put(field.getFieldName(), field);
-
 
10824
        }
-
 
10825
      }
-
 
10826
 
-
 
10827
      /**
-
 
10828
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10829
       */
-
 
10830
      public static _Fields findByThriftId(int fieldId) {
-
 
10831
        switch(fieldId) {
-
 
10832
          case 0: // SUCCESS
-
 
10833
            return SUCCESS;
-
 
10834
          default:
-
 
10835
            return null;
-
 
10836
        }
-
 
10837
      }
-
 
10838
 
-
 
10839
      /**
-
 
10840
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10841
       * if it is not found.
-
 
10842
       */
-
 
10843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10844
        _Fields fields = findByThriftId(fieldId);
-
 
10845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10846
        return fields;
-
 
10847
      }
-
 
10848
 
-
 
10849
      /**
-
 
10850
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10851
       */
-
 
10852
      public static _Fields findByName(String name) {
-
 
10853
        return byName.get(name);
-
 
10854
      }
-
 
10855
 
-
 
10856
      private final short _thriftId;
-
 
10857
      private final String _fieldName;
-
 
10858
 
-
 
10859
      _Fields(short thriftId, String fieldName) {
-
 
10860
        _thriftId = thriftId;
-
 
10861
        _fieldName = fieldName;
-
 
10862
      }
-
 
10863
 
-
 
10864
      public short getThriftFieldId() {
-
 
10865
        return _thriftId;
-
 
10866
      }
-
 
10867
 
-
 
10868
      public String getFieldName() {
-
 
10869
        return _fieldName;
-
 
10870
      }
-
 
10871
    }
-
 
10872
 
-
 
10873
    // isset id assignments
-
 
10874
 
-
 
10875
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10876
    static {
-
 
10877
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10878
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10879
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
10880
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
-
 
10881
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10882
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
-
 
10883
    }
-
 
10884
 
-
 
10885
    public fetchScansPerInvoiceNumber_result() {
-
 
10886
    }
-
 
10887
 
-
 
10888
    public fetchScansPerInvoiceNumber_result(
-
 
10889
      List<InvoiceScan> success)
-
 
10890
    {
-
 
10891
      this();
-
 
10892
      this.success = success;
-
 
10893
    }
-
 
10894
 
-
 
10895
    /**
-
 
10896
     * Performs a deep copy on <i>other</i>.
-
 
10897
     */
-
 
10898
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
-
 
10899
      if (other.isSetSuccess()) {
-
 
10900
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
-
 
10901
        for (InvoiceScan other_element : other.success) {
-
 
10902
          __this__success.add(new InvoiceScan(other_element));
-
 
10903
        }
-
 
10904
        this.success = __this__success;
-
 
10905
      }
-
 
10906
    }
-
 
10907
 
-
 
10908
    public fetchScansPerInvoiceNumber_result deepCopy() {
-
 
10909
      return new fetchScansPerInvoiceNumber_result(this);
-
 
10910
    }
-
 
10911
 
-
 
10912
    @Override
-
 
10913
    public void clear() {
-
 
10914
      this.success = null;
-
 
10915
    }
-
 
10916
 
-
 
10917
    public int getSuccessSize() {
-
 
10918
      return (this.success == null) ? 0 : this.success.size();
-
 
10919
    }
-
 
10920
 
-
 
10921
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
-
 
10922
      return (this.success == null) ? null : this.success.iterator();
-
 
10923
    }
-
 
10924
 
-
 
10925
    public void addToSuccess(InvoiceScan elem) {
-
 
10926
      if (this.success == null) {
-
 
10927
        this.success = new ArrayList<InvoiceScan>();
-
 
10928
      }
-
 
10929
      this.success.add(elem);
-
 
10930
    }
-
 
10931
 
-
 
10932
    public List<InvoiceScan> getSuccess() {
-
 
10933
      return this.success;
-
 
10934
    }
-
 
10935
 
-
 
10936
    public void setSuccess(List<InvoiceScan> success) {
-
 
10937
      this.success = success;
-
 
10938
    }
-
 
10939
 
-
 
10940
    public void unsetSuccess() {
-
 
10941
      this.success = null;
-
 
10942
    }
-
 
10943
 
-
 
10944
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
10945
    public boolean isSetSuccess() {
-
 
10946
      return this.success != null;
-
 
10947
    }
-
 
10948
 
-
 
10949
    public void setSuccessIsSet(boolean value) {
-
 
10950
      if (!value) {
-
 
10951
        this.success = null;
-
 
10952
      }
-
 
10953
    }
-
 
10954
 
-
 
10955
    public void setFieldValue(_Fields field, Object value) {
-
 
10956
      switch (field) {
-
 
10957
      case SUCCESS:
-
 
10958
        if (value == null) {
-
 
10959
          unsetSuccess();
-
 
10960
        } else {
-
 
10961
          setSuccess((List<InvoiceScan>)value);
-
 
10962
        }
-
 
10963
        break;
-
 
10964
 
-
 
10965
      }
-
 
10966
    }
-
 
10967
 
-
 
10968
    public Object getFieldValue(_Fields field) {
-
 
10969
      switch (field) {
-
 
10970
      case SUCCESS:
-
 
10971
        return getSuccess();
-
 
10972
 
-
 
10973
      }
-
 
10974
      throw new IllegalStateException();
-
 
10975
    }
-
 
10976
 
-
 
10977
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10978
    public boolean isSet(_Fields field) {
-
 
10979
      if (field == null) {
-
 
10980
        throw new IllegalArgumentException();
-
 
10981
      }
-
 
10982
 
-
 
10983
      switch (field) {
-
 
10984
      case SUCCESS:
-
 
10985
        return isSetSuccess();
-
 
10986
      }
-
 
10987
      throw new IllegalStateException();
-
 
10988
    }
-
 
10989
 
-
 
10990
    @Override
-
 
10991
    public boolean equals(Object that) {
-
 
10992
      if (that == null)
-
 
10993
        return false;
-
 
10994
      if (that instanceof fetchScansPerInvoiceNumber_result)
-
 
10995
        return this.equals((fetchScansPerInvoiceNumber_result)that);
-
 
10996
      return false;
-
 
10997
    }
-
 
10998
 
-
 
10999
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
-
 
11000
      if (that == null)
-
 
11001
        return false;
-
 
11002
 
-
 
11003
      boolean this_present_success = true && this.isSetSuccess();
-
 
11004
      boolean that_present_success = true && that.isSetSuccess();
-
 
11005
      if (this_present_success || that_present_success) {
-
 
11006
        if (!(this_present_success && that_present_success))
-
 
11007
          return false;
-
 
11008
        if (!this.success.equals(that.success))
-
 
11009
          return false;
-
 
11010
      }
-
 
11011
 
-
 
11012
      return true;
-
 
11013
    }
-
 
11014
 
-
 
11015
    @Override
-
 
11016
    public int hashCode() {
-
 
11017
      return 0;
-
 
11018
    }
-
 
11019
 
-
 
11020
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
-
 
11021
      if (!getClass().equals(other.getClass())) {
-
 
11022
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11023
      }
-
 
11024
 
-
 
11025
      int lastComparison = 0;
-
 
11026
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
-
 
11027
 
-
 
11028
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
11029
      if (lastComparison != 0) {
-
 
11030
        return lastComparison;
-
 
11031
      }
-
 
11032
      if (isSetSuccess()) {
-
 
11033
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
11034
        if (lastComparison != 0) {
-
 
11035
          return lastComparison;
-
 
11036
        }
-
 
11037
      }
-
 
11038
      return 0;
-
 
11039
    }
-
 
11040
 
-
 
11041
    public _Fields fieldForId(int fieldId) {
-
 
11042
      return _Fields.findByThriftId(fieldId);
-
 
11043
    }
-
 
11044
 
-
 
11045
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11046
      org.apache.thrift.protocol.TField field;
-
 
11047
      iprot.readStructBegin();
-
 
11048
      while (true)
-
 
11049
      {
-
 
11050
        field = iprot.readFieldBegin();
-
 
11051
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11052
          break;
-
 
11053
        }
-
 
11054
        switch (field.id) {
-
 
11055
          case 0: // SUCCESS
-
 
11056
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
11057
              {
-
 
11058
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
-
 
11059
                this.success = new ArrayList<InvoiceScan>(_list16.size);
-
 
11060
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
-
 
11061
                {
-
 
11062
                  InvoiceScan _elem18; // required
-
 
11063
                  _elem18 = new InvoiceScan();
-
 
11064
                  _elem18.read(iprot);
-
 
11065
                  this.success.add(_elem18);
-
 
11066
                }
-
 
11067
                iprot.readListEnd();
-
 
11068
              }
-
 
11069
            } else { 
-
 
11070
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11071
            }
-
 
11072
            break;
-
 
11073
          default:
-
 
11074
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11075
        }
-
 
11076
        iprot.readFieldEnd();
-
 
11077
      }
-
 
11078
      iprot.readStructEnd();
-
 
11079
      validate();
-
 
11080
    }
-
 
11081
 
-
 
11082
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11083
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11084
 
-
 
11085
      if (this.isSetSuccess()) {
-
 
11086
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11087
        {
-
 
11088
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
11089
          for (InvoiceScan _iter19 : this.success)
-
 
11090
          {
-
 
11091
            _iter19.write(oprot);
-
 
11092
          }
-
 
11093
          oprot.writeListEnd();
-
 
11094
        }
-
 
11095
        oprot.writeFieldEnd();
-
 
11096
      }
-
 
11097
      oprot.writeFieldStop();
-
 
11098
      oprot.writeStructEnd();
-
 
11099
    }
-
 
11100
 
-
 
11101
    @Override
-
 
11102
    public String toString() {
-
 
11103
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
-
 
11104
      boolean first = true;
-
 
11105
 
-
 
11106
      sb.append("success:");
-
 
11107
      if (this.success == null) {
-
 
11108
        sb.append("null");
10403
      } else {
11109
      } else {
10404
        sb.append(this.success);
11110
        sb.append(this.success);
10405
      }
11111
      }
10406
      first = false;
11112
      first = false;
10407
      sb.append(")");
11113
      sb.append(")");