Subversion Repositories SmartDukaan

Rev

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

Rev 6467 Rev 6630
Line 175... Line 175...
175
    /**
175
    /**
176
     * Create a new Purchase Return
176
     * Create a new Purchase Return
177
     */
177
     */
178
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
178
    public List<PurchaseReturn> getUnsettledPurchaseReturns() throws org.apache.thrift.TException;
179
 
179
 
-
 
180
    /**
-
 
181
     * Get invoice with given supplierId and invoiceNumber
-
 
182
     * 
-
 
183
     * @param invoiceNumber
-
 
184
     * @param supplierId
-
 
185
     */
-
 
186
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException;
-
 
187
 
180
  }
188
  }
181
 
189
 
182
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
190
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
183
 
191
 
184
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
192
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
Line 221... Line 229...
221
 
229
 
222
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
230
    public void settlePurchaseReturn(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.settlePurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
223
 
231
 
224
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
232
    public void getUnsettledPurchaseReturns(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnsettledPurchaseReturns_call> resultHandler) throws org.apache.thrift.TException;
225
 
233
 
-
 
234
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoice_call> resultHandler) throws org.apache.thrift.TException;
-
 
235
 
226
  }
236
  }
227
 
237
 
228
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
238
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
229
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
239
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
230
      public Factory() {}
240
      public Factory() {}
Line 755... Line 765...
755
        return result.success;
765
        return result.success;
756
      }
766
      }
757
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
767
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
758
    }
768
    }
759
 
769
 
-
 
770
    public List<PurchaseReturn> getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
-
 
771
    {
-
 
772
      send_getInvoice(invoiceNumber, supplierId);
-
 
773
      return recv_getInvoice();
-
 
774
    }
-
 
775
 
-
 
776
    public void send_getInvoice(String invoiceNumber, long supplierId) throws org.apache.thrift.TException
-
 
777
    {
-
 
778
      getInvoice_args args = new getInvoice_args();
-
 
779
      args.setInvoiceNumber(invoiceNumber);
-
 
780
      args.setSupplierId(supplierId);
-
 
781
      sendBase("getInvoice", args);
-
 
782
    }
-
 
783
 
-
 
784
    public List<PurchaseReturn> recv_getInvoice() throws org.apache.thrift.TException
-
 
785
    {
-
 
786
      getInvoice_result result = new getInvoice_result();
-
 
787
      receiveBase(result, "getInvoice");
-
 
788
      if (result.isSetSuccess()) {
-
 
789
        return result.success;
-
 
790
      }
-
 
791
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
-
 
792
    }
-
 
793
 
760
  }
794
  }
761
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
795
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
762
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
796
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
763
      private org.apache.thrift.async.TAsyncClientManager clientManager;
797
      private org.apache.thrift.async.TAsyncClientManager clientManager;
764
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
798
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1460... Line 1494...
1460
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1494
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1461
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1495
        return (new Client(prot)).recv_getUnsettledPurchaseReturns();
1462
      }
1496
      }
1463
    }
1497
    }
1464
 
1498
 
-
 
1499
    public void getInvoice(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_call> resultHandler) throws org.apache.thrift.TException {
-
 
1500
      checkReady();
-
 
1501
      getInvoice_call method_call = new getInvoice_call(invoiceNumber, supplierId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1502
      this.___currentMethod = method_call;
-
 
1503
      ___manager.call(method_call);
-
 
1504
    }
-
 
1505
 
-
 
1506
    public static class getInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1507
      private String invoiceNumber;
-
 
1508
      private long supplierId;
-
 
1509
      public getInvoice_call(String invoiceNumber, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getInvoice_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 {
-
 
1510
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1511
        this.invoiceNumber = invoiceNumber;
-
 
1512
        this.supplierId = supplierId;
-
 
1513
      }
-
 
1514
 
-
 
1515
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1516
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1517
        getInvoice_args args = new getInvoice_args();
-
 
1518
        args.setInvoiceNumber(invoiceNumber);
-
 
1519
        args.setSupplierId(supplierId);
-
 
1520
        args.write(prot);
-
 
1521
        prot.writeMessageEnd();
-
 
1522
      }
-
 
1523
 
-
 
1524
      public List<PurchaseReturn> getResult() throws org.apache.thrift.TException {
-
 
1525
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1526
          throw new IllegalStateException("Method call not finished!");
-
 
1527
        }
-
 
1528
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1529
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1530
        return (new Client(prot)).recv_getInvoice();
-
 
1531
      }
-
 
1532
    }
-
 
1533
 
1465
  }
1534
  }
1466
 
1535
 
1467
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1536
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1468
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1537
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1469
    public Processor(I iface) {
1538
    public Processor(I iface) {
Line 1494... Line 1563...
1494
      processMap.put("addSupplier", new addSupplier());
1563
      processMap.put("addSupplier", new addSupplier());
1495
      processMap.put("updateSupplier", new updateSupplier());
1564
      processMap.put("updateSupplier", new updateSupplier());
1496
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1565
      processMap.put("createPurchaseReturn", new createPurchaseReturn());
1497
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1566
      processMap.put("settlePurchaseReturn", new settlePurchaseReturn());
1498
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
1567
      processMap.put("getUnsettledPurchaseReturns", new getUnsettledPurchaseReturns());
-
 
1568
      processMap.put("getInvoice", new getInvoice());
1499
      return processMap;
1569
      return processMap;
1500
    }
1570
    }
1501
 
1571
 
1502
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1572
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1503
      public createPurchaseOrder() {
1573
      public createPurchaseOrder() {
Line 1893... Line 1963...
1893
        result.success = iface.getUnsettledPurchaseReturns();
1963
        result.success = iface.getUnsettledPurchaseReturns();
1894
        return result;
1964
        return result;
1895
      }
1965
      }
1896
    }
1966
    }
1897
 
1967
 
-
 
1968
    private static class getInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoice_args> {
-
 
1969
      public getInvoice() {
-
 
1970
        super("getInvoice");
-
 
1971
      }
-
 
1972
 
-
 
1973
      protected getInvoice_args getEmptyArgsInstance() {
-
 
1974
        return new getInvoice_args();
-
 
1975
      }
-
 
1976
 
-
 
1977
      protected getInvoice_result getResult(I iface, getInvoice_args args) throws org.apache.thrift.TException {
-
 
1978
        getInvoice_result result = new getInvoice_result();
-
 
1979
        result.success = iface.getInvoice(args.invoiceNumber, args.supplierId);
-
 
1980
        return result;
-
 
1981
      }
-
 
1982
    }
-
 
1983
 
1898
  }
1984
  }
1899
 
1985
 
1900
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1986
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1987
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1902
 
1988
 
Line 15566... Line 15652...
15566
      boolean first = true;
15652
      boolean first = true;
15567
 
15653
 
15568
      sb.append("success:");
15654
      sb.append("success:");
15569
      if (this.success == null) {
15655
      if (this.success == null) {
15570
        sb.append("null");
15656
        sb.append("null");
-
 
15657
      } else {
-
 
15658
        sb.append(this.success);
-
 
15659
      }
-
 
15660
      first = false;
-
 
15661
      sb.append(")");
-
 
15662
      return sb.toString();
-
 
15663
    }
-
 
15664
 
-
 
15665
    public void validate() throws org.apache.thrift.TException {
-
 
15666
      // check for required fields
-
 
15667
    }
-
 
15668
 
-
 
15669
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
15670
      try {
-
 
15671
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
15672
      } catch (org.apache.thrift.TException te) {
-
 
15673
        throw new java.io.IOException(te);
-
 
15674
      }
-
 
15675
    }
-
 
15676
 
-
 
15677
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
15678
      try {
-
 
15679
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
15680
      } catch (org.apache.thrift.TException te) {
-
 
15681
        throw new java.io.IOException(te);
-
 
15682
      }
-
 
15683
    }
-
 
15684
 
-
 
15685
  }
-
 
15686
 
-
 
15687
  public static class getInvoice_args implements org.apache.thrift.TBase<getInvoice_args, getInvoice_args._Fields>, java.io.Serializable, Cloneable   {
-
 
15688
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_args");
-
 
15689
 
-
 
15690
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
-
 
15691
    private static final org.apache.thrift.protocol.TField SUPPLIER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
15692
 
-
 
15693
    private String invoiceNumber; // required
-
 
15694
    private long supplierId; // required
-
 
15695
 
-
 
15696
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
15697
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
15698
      INVOICE_NUMBER((short)1, "invoiceNumber"),
-
 
15699
      SUPPLIER_ID((short)2, "supplierId");
-
 
15700
 
-
 
15701
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
15702
 
-
 
15703
      static {
-
 
15704
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
15705
          byName.put(field.getFieldName(), field);
-
 
15706
        }
-
 
15707
      }
-
 
15708
 
-
 
15709
      /**
-
 
15710
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
15711
       */
-
 
15712
      public static _Fields findByThriftId(int fieldId) {
-
 
15713
        switch(fieldId) {
-
 
15714
          case 1: // INVOICE_NUMBER
-
 
15715
            return INVOICE_NUMBER;
-
 
15716
          case 2: // SUPPLIER_ID
-
 
15717
            return SUPPLIER_ID;
-
 
15718
          default:
-
 
15719
            return null;
-
 
15720
        }
-
 
15721
      }
-
 
15722
 
-
 
15723
      /**
-
 
15724
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
15725
       * if it is not found.
-
 
15726
       */
-
 
15727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
15728
        _Fields fields = findByThriftId(fieldId);
-
 
15729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
15730
        return fields;
-
 
15731
      }
-
 
15732
 
-
 
15733
      /**
-
 
15734
       * Find the _Fields constant that matches name, or null if its not found.
-
 
15735
       */
-
 
15736
      public static _Fields findByName(String name) {
-
 
15737
        return byName.get(name);
-
 
15738
      }
-
 
15739
 
-
 
15740
      private final short _thriftId;
-
 
15741
      private final String _fieldName;
-
 
15742
 
-
 
15743
      _Fields(short thriftId, String fieldName) {
-
 
15744
        _thriftId = thriftId;
-
 
15745
        _fieldName = fieldName;
-
 
15746
      }
-
 
15747
 
-
 
15748
      public short getThriftFieldId() {
-
 
15749
        return _thriftId;
-
 
15750
      }
-
 
15751
 
-
 
15752
      public String getFieldName() {
-
 
15753
        return _fieldName;
-
 
15754
      }
-
 
15755
    }
-
 
15756
 
-
 
15757
    // isset id assignments
-
 
15758
    private static final int __SUPPLIERID_ISSET_ID = 0;
-
 
15759
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
15760
 
-
 
15761
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
15762
    static {
-
 
15763
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
15764
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15765
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
15766
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
15767
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
15768
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
15769
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_args.class, metaDataMap);
-
 
15770
    }
-
 
15771
 
-
 
15772
    public getInvoice_args() {
-
 
15773
    }
-
 
15774
 
-
 
15775
    public getInvoice_args(
-
 
15776
      String invoiceNumber,
-
 
15777
      long supplierId)
-
 
15778
    {
-
 
15779
      this();
-
 
15780
      this.invoiceNumber = invoiceNumber;
-
 
15781
      this.supplierId = supplierId;
-
 
15782
      setSupplierIdIsSet(true);
-
 
15783
    }
-
 
15784
 
-
 
15785
    /**
-
 
15786
     * Performs a deep copy on <i>other</i>.
-
 
15787
     */
-
 
15788
    public getInvoice_args(getInvoice_args other) {
-
 
15789
      __isset_bit_vector.clear();
-
 
15790
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
15791
      if (other.isSetInvoiceNumber()) {
-
 
15792
        this.invoiceNumber = other.invoiceNumber;
-
 
15793
      }
-
 
15794
      this.supplierId = other.supplierId;
-
 
15795
    }
-
 
15796
 
-
 
15797
    public getInvoice_args deepCopy() {
-
 
15798
      return new getInvoice_args(this);
-
 
15799
    }
-
 
15800
 
-
 
15801
    @Override
-
 
15802
    public void clear() {
-
 
15803
      this.invoiceNumber = null;
-
 
15804
      setSupplierIdIsSet(false);
-
 
15805
      this.supplierId = 0;
-
 
15806
    }
-
 
15807
 
-
 
15808
    public String getInvoiceNumber() {
-
 
15809
      return this.invoiceNumber;
-
 
15810
    }
-
 
15811
 
-
 
15812
    public void setInvoiceNumber(String invoiceNumber) {
-
 
15813
      this.invoiceNumber = invoiceNumber;
-
 
15814
    }
-
 
15815
 
-
 
15816
    public void unsetInvoiceNumber() {
-
 
15817
      this.invoiceNumber = null;
-
 
15818
    }
-
 
15819
 
-
 
15820
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
-
 
15821
    public boolean isSetInvoiceNumber() {
-
 
15822
      return this.invoiceNumber != null;
-
 
15823
    }
-
 
15824
 
-
 
15825
    public void setInvoiceNumberIsSet(boolean value) {
-
 
15826
      if (!value) {
-
 
15827
        this.invoiceNumber = null;
-
 
15828
      }
-
 
15829
    }
-
 
15830
 
-
 
15831
    public long getSupplierId() {
-
 
15832
      return this.supplierId;
-
 
15833
    }
-
 
15834
 
-
 
15835
    public void setSupplierId(long supplierId) {
-
 
15836
      this.supplierId = supplierId;
-
 
15837
      setSupplierIdIsSet(true);
-
 
15838
    }
-
 
15839
 
-
 
15840
    public void unsetSupplierId() {
-
 
15841
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
-
 
15842
    }
-
 
15843
 
-
 
15844
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
-
 
15845
    public boolean isSetSupplierId() {
-
 
15846
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
-
 
15847
    }
-
 
15848
 
-
 
15849
    public void setSupplierIdIsSet(boolean value) {
-
 
15850
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
-
 
15851
    }
-
 
15852
 
-
 
15853
    public void setFieldValue(_Fields field, Object value) {
-
 
15854
      switch (field) {
-
 
15855
      case INVOICE_NUMBER:
-
 
15856
        if (value == null) {
-
 
15857
          unsetInvoiceNumber();
-
 
15858
        } else {
-
 
15859
          setInvoiceNumber((String)value);
-
 
15860
        }
-
 
15861
        break;
-
 
15862
 
-
 
15863
      case SUPPLIER_ID:
-
 
15864
        if (value == null) {
-
 
15865
          unsetSupplierId();
-
 
15866
        } else {
-
 
15867
          setSupplierId((Long)value);
-
 
15868
        }
-
 
15869
        break;
-
 
15870
 
-
 
15871
      }
-
 
15872
    }
-
 
15873
 
-
 
15874
    public Object getFieldValue(_Fields field) {
-
 
15875
      switch (field) {
-
 
15876
      case INVOICE_NUMBER:
-
 
15877
        return getInvoiceNumber();
-
 
15878
 
-
 
15879
      case SUPPLIER_ID:
-
 
15880
        return Long.valueOf(getSupplierId());
-
 
15881
 
-
 
15882
      }
-
 
15883
      throw new IllegalStateException();
-
 
15884
    }
-
 
15885
 
-
 
15886
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
15887
    public boolean isSet(_Fields field) {
-
 
15888
      if (field == null) {
-
 
15889
        throw new IllegalArgumentException();
-
 
15890
      }
-
 
15891
 
-
 
15892
      switch (field) {
-
 
15893
      case INVOICE_NUMBER:
-
 
15894
        return isSetInvoiceNumber();
-
 
15895
      case SUPPLIER_ID:
-
 
15896
        return isSetSupplierId();
-
 
15897
      }
-
 
15898
      throw new IllegalStateException();
-
 
15899
    }
-
 
15900
 
-
 
15901
    @Override
-
 
15902
    public boolean equals(Object that) {
-
 
15903
      if (that == null)
-
 
15904
        return false;
-
 
15905
      if (that instanceof getInvoice_args)
-
 
15906
        return this.equals((getInvoice_args)that);
-
 
15907
      return false;
-
 
15908
    }
-
 
15909
 
-
 
15910
    public boolean equals(getInvoice_args that) {
-
 
15911
      if (that == null)
-
 
15912
        return false;
-
 
15913
 
-
 
15914
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
-
 
15915
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
-
 
15916
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
-
 
15917
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
-
 
15918
          return false;
-
 
15919
        if (!this.invoiceNumber.equals(that.invoiceNumber))
-
 
15920
          return false;
-
 
15921
      }
-
 
15922
 
-
 
15923
      boolean this_present_supplierId = true;
-
 
15924
      boolean that_present_supplierId = true;
-
 
15925
      if (this_present_supplierId || that_present_supplierId) {
-
 
15926
        if (!(this_present_supplierId && that_present_supplierId))
-
 
15927
          return false;
-
 
15928
        if (this.supplierId != that.supplierId)
-
 
15929
          return false;
-
 
15930
      }
-
 
15931
 
-
 
15932
      return true;
-
 
15933
    }
-
 
15934
 
-
 
15935
    @Override
-
 
15936
    public int hashCode() {
-
 
15937
      return 0;
-
 
15938
    }
-
 
15939
 
-
 
15940
    public int compareTo(getInvoice_args other) {
-
 
15941
      if (!getClass().equals(other.getClass())) {
-
 
15942
        return getClass().getName().compareTo(other.getClass().getName());
-
 
15943
      }
-
 
15944
 
-
 
15945
      int lastComparison = 0;
-
 
15946
      getInvoice_args typedOther = (getInvoice_args)other;
-
 
15947
 
-
 
15948
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
-
 
15949
      if (lastComparison != 0) {
-
 
15950
        return lastComparison;
-
 
15951
      }
-
 
15952
      if (isSetInvoiceNumber()) {
-
 
15953
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
-
 
15954
        if (lastComparison != 0) {
-
 
15955
          return lastComparison;
-
 
15956
        }
-
 
15957
      }
-
 
15958
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
-
 
15959
      if (lastComparison != 0) {
-
 
15960
        return lastComparison;
-
 
15961
      }
-
 
15962
      if (isSetSupplierId()) {
-
 
15963
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
-
 
15964
        if (lastComparison != 0) {
-
 
15965
          return lastComparison;
-
 
15966
        }
-
 
15967
      }
-
 
15968
      return 0;
-
 
15969
    }
-
 
15970
 
-
 
15971
    public _Fields fieldForId(int fieldId) {
-
 
15972
      return _Fields.findByThriftId(fieldId);
-
 
15973
    }
-
 
15974
 
-
 
15975
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
15976
      org.apache.thrift.protocol.TField field;
-
 
15977
      iprot.readStructBegin();
-
 
15978
      while (true)
-
 
15979
      {
-
 
15980
        field = iprot.readFieldBegin();
-
 
15981
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
15982
          break;
-
 
15983
        }
-
 
15984
        switch (field.id) {
-
 
15985
          case 1: // INVOICE_NUMBER
-
 
15986
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
15987
              this.invoiceNumber = iprot.readString();
-
 
15988
            } else { 
-
 
15989
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15990
            }
-
 
15991
            break;
-
 
15992
          case 2: // SUPPLIER_ID
-
 
15993
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
15994
              this.supplierId = iprot.readI64();
-
 
15995
              setSupplierIdIsSet(true);
-
 
15996
            } else { 
-
 
15997
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
15998
            }
-
 
15999
            break;
-
 
16000
          default:
-
 
16001
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16002
        }
-
 
16003
        iprot.readFieldEnd();
-
 
16004
      }
-
 
16005
      iprot.readStructEnd();
-
 
16006
      validate();
-
 
16007
    }
-
 
16008
 
-
 
16009
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
16010
      validate();
-
 
16011
 
-
 
16012
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16013
      if (this.invoiceNumber != null) {
-
 
16014
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
-
 
16015
        oprot.writeString(this.invoiceNumber);
-
 
16016
        oprot.writeFieldEnd();
-
 
16017
      }
-
 
16018
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
-
 
16019
      oprot.writeI64(this.supplierId);
-
 
16020
      oprot.writeFieldEnd();
-
 
16021
      oprot.writeFieldStop();
-
 
16022
      oprot.writeStructEnd();
-
 
16023
    }
-
 
16024
 
-
 
16025
    @Override
-
 
16026
    public String toString() {
-
 
16027
      StringBuilder sb = new StringBuilder("getInvoice_args(");
-
 
16028
      boolean first = true;
-
 
16029
 
-
 
16030
      sb.append("invoiceNumber:");
-
 
16031
      if (this.invoiceNumber == null) {
-
 
16032
        sb.append("null");
-
 
16033
      } else {
-
 
16034
        sb.append(this.invoiceNumber);
-
 
16035
      }
-
 
16036
      first = false;
-
 
16037
      if (!first) sb.append(", ");
-
 
16038
      sb.append("supplierId:");
-
 
16039
      sb.append(this.supplierId);
-
 
16040
      first = false;
-
 
16041
      sb.append(")");
-
 
16042
      return sb.toString();
-
 
16043
    }
-
 
16044
 
-
 
16045
    public void validate() throws org.apache.thrift.TException {
-
 
16046
      // check for required fields
-
 
16047
    }
-
 
16048
 
-
 
16049
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
16050
      try {
-
 
16051
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
16052
      } catch (org.apache.thrift.TException te) {
-
 
16053
        throw new java.io.IOException(te);
-
 
16054
      }
-
 
16055
    }
-
 
16056
 
-
 
16057
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
16058
      try {
-
 
16059
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
16060
      } catch (org.apache.thrift.TException te) {
-
 
16061
        throw new java.io.IOException(te);
-
 
16062
      }
-
 
16063
    }
-
 
16064
 
-
 
16065
  }
-
 
16066
 
-
 
16067
  public static class getInvoice_result implements org.apache.thrift.TBase<getInvoice_result, getInvoice_result._Fields>, java.io.Serializable, Cloneable   {
-
 
16068
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoice_result");
-
 
16069
 
-
 
16070
    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);
-
 
16071
 
-
 
16072
    private List<PurchaseReturn> success; // required
-
 
16073
 
-
 
16074
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
16075
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
16076
      SUCCESS((short)0, "success");
-
 
16077
 
-
 
16078
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
16079
 
-
 
16080
      static {
-
 
16081
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
16082
          byName.put(field.getFieldName(), field);
-
 
16083
        }
-
 
16084
      }
-
 
16085
 
-
 
16086
      /**
-
 
16087
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
16088
       */
-
 
16089
      public static _Fields findByThriftId(int fieldId) {
-
 
16090
        switch(fieldId) {
-
 
16091
          case 0: // SUCCESS
-
 
16092
            return SUCCESS;
-
 
16093
          default:
-
 
16094
            return null;
-
 
16095
        }
-
 
16096
      }
-
 
16097
 
-
 
16098
      /**
-
 
16099
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
16100
       * if it is not found.
-
 
16101
       */
-
 
16102
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
16103
        _Fields fields = findByThriftId(fieldId);
-
 
16104
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
16105
        return fields;
-
 
16106
      }
-
 
16107
 
-
 
16108
      /**
-
 
16109
       * Find the _Fields constant that matches name, or null if its not found.
-
 
16110
       */
-
 
16111
      public static _Fields findByName(String name) {
-
 
16112
        return byName.get(name);
-
 
16113
      }
-
 
16114
 
-
 
16115
      private final short _thriftId;
-
 
16116
      private final String _fieldName;
-
 
16117
 
-
 
16118
      _Fields(short thriftId, String fieldName) {
-
 
16119
        _thriftId = thriftId;
-
 
16120
        _fieldName = fieldName;
-
 
16121
      }
-
 
16122
 
-
 
16123
      public short getThriftFieldId() {
-
 
16124
        return _thriftId;
-
 
16125
      }
-
 
16126
 
-
 
16127
      public String getFieldName() {
-
 
16128
        return _fieldName;
-
 
16129
      }
-
 
16130
    }
-
 
16131
 
-
 
16132
    // isset id assignments
-
 
16133
 
-
 
16134
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
16135
    static {
-
 
16136
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
16137
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
16138
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
16139
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PurchaseReturn.class))));
-
 
16140
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
16141
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoice_result.class, metaDataMap);
-
 
16142
    }
-
 
16143
 
-
 
16144
    public getInvoice_result() {
-
 
16145
    }
-
 
16146
 
-
 
16147
    public getInvoice_result(
-
 
16148
      List<PurchaseReturn> success)
-
 
16149
    {
-
 
16150
      this();
-
 
16151
      this.success = success;
-
 
16152
    }
-
 
16153
 
-
 
16154
    /**
-
 
16155
     * Performs a deep copy on <i>other</i>.
-
 
16156
     */
-
 
16157
    public getInvoice_result(getInvoice_result other) {
-
 
16158
      if (other.isSetSuccess()) {
-
 
16159
        List<PurchaseReturn> __this__success = new ArrayList<PurchaseReturn>();
-
 
16160
        for (PurchaseReturn other_element : other.success) {
-
 
16161
          __this__success.add(new PurchaseReturn(other_element));
-
 
16162
        }
-
 
16163
        this.success = __this__success;
-
 
16164
      }
-
 
16165
    }
-
 
16166
 
-
 
16167
    public getInvoice_result deepCopy() {
-
 
16168
      return new getInvoice_result(this);
-
 
16169
    }
-
 
16170
 
-
 
16171
    @Override
-
 
16172
    public void clear() {
-
 
16173
      this.success = null;
-
 
16174
    }
-
 
16175
 
-
 
16176
    public int getSuccessSize() {
-
 
16177
      return (this.success == null) ? 0 : this.success.size();
-
 
16178
    }
-
 
16179
 
-
 
16180
    public java.util.Iterator<PurchaseReturn> getSuccessIterator() {
-
 
16181
      return (this.success == null) ? null : this.success.iterator();
-
 
16182
    }
-
 
16183
 
-
 
16184
    public void addToSuccess(PurchaseReturn elem) {
-
 
16185
      if (this.success == null) {
-
 
16186
        this.success = new ArrayList<PurchaseReturn>();
-
 
16187
      }
-
 
16188
      this.success.add(elem);
-
 
16189
    }
-
 
16190
 
-
 
16191
    public List<PurchaseReturn> getSuccess() {
-
 
16192
      return this.success;
-
 
16193
    }
-
 
16194
 
-
 
16195
    public void setSuccess(List<PurchaseReturn> success) {
-
 
16196
      this.success = success;
-
 
16197
    }
-
 
16198
 
-
 
16199
    public void unsetSuccess() {
-
 
16200
      this.success = null;
-
 
16201
    }
-
 
16202
 
-
 
16203
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
16204
    public boolean isSetSuccess() {
-
 
16205
      return this.success != null;
-
 
16206
    }
-
 
16207
 
-
 
16208
    public void setSuccessIsSet(boolean value) {
-
 
16209
      if (!value) {
-
 
16210
        this.success = null;
-
 
16211
      }
-
 
16212
    }
-
 
16213
 
-
 
16214
    public void setFieldValue(_Fields field, Object value) {
-
 
16215
      switch (field) {
-
 
16216
      case SUCCESS:
-
 
16217
        if (value == null) {
-
 
16218
          unsetSuccess();
-
 
16219
        } else {
-
 
16220
          setSuccess((List<PurchaseReturn>)value);
-
 
16221
        }
-
 
16222
        break;
-
 
16223
 
-
 
16224
      }
-
 
16225
    }
-
 
16226
 
-
 
16227
    public Object getFieldValue(_Fields field) {
-
 
16228
      switch (field) {
-
 
16229
      case SUCCESS:
-
 
16230
        return getSuccess();
-
 
16231
 
-
 
16232
      }
-
 
16233
      throw new IllegalStateException();
-
 
16234
    }
-
 
16235
 
-
 
16236
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
16237
    public boolean isSet(_Fields field) {
-
 
16238
      if (field == null) {
-
 
16239
        throw new IllegalArgumentException();
-
 
16240
      }
-
 
16241
 
-
 
16242
      switch (field) {
-
 
16243
      case SUCCESS:
-
 
16244
        return isSetSuccess();
-
 
16245
      }
-
 
16246
      throw new IllegalStateException();
-
 
16247
    }
-
 
16248
 
-
 
16249
    @Override
-
 
16250
    public boolean equals(Object that) {
-
 
16251
      if (that == null)
-
 
16252
        return false;
-
 
16253
      if (that instanceof getInvoice_result)
-
 
16254
        return this.equals((getInvoice_result)that);
-
 
16255
      return false;
-
 
16256
    }
-
 
16257
 
-
 
16258
    public boolean equals(getInvoice_result that) {
-
 
16259
      if (that == null)
-
 
16260
        return false;
-
 
16261
 
-
 
16262
      boolean this_present_success = true && this.isSetSuccess();
-
 
16263
      boolean that_present_success = true && that.isSetSuccess();
-
 
16264
      if (this_present_success || that_present_success) {
-
 
16265
        if (!(this_present_success && that_present_success))
-
 
16266
          return false;
-
 
16267
        if (!this.success.equals(that.success))
-
 
16268
          return false;
-
 
16269
      }
-
 
16270
 
-
 
16271
      return true;
-
 
16272
    }
-
 
16273
 
-
 
16274
    @Override
-
 
16275
    public int hashCode() {
-
 
16276
      return 0;
-
 
16277
    }
-
 
16278
 
-
 
16279
    public int compareTo(getInvoice_result other) {
-
 
16280
      if (!getClass().equals(other.getClass())) {
-
 
16281
        return getClass().getName().compareTo(other.getClass().getName());
-
 
16282
      }
-
 
16283
 
-
 
16284
      int lastComparison = 0;
-
 
16285
      getInvoice_result typedOther = (getInvoice_result)other;
-
 
16286
 
-
 
16287
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
16288
      if (lastComparison != 0) {
-
 
16289
        return lastComparison;
-
 
16290
      }
-
 
16291
      if (isSetSuccess()) {
-
 
16292
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
16293
        if (lastComparison != 0) {
-
 
16294
          return lastComparison;
-
 
16295
        }
-
 
16296
      }
-
 
16297
      return 0;
-
 
16298
    }
-
 
16299
 
-
 
16300
    public _Fields fieldForId(int fieldId) {
-
 
16301
      return _Fields.findByThriftId(fieldId);
-
 
16302
    }
-
 
16303
 
-
 
16304
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
16305
      org.apache.thrift.protocol.TField field;
-
 
16306
      iprot.readStructBegin();
-
 
16307
      while (true)
-
 
16308
      {
-
 
16309
        field = iprot.readFieldBegin();
-
 
16310
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
16311
          break;
-
 
16312
        }
-
 
16313
        switch (field.id) {
-
 
16314
          case 0: // SUCCESS
-
 
16315
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
16316
              {
-
 
16317
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
-
 
16318
                this.success = new ArrayList<PurchaseReturn>(_list32.size);
-
 
16319
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
-
 
16320
                {
-
 
16321
                  PurchaseReturn _elem34; // required
-
 
16322
                  _elem34 = new PurchaseReturn();
-
 
16323
                  _elem34.read(iprot);
-
 
16324
                  this.success.add(_elem34);
-
 
16325
                }
-
 
16326
                iprot.readListEnd();
-
 
16327
              }
-
 
16328
            } else { 
-
 
16329
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16330
            }
-
 
16331
            break;
-
 
16332
          default:
-
 
16333
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
16334
        }
-
 
16335
        iprot.readFieldEnd();
-
 
16336
      }
-
 
16337
      iprot.readStructEnd();
-
 
16338
      validate();
-
 
16339
    }
-
 
16340
 
-
 
16341
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
16342
      oprot.writeStructBegin(STRUCT_DESC);
-
 
16343
 
-
 
16344
      if (this.isSetSuccess()) {
-
 
16345
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
16346
        {
-
 
16347
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
16348
          for (PurchaseReturn _iter35 : this.success)
-
 
16349
          {
-
 
16350
            _iter35.write(oprot);
-
 
16351
          }
-
 
16352
          oprot.writeListEnd();
-
 
16353
        }
-
 
16354
        oprot.writeFieldEnd();
-
 
16355
      }
-
 
16356
      oprot.writeFieldStop();
-
 
16357
      oprot.writeStructEnd();
-
 
16358
    }
-
 
16359
 
-
 
16360
    @Override
-
 
16361
    public String toString() {
-
 
16362
      StringBuilder sb = new StringBuilder("getInvoice_result(");
-
 
16363
      boolean first = true;
-
 
16364
 
-
 
16365
      sb.append("success:");
-
 
16366
      if (this.success == null) {
-
 
16367
        sb.append("null");
15571
      } else {
16368
      } else {
15572
        sb.append(this.success);
16369
        sb.append(this.success);
15573
      }
16370
      }
15574
      first = false;
16371
      first = false;
15575
      sb.append(")");
16372
      sb.append(")");