Subversion Repositories SmartDukaan

Rev

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

Rev 5185 Rev 5443
Line 121... Line 121...
121
     * @param itemId
121
     * @param itemId
122
     * @param quantity
122
     * @param quantity
123
     */
123
     */
124
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
124
    public void unFulfillPO(long purchaseId, long itemId, long quantity) throws PurchaseServiceException, org.apache.thrift.TException;
125
 
125
 
-
 
126
    /**
-
 
127
     * Fetches all invoices for a given date
-
 
128
     * 
-
 
129
     * @param date
-
 
130
     */
-
 
131
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException;
-
 
132
 
-
 
133
    /**
-
 
134
     * Creates an invoice object
-
 
135
     * 
-
 
136
     * @param invoice
-
 
137
     */
-
 
138
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException;
-
 
139
 
126
  }
140
  }
127
 
141
 
128
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
142
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
129
 
143
 
130
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
144
    public void createPurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
Line 151... Line 165...
151
 
165
 
152
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
166
    public void updatePurchaseOrder(PurchaseOrder purchaseOrder, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePurchaseOrder_call> resultHandler) throws org.apache.thrift.TException;
153
 
167
 
154
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
168
    public void unFulfillPO(long purchaseId, long itemId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unFulfillPO_call> resultHandler) throws org.apache.thrift.TException;
155
 
169
 
-
 
170
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInvoices_call> resultHandler) throws org.apache.thrift.TException;
-
 
171
 
-
 
172
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInvoice_call> resultHandler) throws org.apache.thrift.TException;
-
 
173
 
156
  }
174
  }
157
 
175
 
158
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
176
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
159
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
177
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
160
      public Factory() {}
178
      public Factory() {}
Line 505... Line 523...
505
        throw result.e;
523
        throw result.e;
506
      }
524
      }
507
      return;
525
      return;
508
    }
526
    }
509
 
527
 
-
 
528
    public List<Invoice> getInvoices(long date) throws org.apache.thrift.TException
-
 
529
    {
-
 
530
      send_getInvoices(date);
-
 
531
      return recv_getInvoices();
-
 
532
    }
-
 
533
 
-
 
534
    public void send_getInvoices(long date) throws org.apache.thrift.TException
-
 
535
    {
-
 
536
      getInvoices_args args = new getInvoices_args();
-
 
537
      args.setDate(date);
-
 
538
      sendBase("getInvoices", args);
-
 
539
    }
-
 
540
 
-
 
541
    public List<Invoice> recv_getInvoices() throws org.apache.thrift.TException
-
 
542
    {
-
 
543
      getInvoices_result result = new getInvoices_result();
-
 
544
      receiveBase(result, "getInvoices");
-
 
545
      if (result.isSetSuccess()) {
-
 
546
        return result.success;
-
 
547
      }
-
 
548
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
-
 
549
    }
-
 
550
 
-
 
551
    public void createInvoice(Invoice invoice) throws PurchaseServiceException, org.apache.thrift.TException
-
 
552
    {
-
 
553
      send_createInvoice(invoice);
-
 
554
      recv_createInvoice();
-
 
555
    }
-
 
556
 
-
 
557
    public void send_createInvoice(Invoice invoice) throws org.apache.thrift.TException
-
 
558
    {
-
 
559
      createInvoice_args args = new createInvoice_args();
-
 
560
      args.setInvoice(invoice);
-
 
561
      sendBase("createInvoice", args);
-
 
562
    }
-
 
563
 
-
 
564
    public void recv_createInvoice() throws PurchaseServiceException, org.apache.thrift.TException
-
 
565
    {
-
 
566
      createInvoice_result result = new createInvoice_result();
-
 
567
      receiveBase(result, "createInvoice");
-
 
568
      if (result.e != null) {
-
 
569
        throw result.e;
-
 
570
      }
-
 
571
      return;
-
 
572
    }
-
 
573
 
510
  }
574
  }
511
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
575
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
512
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
576
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
513
      private org.apache.thrift.async.TAsyncClientManager clientManager;
577
      private org.apache.thrift.async.TAsyncClientManager clientManager;
514
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
578
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 957... Line 1021...
957
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1021
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
958
        (new Client(prot)).recv_unFulfillPO();
1022
        (new Client(prot)).recv_unFulfillPO();
959
      }
1023
      }
960
    }
1024
    }
961
 
1025
 
-
 
1026
    public void getInvoices(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_call> resultHandler) throws org.apache.thrift.TException {
-
 
1027
      checkReady();
-
 
1028
      getInvoices_call method_call = new getInvoices_call(date, resultHandler, this, ___protocolFactory, ___transport);
-
 
1029
      this.___currentMethod = method_call;
-
 
1030
      ___manager.call(method_call);
-
 
1031
    }
-
 
1032
 
-
 
1033
    public static class getInvoices_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1034
      private long date;
-
 
1035
      public getInvoices_call(long date, org.apache.thrift.async.AsyncMethodCallback<getInvoices_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 {
-
 
1036
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1037
        this.date = date;
-
 
1038
      }
-
 
1039
 
-
 
1040
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1041
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInvoices", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1042
        getInvoices_args args = new getInvoices_args();
-
 
1043
        args.setDate(date);
-
 
1044
        args.write(prot);
-
 
1045
        prot.writeMessageEnd();
-
 
1046
      }
-
 
1047
 
-
 
1048
      public List<Invoice> getResult() throws org.apache.thrift.TException {
-
 
1049
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1050
          throw new IllegalStateException("Method call not finished!");
-
 
1051
        }
-
 
1052
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1053
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1054
        return (new Client(prot)).recv_getInvoices();
-
 
1055
      }
-
 
1056
    }
-
 
1057
 
-
 
1058
    public void createInvoice(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_call> resultHandler) throws org.apache.thrift.TException {
-
 
1059
      checkReady();
-
 
1060
      createInvoice_call method_call = new createInvoice_call(invoice, resultHandler, this, ___protocolFactory, ___transport);
-
 
1061
      this.___currentMethod = method_call;
-
 
1062
      ___manager.call(method_call);
-
 
1063
    }
-
 
1064
 
-
 
1065
    public static class createInvoice_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1066
      private Invoice invoice;
-
 
1067
      public createInvoice_call(Invoice invoice, org.apache.thrift.async.AsyncMethodCallback<createInvoice_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 {
-
 
1068
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1069
        this.invoice = invoice;
-
 
1070
      }
-
 
1071
 
-
 
1072
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1073
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInvoice", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1074
        createInvoice_args args = new createInvoice_args();
-
 
1075
        args.setInvoice(invoice);
-
 
1076
        args.write(prot);
-
 
1077
        prot.writeMessageEnd();
-
 
1078
      }
-
 
1079
 
-
 
1080
      public void getResult() throws PurchaseServiceException, org.apache.thrift.TException {
-
 
1081
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1082
          throw new IllegalStateException("Method call not finished!");
-
 
1083
        }
-
 
1084
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1085
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1086
        (new Client(prot)).recv_createInvoice();
-
 
1087
      }
-
 
1088
    }
-
 
1089
 
962
  }
1090
  }
963
 
1091
 
964
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1092
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
965
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1093
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
966
    public Processor(I iface) {
1094
    public Processor(I iface) {
Line 983... Line 1111...
983
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
1111
      processMap.put("getPendingPurchaseOrders", new getPendingPurchaseOrders());
984
      processMap.put("getSuppliers", new getSuppliers());
1112
      processMap.put("getSuppliers", new getSuppliers());
985
      processMap.put("fulfillPO", new fulfillPO());
1113
      processMap.put("fulfillPO", new fulfillPO());
986
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
1114
      processMap.put("updatePurchaseOrder", new updatePurchaseOrder());
987
      processMap.put("unFulfillPO", new unFulfillPO());
1115
      processMap.put("unFulfillPO", new unFulfillPO());
-
 
1116
      processMap.put("getInvoices", new getInvoices());
-
 
1117
      processMap.put("createInvoice", new createInvoice());
988
      return processMap;
1118
      return processMap;
989
    }
1119
    }
990
 
1120
 
991
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
1121
    private static class createPurchaseOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPurchaseOrder_args> {
992
      public createPurchaseOrder() {
1122
      public createPurchaseOrder() {
Line 1245... Line 1375...
1245
        }
1375
        }
1246
        return result;
1376
        return result;
1247
      }
1377
      }
1248
    }
1378
    }
1249
 
1379
 
-
 
1380
    private static class getInvoices<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInvoices_args> {
-
 
1381
      public getInvoices() {
-
 
1382
        super("getInvoices");
-
 
1383
      }
-
 
1384
 
-
 
1385
      protected getInvoices_args getEmptyArgsInstance() {
-
 
1386
        return new getInvoices_args();
-
 
1387
      }
-
 
1388
 
-
 
1389
      protected getInvoices_result getResult(I iface, getInvoices_args args) throws org.apache.thrift.TException {
-
 
1390
        getInvoices_result result = new getInvoices_result();
-
 
1391
        result.success = iface.getInvoices(args.date);
-
 
1392
        return result;
-
 
1393
      }
-
 
1394
    }
-
 
1395
 
-
 
1396
    private static class createInvoice<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInvoice_args> {
-
 
1397
      public createInvoice() {
-
 
1398
        super("createInvoice");
-
 
1399
      }
-
 
1400
 
-
 
1401
      protected createInvoice_args getEmptyArgsInstance() {
-
 
1402
        return new createInvoice_args();
-
 
1403
      }
-
 
1404
 
-
 
1405
      protected createInvoice_result getResult(I iface, createInvoice_args args) throws org.apache.thrift.TException {
-
 
1406
        createInvoice_result result = new createInvoice_result();
-
 
1407
        try {
-
 
1408
          iface.createInvoice(args.invoice);
-
 
1409
        } catch (PurchaseServiceException e) {
-
 
1410
          result.e = e;
-
 
1411
        }
-
 
1412
        return result;
-
 
1413
      }
-
 
1414
    }
-
 
1415
 
1250
  }
1416
  }
1251
 
1417
 
1252
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1418
  public static class createPurchaseOrder_args implements org.apache.thrift.TBase<createPurchaseOrder_args, createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable   {
1253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1419
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPurchaseOrder_args");
1254
 
1420
 
Line 10296... Line 10462...
10296
      boolean first = true;
10462
      boolean first = true;
10297
 
10463
 
10298
      sb.append("e:");
10464
      sb.append("e:");
10299
      if (this.e == null) {
10465
      if (this.e == null) {
10300
        sb.append("null");
10466
        sb.append("null");
-
 
10467
      } else {
-
 
10468
        sb.append(this.e);
-
 
10469
      }
-
 
10470
      first = false;
-
 
10471
      sb.append(")");
-
 
10472
      return sb.toString();
-
 
10473
    }
-
 
10474
 
-
 
10475
    public void validate() throws org.apache.thrift.TException {
-
 
10476
      // check for required fields
-
 
10477
    }
-
 
10478
 
-
 
10479
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10480
      try {
-
 
10481
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10482
      } catch (org.apache.thrift.TException te) {
-
 
10483
        throw new java.io.IOException(te);
-
 
10484
      }
-
 
10485
    }
-
 
10486
 
-
 
10487
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10488
      try {
-
 
10489
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10490
      } catch (org.apache.thrift.TException te) {
-
 
10491
        throw new java.io.IOException(te);
-
 
10492
      }
-
 
10493
    }
-
 
10494
 
-
 
10495
  }
-
 
10496
 
-
 
10497
  public static class getInvoices_args implements org.apache.thrift.TBase<getInvoices_args, getInvoices_args._Fields>, java.io.Serializable, Cloneable   {
-
 
10498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_args");
-
 
10499
 
-
 
10500
    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);
-
 
10501
 
-
 
10502
    private long date; // required
-
 
10503
 
-
 
10504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10505
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10506
      DATE((short)1, "date");
-
 
10507
 
-
 
10508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10509
 
-
 
10510
      static {
-
 
10511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10512
          byName.put(field.getFieldName(), field);
-
 
10513
        }
-
 
10514
      }
-
 
10515
 
-
 
10516
      /**
-
 
10517
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10518
       */
-
 
10519
      public static _Fields findByThriftId(int fieldId) {
-
 
10520
        switch(fieldId) {
-
 
10521
          case 1: // DATE
-
 
10522
            return DATE;
-
 
10523
          default:
-
 
10524
            return null;
-
 
10525
        }
-
 
10526
      }
-
 
10527
 
-
 
10528
      /**
-
 
10529
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10530
       * if it is not found.
-
 
10531
       */
-
 
10532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10533
        _Fields fields = findByThriftId(fieldId);
-
 
10534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10535
        return fields;
-
 
10536
      }
-
 
10537
 
-
 
10538
      /**
-
 
10539
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10540
       */
-
 
10541
      public static _Fields findByName(String name) {
-
 
10542
        return byName.get(name);
-
 
10543
      }
-
 
10544
 
-
 
10545
      private final short _thriftId;
-
 
10546
      private final String _fieldName;
-
 
10547
 
-
 
10548
      _Fields(short thriftId, String fieldName) {
-
 
10549
        _thriftId = thriftId;
-
 
10550
        _fieldName = fieldName;
-
 
10551
      }
-
 
10552
 
-
 
10553
      public short getThriftFieldId() {
-
 
10554
        return _thriftId;
-
 
10555
      }
-
 
10556
 
-
 
10557
      public String getFieldName() {
-
 
10558
        return _fieldName;
-
 
10559
      }
-
 
10560
    }
-
 
10561
 
-
 
10562
    // isset id assignments
-
 
10563
    private static final int __DATE_ISSET_ID = 0;
-
 
10564
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
10565
 
-
 
10566
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10567
    static {
-
 
10568
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10569
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10570
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10571
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10572
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_args.class, metaDataMap);
-
 
10573
    }
-
 
10574
 
-
 
10575
    public getInvoices_args() {
-
 
10576
    }
-
 
10577
 
-
 
10578
    public getInvoices_args(
-
 
10579
      long date)
-
 
10580
    {
-
 
10581
      this();
-
 
10582
      this.date = date;
-
 
10583
      setDateIsSet(true);
-
 
10584
    }
-
 
10585
 
-
 
10586
    /**
-
 
10587
     * Performs a deep copy on <i>other</i>.
-
 
10588
     */
-
 
10589
    public getInvoices_args(getInvoices_args other) {
-
 
10590
      __isset_bit_vector.clear();
-
 
10591
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
10592
      this.date = other.date;
-
 
10593
    }
-
 
10594
 
-
 
10595
    public getInvoices_args deepCopy() {
-
 
10596
      return new getInvoices_args(this);
-
 
10597
    }
-
 
10598
 
-
 
10599
    @Override
-
 
10600
    public void clear() {
-
 
10601
      setDateIsSet(false);
-
 
10602
      this.date = 0;
-
 
10603
    }
-
 
10604
 
-
 
10605
    public long getDate() {
-
 
10606
      return this.date;
-
 
10607
    }
-
 
10608
 
-
 
10609
    public void setDate(long date) {
-
 
10610
      this.date = date;
-
 
10611
      setDateIsSet(true);
-
 
10612
    }
-
 
10613
 
-
 
10614
    public void unsetDate() {
-
 
10615
      __isset_bit_vector.clear(__DATE_ISSET_ID);
-
 
10616
    }
-
 
10617
 
-
 
10618
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
-
 
10619
    public boolean isSetDate() {
-
 
10620
      return __isset_bit_vector.get(__DATE_ISSET_ID);
-
 
10621
    }
-
 
10622
 
-
 
10623
    public void setDateIsSet(boolean value) {
-
 
10624
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
-
 
10625
    }
-
 
10626
 
-
 
10627
    public void setFieldValue(_Fields field, Object value) {
-
 
10628
      switch (field) {
-
 
10629
      case DATE:
-
 
10630
        if (value == null) {
-
 
10631
          unsetDate();
-
 
10632
        } else {
-
 
10633
          setDate((Long)value);
-
 
10634
        }
-
 
10635
        break;
-
 
10636
 
-
 
10637
      }
-
 
10638
    }
-
 
10639
 
-
 
10640
    public Object getFieldValue(_Fields field) {
-
 
10641
      switch (field) {
-
 
10642
      case DATE:
-
 
10643
        return Long.valueOf(getDate());
-
 
10644
 
-
 
10645
      }
-
 
10646
      throw new IllegalStateException();
-
 
10647
    }
-
 
10648
 
-
 
10649
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10650
    public boolean isSet(_Fields field) {
-
 
10651
      if (field == null) {
-
 
10652
        throw new IllegalArgumentException();
-
 
10653
      }
-
 
10654
 
-
 
10655
      switch (field) {
-
 
10656
      case DATE:
-
 
10657
        return isSetDate();
-
 
10658
      }
-
 
10659
      throw new IllegalStateException();
-
 
10660
    }
-
 
10661
 
-
 
10662
    @Override
-
 
10663
    public boolean equals(Object that) {
-
 
10664
      if (that == null)
-
 
10665
        return false;
-
 
10666
      if (that instanceof getInvoices_args)
-
 
10667
        return this.equals((getInvoices_args)that);
-
 
10668
      return false;
-
 
10669
    }
-
 
10670
 
-
 
10671
    public boolean equals(getInvoices_args that) {
-
 
10672
      if (that == null)
-
 
10673
        return false;
-
 
10674
 
-
 
10675
      boolean this_present_date = true;
-
 
10676
      boolean that_present_date = true;
-
 
10677
      if (this_present_date || that_present_date) {
-
 
10678
        if (!(this_present_date && that_present_date))
-
 
10679
          return false;
-
 
10680
        if (this.date != that.date)
-
 
10681
          return false;
-
 
10682
      }
-
 
10683
 
-
 
10684
      return true;
-
 
10685
    }
-
 
10686
 
-
 
10687
    @Override
-
 
10688
    public int hashCode() {
-
 
10689
      return 0;
-
 
10690
    }
-
 
10691
 
-
 
10692
    public int compareTo(getInvoices_args other) {
-
 
10693
      if (!getClass().equals(other.getClass())) {
-
 
10694
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10695
      }
-
 
10696
 
-
 
10697
      int lastComparison = 0;
-
 
10698
      getInvoices_args typedOther = (getInvoices_args)other;
-
 
10699
 
-
 
10700
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
-
 
10701
      if (lastComparison != 0) {
-
 
10702
        return lastComparison;
-
 
10703
      }
-
 
10704
      if (isSetDate()) {
-
 
10705
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
-
 
10706
        if (lastComparison != 0) {
-
 
10707
          return lastComparison;
-
 
10708
        }
-
 
10709
      }
-
 
10710
      return 0;
-
 
10711
    }
-
 
10712
 
-
 
10713
    public _Fields fieldForId(int fieldId) {
-
 
10714
      return _Fields.findByThriftId(fieldId);
-
 
10715
    }
-
 
10716
 
-
 
10717
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10718
      org.apache.thrift.protocol.TField field;
-
 
10719
      iprot.readStructBegin();
-
 
10720
      while (true)
-
 
10721
      {
-
 
10722
        field = iprot.readFieldBegin();
-
 
10723
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10724
          break;
-
 
10725
        }
-
 
10726
        switch (field.id) {
-
 
10727
          case 1: // DATE
-
 
10728
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10729
              this.date = iprot.readI64();
-
 
10730
              setDateIsSet(true);
-
 
10731
            } else { 
-
 
10732
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10733
            }
-
 
10734
            break;
-
 
10735
          default:
-
 
10736
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10737
        }
-
 
10738
        iprot.readFieldEnd();
-
 
10739
      }
-
 
10740
      iprot.readStructEnd();
-
 
10741
      validate();
-
 
10742
    }
-
 
10743
 
-
 
10744
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10745
      validate();
-
 
10746
 
-
 
10747
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10748
      oprot.writeFieldBegin(DATE_FIELD_DESC);
-
 
10749
      oprot.writeI64(this.date);
-
 
10750
      oprot.writeFieldEnd();
-
 
10751
      oprot.writeFieldStop();
-
 
10752
      oprot.writeStructEnd();
-
 
10753
    }
-
 
10754
 
-
 
10755
    @Override
-
 
10756
    public String toString() {
-
 
10757
      StringBuilder sb = new StringBuilder("getInvoices_args(");
-
 
10758
      boolean first = true;
-
 
10759
 
-
 
10760
      sb.append("date:");
-
 
10761
      sb.append(this.date);
-
 
10762
      first = false;
-
 
10763
      sb.append(")");
-
 
10764
      return sb.toString();
-
 
10765
    }
-
 
10766
 
-
 
10767
    public void validate() throws org.apache.thrift.TException {
-
 
10768
      // check for required fields
-
 
10769
    }
-
 
10770
 
-
 
10771
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10772
      try {
-
 
10773
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10774
      } catch (org.apache.thrift.TException te) {
-
 
10775
        throw new java.io.IOException(te);
-
 
10776
      }
-
 
10777
    }
-
 
10778
 
-
 
10779
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10780
      try {
-
 
10781
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10782
        __isset_bit_vector = new BitSet(1);
-
 
10783
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10784
      } catch (org.apache.thrift.TException te) {
-
 
10785
        throw new java.io.IOException(te);
-
 
10786
      }
-
 
10787
    }
-
 
10788
 
-
 
10789
  }
-
 
10790
 
-
 
10791
  public static class getInvoices_result implements org.apache.thrift.TBase<getInvoices_result, getInvoices_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10792
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInvoices_result");
-
 
10793
 
-
 
10794
    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);
-
 
10795
 
-
 
10796
    private List<Invoice> success; // required
-
 
10797
 
-
 
10798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10799
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10800
      SUCCESS((short)0, "success");
-
 
10801
 
-
 
10802
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10803
 
-
 
10804
      static {
-
 
10805
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10806
          byName.put(field.getFieldName(), field);
-
 
10807
        }
-
 
10808
      }
-
 
10809
 
-
 
10810
      /**
-
 
10811
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10812
       */
-
 
10813
      public static _Fields findByThriftId(int fieldId) {
-
 
10814
        switch(fieldId) {
-
 
10815
          case 0: // SUCCESS
-
 
10816
            return SUCCESS;
-
 
10817
          default:
-
 
10818
            return null;
-
 
10819
        }
-
 
10820
      }
-
 
10821
 
-
 
10822
      /**
-
 
10823
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10824
       * if it is not found.
-
 
10825
       */
-
 
10826
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10827
        _Fields fields = findByThriftId(fieldId);
-
 
10828
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10829
        return fields;
-
 
10830
      }
-
 
10831
 
-
 
10832
      /**
-
 
10833
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10834
       */
-
 
10835
      public static _Fields findByName(String name) {
-
 
10836
        return byName.get(name);
-
 
10837
      }
-
 
10838
 
-
 
10839
      private final short _thriftId;
-
 
10840
      private final String _fieldName;
-
 
10841
 
-
 
10842
      _Fields(short thriftId, String fieldName) {
-
 
10843
        _thriftId = thriftId;
-
 
10844
        _fieldName = fieldName;
-
 
10845
      }
-
 
10846
 
-
 
10847
      public short getThriftFieldId() {
-
 
10848
        return _thriftId;
-
 
10849
      }
-
 
10850
 
-
 
10851
      public String getFieldName() {
-
 
10852
        return _fieldName;
-
 
10853
      }
-
 
10854
    }
-
 
10855
 
-
 
10856
    // isset id assignments
-
 
10857
 
-
 
10858
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10859
    static {
-
 
10860
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10861
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10862
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
10863
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class))));
-
 
10864
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10865
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInvoices_result.class, metaDataMap);
-
 
10866
    }
-
 
10867
 
-
 
10868
    public getInvoices_result() {
-
 
10869
    }
-
 
10870
 
-
 
10871
    public getInvoices_result(
-
 
10872
      List<Invoice> success)
-
 
10873
    {
-
 
10874
      this();
-
 
10875
      this.success = success;
-
 
10876
    }
-
 
10877
 
-
 
10878
    /**
-
 
10879
     * Performs a deep copy on <i>other</i>.
-
 
10880
     */
-
 
10881
    public getInvoices_result(getInvoices_result other) {
-
 
10882
      if (other.isSetSuccess()) {
-
 
10883
        List<Invoice> __this__success = new ArrayList<Invoice>();
-
 
10884
        for (Invoice other_element : other.success) {
-
 
10885
          __this__success.add(new Invoice(other_element));
-
 
10886
        }
-
 
10887
        this.success = __this__success;
-
 
10888
      }
-
 
10889
    }
-
 
10890
 
-
 
10891
    public getInvoices_result deepCopy() {
-
 
10892
      return new getInvoices_result(this);
-
 
10893
    }
-
 
10894
 
-
 
10895
    @Override
-
 
10896
    public void clear() {
-
 
10897
      this.success = null;
-
 
10898
    }
-
 
10899
 
-
 
10900
    public int getSuccessSize() {
-
 
10901
      return (this.success == null) ? 0 : this.success.size();
-
 
10902
    }
-
 
10903
 
-
 
10904
    public java.util.Iterator<Invoice> getSuccessIterator() {
-
 
10905
      return (this.success == null) ? null : this.success.iterator();
-
 
10906
    }
-
 
10907
 
-
 
10908
    public void addToSuccess(Invoice elem) {
-
 
10909
      if (this.success == null) {
-
 
10910
        this.success = new ArrayList<Invoice>();
-
 
10911
      }
-
 
10912
      this.success.add(elem);
-
 
10913
    }
-
 
10914
 
-
 
10915
    public List<Invoice> getSuccess() {
-
 
10916
      return this.success;
-
 
10917
    }
-
 
10918
 
-
 
10919
    public void setSuccess(List<Invoice> success) {
-
 
10920
      this.success = success;
-
 
10921
    }
-
 
10922
 
-
 
10923
    public void unsetSuccess() {
-
 
10924
      this.success = null;
-
 
10925
    }
-
 
10926
 
-
 
10927
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
10928
    public boolean isSetSuccess() {
-
 
10929
      return this.success != null;
-
 
10930
    }
-
 
10931
 
-
 
10932
    public void setSuccessIsSet(boolean value) {
-
 
10933
      if (!value) {
-
 
10934
        this.success = null;
-
 
10935
      }
-
 
10936
    }
-
 
10937
 
-
 
10938
    public void setFieldValue(_Fields field, Object value) {
-
 
10939
      switch (field) {
-
 
10940
      case SUCCESS:
-
 
10941
        if (value == null) {
-
 
10942
          unsetSuccess();
-
 
10943
        } else {
-
 
10944
          setSuccess((List<Invoice>)value);
-
 
10945
        }
-
 
10946
        break;
-
 
10947
 
-
 
10948
      }
-
 
10949
    }
-
 
10950
 
-
 
10951
    public Object getFieldValue(_Fields field) {
-
 
10952
      switch (field) {
-
 
10953
      case SUCCESS:
-
 
10954
        return getSuccess();
-
 
10955
 
-
 
10956
      }
-
 
10957
      throw new IllegalStateException();
-
 
10958
    }
-
 
10959
 
-
 
10960
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10961
    public boolean isSet(_Fields field) {
-
 
10962
      if (field == null) {
-
 
10963
        throw new IllegalArgumentException();
-
 
10964
      }
-
 
10965
 
-
 
10966
      switch (field) {
-
 
10967
      case SUCCESS:
-
 
10968
        return isSetSuccess();
-
 
10969
      }
-
 
10970
      throw new IllegalStateException();
-
 
10971
    }
-
 
10972
 
-
 
10973
    @Override
-
 
10974
    public boolean equals(Object that) {
-
 
10975
      if (that == null)
-
 
10976
        return false;
-
 
10977
      if (that instanceof getInvoices_result)
-
 
10978
        return this.equals((getInvoices_result)that);
-
 
10979
      return false;
-
 
10980
    }
-
 
10981
 
-
 
10982
    public boolean equals(getInvoices_result that) {
-
 
10983
      if (that == null)
-
 
10984
        return false;
-
 
10985
 
-
 
10986
      boolean this_present_success = true && this.isSetSuccess();
-
 
10987
      boolean that_present_success = true && that.isSetSuccess();
-
 
10988
      if (this_present_success || that_present_success) {
-
 
10989
        if (!(this_present_success && that_present_success))
-
 
10990
          return false;
-
 
10991
        if (!this.success.equals(that.success))
-
 
10992
          return false;
-
 
10993
      }
-
 
10994
 
-
 
10995
      return true;
-
 
10996
    }
-
 
10997
 
-
 
10998
    @Override
-
 
10999
    public int hashCode() {
-
 
11000
      return 0;
-
 
11001
    }
-
 
11002
 
-
 
11003
    public int compareTo(getInvoices_result other) {
-
 
11004
      if (!getClass().equals(other.getClass())) {
-
 
11005
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11006
      }
-
 
11007
 
-
 
11008
      int lastComparison = 0;
-
 
11009
      getInvoices_result typedOther = (getInvoices_result)other;
-
 
11010
 
-
 
11011
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
11012
      if (lastComparison != 0) {
-
 
11013
        return lastComparison;
-
 
11014
      }
-
 
11015
      if (isSetSuccess()) {
-
 
11016
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
11017
        if (lastComparison != 0) {
-
 
11018
          return lastComparison;
-
 
11019
        }
-
 
11020
      }
-
 
11021
      return 0;
-
 
11022
    }
-
 
11023
 
-
 
11024
    public _Fields fieldForId(int fieldId) {
-
 
11025
      return _Fields.findByThriftId(fieldId);
-
 
11026
    }
-
 
11027
 
-
 
11028
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11029
      org.apache.thrift.protocol.TField field;
-
 
11030
      iprot.readStructBegin();
-
 
11031
      while (true)
-
 
11032
      {
-
 
11033
        field = iprot.readFieldBegin();
-
 
11034
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11035
          break;
-
 
11036
        }
-
 
11037
        switch (field.id) {
-
 
11038
          case 0: // SUCCESS
-
 
11039
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
11040
              {
-
 
11041
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
-
 
11042
                this.success = new ArrayList<Invoice>(_list20.size);
-
 
11043
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
-
 
11044
                {
-
 
11045
                  Invoice _elem22; // required
-
 
11046
                  _elem22 = new Invoice();
-
 
11047
                  _elem22.read(iprot);
-
 
11048
                  this.success.add(_elem22);
-
 
11049
                }
-
 
11050
                iprot.readListEnd();
-
 
11051
              }
-
 
11052
            } else { 
-
 
11053
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11054
            }
-
 
11055
            break;
-
 
11056
          default:
-
 
11057
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11058
        }
-
 
11059
        iprot.readFieldEnd();
-
 
11060
      }
-
 
11061
      iprot.readStructEnd();
-
 
11062
      validate();
-
 
11063
    }
-
 
11064
 
-
 
11065
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11066
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11067
 
-
 
11068
      if (this.isSetSuccess()) {
-
 
11069
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
11070
        {
-
 
11071
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
11072
          for (Invoice _iter23 : this.success)
-
 
11073
          {
-
 
11074
            _iter23.write(oprot);
-
 
11075
          }
-
 
11076
          oprot.writeListEnd();
-
 
11077
        }
-
 
11078
        oprot.writeFieldEnd();
-
 
11079
      }
-
 
11080
      oprot.writeFieldStop();
-
 
11081
      oprot.writeStructEnd();
-
 
11082
    }
-
 
11083
 
-
 
11084
    @Override
-
 
11085
    public String toString() {
-
 
11086
      StringBuilder sb = new StringBuilder("getInvoices_result(");
-
 
11087
      boolean first = true;
-
 
11088
 
-
 
11089
      sb.append("success:");
-
 
11090
      if (this.success == null) {
-
 
11091
        sb.append("null");
-
 
11092
      } else {
-
 
11093
        sb.append(this.success);
-
 
11094
      }
-
 
11095
      first = false;
-
 
11096
      sb.append(")");
-
 
11097
      return sb.toString();
-
 
11098
    }
-
 
11099
 
-
 
11100
    public void validate() throws org.apache.thrift.TException {
-
 
11101
      // check for required fields
-
 
11102
    }
-
 
11103
 
-
 
11104
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11105
      try {
-
 
11106
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11107
      } catch (org.apache.thrift.TException te) {
-
 
11108
        throw new java.io.IOException(te);
-
 
11109
      }
-
 
11110
    }
-
 
11111
 
-
 
11112
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11113
      try {
-
 
11114
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11115
      } catch (org.apache.thrift.TException te) {
-
 
11116
        throw new java.io.IOException(te);
-
 
11117
      }
-
 
11118
    }
-
 
11119
 
-
 
11120
  }
-
 
11121
 
-
 
11122
  public static class createInvoice_args implements org.apache.thrift.TBase<createInvoice_args, createInvoice_args._Fields>, java.io.Serializable, Cloneable   {
-
 
11123
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_args");
-
 
11124
 
-
 
11125
    private static final org.apache.thrift.protocol.TField INVOICE_FIELD_DESC = new org.apache.thrift.protocol.TField("invoice", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
11126
 
-
 
11127
    private Invoice invoice; // required
-
 
11128
 
-
 
11129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11130
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11131
      INVOICE((short)1, "invoice");
-
 
11132
 
-
 
11133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11134
 
-
 
11135
      static {
-
 
11136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11137
          byName.put(field.getFieldName(), field);
-
 
11138
        }
-
 
11139
      }
-
 
11140
 
-
 
11141
      /**
-
 
11142
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11143
       */
-
 
11144
      public static _Fields findByThriftId(int fieldId) {
-
 
11145
        switch(fieldId) {
-
 
11146
          case 1: // INVOICE
-
 
11147
            return INVOICE;
-
 
11148
          default:
-
 
11149
            return null;
-
 
11150
        }
-
 
11151
      }
-
 
11152
 
-
 
11153
      /**
-
 
11154
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11155
       * if it is not found.
-
 
11156
       */
-
 
11157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11158
        _Fields fields = findByThriftId(fieldId);
-
 
11159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11160
        return fields;
-
 
11161
      }
-
 
11162
 
-
 
11163
      /**
-
 
11164
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11165
       */
-
 
11166
      public static _Fields findByName(String name) {
-
 
11167
        return byName.get(name);
-
 
11168
      }
-
 
11169
 
-
 
11170
      private final short _thriftId;
-
 
11171
      private final String _fieldName;
-
 
11172
 
-
 
11173
      _Fields(short thriftId, String fieldName) {
-
 
11174
        _thriftId = thriftId;
-
 
11175
        _fieldName = fieldName;
-
 
11176
      }
-
 
11177
 
-
 
11178
      public short getThriftFieldId() {
-
 
11179
        return _thriftId;
-
 
11180
      }
-
 
11181
 
-
 
11182
      public String getFieldName() {
-
 
11183
        return _fieldName;
-
 
11184
      }
-
 
11185
    }
-
 
11186
 
-
 
11187
    // isset id assignments
-
 
11188
 
-
 
11189
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11190
    static {
-
 
11191
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11192
      tmpMap.put(_Fields.INVOICE, new org.apache.thrift.meta_data.FieldMetaData("invoice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11193
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Invoice.class)));
-
 
11194
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11195
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_args.class, metaDataMap);
-
 
11196
    }
-
 
11197
 
-
 
11198
    public createInvoice_args() {
-
 
11199
    }
-
 
11200
 
-
 
11201
    public createInvoice_args(
-
 
11202
      Invoice invoice)
-
 
11203
    {
-
 
11204
      this();
-
 
11205
      this.invoice = invoice;
-
 
11206
    }
-
 
11207
 
-
 
11208
    /**
-
 
11209
     * Performs a deep copy on <i>other</i>.
-
 
11210
     */
-
 
11211
    public createInvoice_args(createInvoice_args other) {
-
 
11212
      if (other.isSetInvoice()) {
-
 
11213
        this.invoice = new Invoice(other.invoice);
-
 
11214
      }
-
 
11215
    }
-
 
11216
 
-
 
11217
    public createInvoice_args deepCopy() {
-
 
11218
      return new createInvoice_args(this);
-
 
11219
    }
-
 
11220
 
-
 
11221
    @Override
-
 
11222
    public void clear() {
-
 
11223
      this.invoice = null;
-
 
11224
    }
-
 
11225
 
-
 
11226
    public Invoice getInvoice() {
-
 
11227
      return this.invoice;
-
 
11228
    }
-
 
11229
 
-
 
11230
    public void setInvoice(Invoice invoice) {
-
 
11231
      this.invoice = invoice;
-
 
11232
    }
-
 
11233
 
-
 
11234
    public void unsetInvoice() {
-
 
11235
      this.invoice = null;
-
 
11236
    }
-
 
11237
 
-
 
11238
    /** Returns true if field invoice is set (has been assigned a value) and false otherwise */
-
 
11239
    public boolean isSetInvoice() {
-
 
11240
      return this.invoice != null;
-
 
11241
    }
-
 
11242
 
-
 
11243
    public void setInvoiceIsSet(boolean value) {
-
 
11244
      if (!value) {
-
 
11245
        this.invoice = null;
-
 
11246
      }
-
 
11247
    }
-
 
11248
 
-
 
11249
    public void setFieldValue(_Fields field, Object value) {
-
 
11250
      switch (field) {
-
 
11251
      case INVOICE:
-
 
11252
        if (value == null) {
-
 
11253
          unsetInvoice();
-
 
11254
        } else {
-
 
11255
          setInvoice((Invoice)value);
-
 
11256
        }
-
 
11257
        break;
-
 
11258
 
-
 
11259
      }
-
 
11260
    }
-
 
11261
 
-
 
11262
    public Object getFieldValue(_Fields field) {
-
 
11263
      switch (field) {
-
 
11264
      case INVOICE:
-
 
11265
        return getInvoice();
-
 
11266
 
-
 
11267
      }
-
 
11268
      throw new IllegalStateException();
-
 
11269
    }
-
 
11270
 
-
 
11271
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11272
    public boolean isSet(_Fields field) {
-
 
11273
      if (field == null) {
-
 
11274
        throw new IllegalArgumentException();
-
 
11275
      }
-
 
11276
 
-
 
11277
      switch (field) {
-
 
11278
      case INVOICE:
-
 
11279
        return isSetInvoice();
-
 
11280
      }
-
 
11281
      throw new IllegalStateException();
-
 
11282
    }
-
 
11283
 
-
 
11284
    @Override
-
 
11285
    public boolean equals(Object that) {
-
 
11286
      if (that == null)
-
 
11287
        return false;
-
 
11288
      if (that instanceof createInvoice_args)
-
 
11289
        return this.equals((createInvoice_args)that);
-
 
11290
      return false;
-
 
11291
    }
-
 
11292
 
-
 
11293
    public boolean equals(createInvoice_args that) {
-
 
11294
      if (that == null)
-
 
11295
        return false;
-
 
11296
 
-
 
11297
      boolean this_present_invoice = true && this.isSetInvoice();
-
 
11298
      boolean that_present_invoice = true && that.isSetInvoice();
-
 
11299
      if (this_present_invoice || that_present_invoice) {
-
 
11300
        if (!(this_present_invoice && that_present_invoice))
-
 
11301
          return false;
-
 
11302
        if (!this.invoice.equals(that.invoice))
-
 
11303
          return false;
-
 
11304
      }
-
 
11305
 
-
 
11306
      return true;
-
 
11307
    }
-
 
11308
 
-
 
11309
    @Override
-
 
11310
    public int hashCode() {
-
 
11311
      return 0;
-
 
11312
    }
-
 
11313
 
-
 
11314
    public int compareTo(createInvoice_args other) {
-
 
11315
      if (!getClass().equals(other.getClass())) {
-
 
11316
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11317
      }
-
 
11318
 
-
 
11319
      int lastComparison = 0;
-
 
11320
      createInvoice_args typedOther = (createInvoice_args)other;
-
 
11321
 
-
 
11322
      lastComparison = Boolean.valueOf(isSetInvoice()).compareTo(typedOther.isSetInvoice());
-
 
11323
      if (lastComparison != 0) {
-
 
11324
        return lastComparison;
-
 
11325
      }
-
 
11326
      if (isSetInvoice()) {
-
 
11327
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoice, typedOther.invoice);
-
 
11328
        if (lastComparison != 0) {
-
 
11329
          return lastComparison;
-
 
11330
        }
-
 
11331
      }
-
 
11332
      return 0;
-
 
11333
    }
-
 
11334
 
-
 
11335
    public _Fields fieldForId(int fieldId) {
-
 
11336
      return _Fields.findByThriftId(fieldId);
-
 
11337
    }
-
 
11338
 
-
 
11339
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11340
      org.apache.thrift.protocol.TField field;
-
 
11341
      iprot.readStructBegin();
-
 
11342
      while (true)
-
 
11343
      {
-
 
11344
        field = iprot.readFieldBegin();
-
 
11345
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11346
          break;
-
 
11347
        }
-
 
11348
        switch (field.id) {
-
 
11349
          case 1: // INVOICE
-
 
11350
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
11351
              this.invoice = new Invoice();
-
 
11352
              this.invoice.read(iprot);
-
 
11353
            } else { 
-
 
11354
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11355
            }
-
 
11356
            break;
-
 
11357
          default:
-
 
11358
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11359
        }
-
 
11360
        iprot.readFieldEnd();
-
 
11361
      }
-
 
11362
      iprot.readStructEnd();
-
 
11363
      validate();
-
 
11364
    }
-
 
11365
 
-
 
11366
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11367
      validate();
-
 
11368
 
-
 
11369
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11370
      if (this.invoice != null) {
-
 
11371
        oprot.writeFieldBegin(INVOICE_FIELD_DESC);
-
 
11372
        this.invoice.write(oprot);
-
 
11373
        oprot.writeFieldEnd();
-
 
11374
      }
-
 
11375
      oprot.writeFieldStop();
-
 
11376
      oprot.writeStructEnd();
-
 
11377
    }
-
 
11378
 
-
 
11379
    @Override
-
 
11380
    public String toString() {
-
 
11381
      StringBuilder sb = new StringBuilder("createInvoice_args(");
-
 
11382
      boolean first = true;
-
 
11383
 
-
 
11384
      sb.append("invoice:");
-
 
11385
      if (this.invoice == null) {
-
 
11386
        sb.append("null");
-
 
11387
      } else {
-
 
11388
        sb.append(this.invoice);
-
 
11389
      }
-
 
11390
      first = false;
-
 
11391
      sb.append(")");
-
 
11392
      return sb.toString();
-
 
11393
    }
-
 
11394
 
-
 
11395
    public void validate() throws org.apache.thrift.TException {
-
 
11396
      // check for required fields
-
 
11397
    }
-
 
11398
 
-
 
11399
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11400
      try {
-
 
11401
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11402
      } catch (org.apache.thrift.TException te) {
-
 
11403
        throw new java.io.IOException(te);
-
 
11404
      }
-
 
11405
    }
-
 
11406
 
-
 
11407
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11408
      try {
-
 
11409
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11410
      } catch (org.apache.thrift.TException te) {
-
 
11411
        throw new java.io.IOException(te);
-
 
11412
      }
-
 
11413
    }
-
 
11414
 
-
 
11415
  }
-
 
11416
 
-
 
11417
  public static class createInvoice_result implements org.apache.thrift.TBase<createInvoice_result, createInvoice_result._Fields>, java.io.Serializable, Cloneable   {
-
 
11418
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInvoice_result");
-
 
11419
 
-
 
11420
    private static final org.apache.thrift.protocol.TField E_FIELD_DESC = new org.apache.thrift.protocol.TField("e", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
11421
 
-
 
11422
    private PurchaseServiceException e; // required
-
 
11423
 
-
 
11424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11425
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11426
      E((short)1, "e");
-
 
11427
 
-
 
11428
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11429
 
-
 
11430
      static {
-
 
11431
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11432
          byName.put(field.getFieldName(), field);
-
 
11433
        }
-
 
11434
      }
-
 
11435
 
-
 
11436
      /**
-
 
11437
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11438
       */
-
 
11439
      public static _Fields findByThriftId(int fieldId) {
-
 
11440
        switch(fieldId) {
-
 
11441
          case 1: // E
-
 
11442
            return E;
-
 
11443
          default:
-
 
11444
            return null;
-
 
11445
        }
-
 
11446
      }
-
 
11447
 
-
 
11448
      /**
-
 
11449
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11450
       * if it is not found.
-
 
11451
       */
-
 
11452
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11453
        _Fields fields = findByThriftId(fieldId);
-
 
11454
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11455
        return fields;
-
 
11456
      }
-
 
11457
 
-
 
11458
      /**
-
 
11459
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11460
       */
-
 
11461
      public static _Fields findByName(String name) {
-
 
11462
        return byName.get(name);
-
 
11463
      }
-
 
11464
 
-
 
11465
      private final short _thriftId;
-
 
11466
      private final String _fieldName;
-
 
11467
 
-
 
11468
      _Fields(short thriftId, String fieldName) {
-
 
11469
        _thriftId = thriftId;
-
 
11470
        _fieldName = fieldName;
-
 
11471
      }
-
 
11472
 
-
 
11473
      public short getThriftFieldId() {
-
 
11474
        return _thriftId;
-
 
11475
      }
-
 
11476
 
-
 
11477
      public String getFieldName() {
-
 
11478
        return _fieldName;
-
 
11479
      }
-
 
11480
    }
-
 
11481
 
-
 
11482
    // isset id assignments
-
 
11483
 
-
 
11484
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11485
    static {
-
 
11486
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11487
      tmpMap.put(_Fields.E, new org.apache.thrift.meta_data.FieldMetaData("e", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11488
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
11489
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11490
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInvoice_result.class, metaDataMap);
-
 
11491
    }
-
 
11492
 
-
 
11493
    public createInvoice_result() {
-
 
11494
    }
-
 
11495
 
-
 
11496
    public createInvoice_result(
-
 
11497
      PurchaseServiceException e)
-
 
11498
    {
-
 
11499
      this();
-
 
11500
      this.e = e;
-
 
11501
    }
-
 
11502
 
-
 
11503
    /**
-
 
11504
     * Performs a deep copy on <i>other</i>.
-
 
11505
     */
-
 
11506
    public createInvoice_result(createInvoice_result other) {
-
 
11507
      if (other.isSetE()) {
-
 
11508
        this.e = new PurchaseServiceException(other.e);
-
 
11509
      }
-
 
11510
    }
-
 
11511
 
-
 
11512
    public createInvoice_result deepCopy() {
-
 
11513
      return new createInvoice_result(this);
-
 
11514
    }
-
 
11515
 
-
 
11516
    @Override
-
 
11517
    public void clear() {
-
 
11518
      this.e = null;
-
 
11519
    }
-
 
11520
 
-
 
11521
    public PurchaseServiceException getE() {
-
 
11522
      return this.e;
-
 
11523
    }
-
 
11524
 
-
 
11525
    public void setE(PurchaseServiceException e) {
-
 
11526
      this.e = e;
-
 
11527
    }
-
 
11528
 
-
 
11529
    public void unsetE() {
-
 
11530
      this.e = null;
-
 
11531
    }
-
 
11532
 
-
 
11533
    /** Returns true if field e is set (has been assigned a value) and false otherwise */
-
 
11534
    public boolean isSetE() {
-
 
11535
      return this.e != null;
-
 
11536
    }
-
 
11537
 
-
 
11538
    public void setEIsSet(boolean value) {
-
 
11539
      if (!value) {
-
 
11540
        this.e = null;
-
 
11541
      }
-
 
11542
    }
-
 
11543
 
-
 
11544
    public void setFieldValue(_Fields field, Object value) {
-
 
11545
      switch (field) {
-
 
11546
      case E:
-
 
11547
        if (value == null) {
-
 
11548
          unsetE();
-
 
11549
        } else {
-
 
11550
          setE((PurchaseServiceException)value);
-
 
11551
        }
-
 
11552
        break;
-
 
11553
 
-
 
11554
      }
-
 
11555
    }
-
 
11556
 
-
 
11557
    public Object getFieldValue(_Fields field) {
-
 
11558
      switch (field) {
-
 
11559
      case E:
-
 
11560
        return getE();
-
 
11561
 
-
 
11562
      }
-
 
11563
      throw new IllegalStateException();
-
 
11564
    }
-
 
11565
 
-
 
11566
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11567
    public boolean isSet(_Fields field) {
-
 
11568
      if (field == null) {
-
 
11569
        throw new IllegalArgumentException();
-
 
11570
      }
-
 
11571
 
-
 
11572
      switch (field) {
-
 
11573
      case E:
-
 
11574
        return isSetE();
-
 
11575
      }
-
 
11576
      throw new IllegalStateException();
-
 
11577
    }
-
 
11578
 
-
 
11579
    @Override
-
 
11580
    public boolean equals(Object that) {
-
 
11581
      if (that == null)
-
 
11582
        return false;
-
 
11583
      if (that instanceof createInvoice_result)
-
 
11584
        return this.equals((createInvoice_result)that);
-
 
11585
      return false;
-
 
11586
    }
-
 
11587
 
-
 
11588
    public boolean equals(createInvoice_result that) {
-
 
11589
      if (that == null)
-
 
11590
        return false;
-
 
11591
 
-
 
11592
      boolean this_present_e = true && this.isSetE();
-
 
11593
      boolean that_present_e = true && that.isSetE();
-
 
11594
      if (this_present_e || that_present_e) {
-
 
11595
        if (!(this_present_e && that_present_e))
-
 
11596
          return false;
-
 
11597
        if (!this.e.equals(that.e))
-
 
11598
          return false;
-
 
11599
      }
-
 
11600
 
-
 
11601
      return true;
-
 
11602
    }
-
 
11603
 
-
 
11604
    @Override
-
 
11605
    public int hashCode() {
-
 
11606
      return 0;
-
 
11607
    }
-
 
11608
 
-
 
11609
    public int compareTo(createInvoice_result other) {
-
 
11610
      if (!getClass().equals(other.getClass())) {
-
 
11611
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11612
      }
-
 
11613
 
-
 
11614
      int lastComparison = 0;
-
 
11615
      createInvoice_result typedOther = (createInvoice_result)other;
-
 
11616
 
-
 
11617
      lastComparison = Boolean.valueOf(isSetE()).compareTo(typedOther.isSetE());
-
 
11618
      if (lastComparison != 0) {
-
 
11619
        return lastComparison;
-
 
11620
      }
-
 
11621
      if (isSetE()) {
-
 
11622
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e);
-
 
11623
        if (lastComparison != 0) {
-
 
11624
          return lastComparison;
-
 
11625
        }
-
 
11626
      }
-
 
11627
      return 0;
-
 
11628
    }
-
 
11629
 
-
 
11630
    public _Fields fieldForId(int fieldId) {
-
 
11631
      return _Fields.findByThriftId(fieldId);
-
 
11632
    }
-
 
11633
 
-
 
11634
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11635
      org.apache.thrift.protocol.TField field;
-
 
11636
      iprot.readStructBegin();
-
 
11637
      while (true)
-
 
11638
      {
-
 
11639
        field = iprot.readFieldBegin();
-
 
11640
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11641
          break;
-
 
11642
        }
-
 
11643
        switch (field.id) {
-
 
11644
          case 1: // E
-
 
11645
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
11646
              this.e = new PurchaseServiceException();
-
 
11647
              this.e.read(iprot);
-
 
11648
            } else { 
-
 
11649
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11650
            }
-
 
11651
            break;
-
 
11652
          default:
-
 
11653
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11654
        }
-
 
11655
        iprot.readFieldEnd();
-
 
11656
      }
-
 
11657
      iprot.readStructEnd();
-
 
11658
      validate();
-
 
11659
    }
-
 
11660
 
-
 
11661
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11662
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11663
 
-
 
11664
      if (this.isSetE()) {
-
 
11665
        oprot.writeFieldBegin(E_FIELD_DESC);
-
 
11666
        this.e.write(oprot);
-
 
11667
        oprot.writeFieldEnd();
-
 
11668
      }
-
 
11669
      oprot.writeFieldStop();
-
 
11670
      oprot.writeStructEnd();
-
 
11671
    }
-
 
11672
 
-
 
11673
    @Override
-
 
11674
    public String toString() {
-
 
11675
      StringBuilder sb = new StringBuilder("createInvoice_result(");
-
 
11676
      boolean first = true;
-
 
11677
 
-
 
11678
      sb.append("e:");
-
 
11679
      if (this.e == null) {
-
 
11680
        sb.append("null");
10301
      } else {
11681
      } else {
10302
        sb.append(this.e);
11682
        sb.append(this.e);
10303
      }
11683
      }
10304
      first = false;
11684
      first = false;
10305
      sb.append(")");
11685
      sb.append(")");