Subversion Repositories SmartDukaan

Rev

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

Rev 3374 Rev 3383
Line 41... Line 41...
41
     * @param id
41
     * @param id
42
     */
42
     */
43
    public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, TException;
43
    public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, TException;
44
 
44
 
45
    /**
45
    /**
-
 
46
     * Returns a list of all the purchase orders in the given state
-
 
47
     * 
-
 
48
     * @param status
-
 
49
     */
-
 
50
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws WarehouseServiceException, TException;
-
 
51
 
-
 
52
    /**
46
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
53
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
47
     * 
54
     * 
48
     * @param id
55
     * @param id
49
     */
56
     */
50
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException;
57
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException;
Line 66... Line 73...
66
     * @param purchaseId
73
     * @param purchaseId
67
     */
74
     */
68
    public long closePurchase(long purchaseId) throws WarehouseServiceException, TException;
75
    public long closePurchase(long purchaseId) throws WarehouseServiceException, TException;
69
 
76
 
70
    /**
77
    /**
-
 
78
     * Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
-
 
79
     * 
-
 
80
     * @param purchaseOrderId
-
 
81
     * @param open
-
 
82
     */
-
 
83
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws WarehouseServiceException, TException;
-
 
84
 
-
 
85
    /**
71
     * Creates a StockLedger and a Scan object using the given details.
86
     * Creates a Scan object using the given details.
72
     * Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
87
     * Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
73
     * 
88
     * 
74
     * @param purchaseId
89
     * @param purchaseId
75
     * @param itemId
-
 
76
     * @param itemNumber
90
     * @param itemNumber
77
     * @param imeiNumber
91
     * @param imeiNumber
78
     * @param type
92
     * @param type
79
     */
93
     */
80
    public void scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException;
94
    public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException;
81
 
95
 
82
    /**
96
    /**
83
     * Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
97
     * Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
84
     * marks the oldest ItemInventory object as being scanned out.
98
     * marks the oldest ItemInventory object as being scanned out.
85
     * Creats a Scan object for this action.
-
 
86
     * Raises an exception if:
99
     * Raises an exception if:
87
     * 1. There is no stock present corresponding to the given item details.
100
     * 1. There is no stock present corresponding to the given item details.
88
     * 2. An older stock is present corresponding to the itemNumber which has not been scanned out.
101
     * 2. An older stock is present corresponding to the itemNumber which has not been scanned out.
89
     * 
102
     * 
90
     * @param itemNumber
103
     * @param itemNumber
Line 176... Line 189...
176
        throw result.wex;
189
        throw result.wex;
177
      }
190
      }
178
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
191
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
179
    }
192
    }
180
 
193
 
-
 
194
    public List<PurchaseOrder> getAllPurchaseOrders(POStatus status) throws WarehouseServiceException, TException
-
 
195
    {
-
 
196
      send_getAllPurchaseOrders(status);
-
 
197
      return recv_getAllPurchaseOrders();
-
 
198
    }
-
 
199
 
-
 
200
    public void send_getAllPurchaseOrders(POStatus status) throws TException
-
 
201
    {
-
 
202
      oprot_.writeMessageBegin(new TMessage("getAllPurchaseOrders", TMessageType.CALL, seqid_));
-
 
203
      getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
-
 
204
      args.status = status;
-
 
205
      args.write(oprot_);
-
 
206
      oprot_.writeMessageEnd();
-
 
207
      oprot_.getTransport().flush();
-
 
208
    }
-
 
209
 
-
 
210
    public List<PurchaseOrder> recv_getAllPurchaseOrders() throws WarehouseServiceException, TException
-
 
211
    {
-
 
212
      TMessage msg = iprot_.readMessageBegin();
-
 
213
      if (msg.type == TMessageType.EXCEPTION) {
-
 
214
        TApplicationException x = TApplicationException.read(iprot_);
-
 
215
        iprot_.readMessageEnd();
-
 
216
        throw x;
-
 
217
      }
-
 
218
      getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
-
 
219
      result.read(iprot_);
-
 
220
      iprot_.readMessageEnd();
-
 
221
      if (result.isSetSuccess()) {
-
 
222
        return result.success;
-
 
223
      }
-
 
224
      if (result.wex != null) {
-
 
225
        throw result.wex;
-
 
226
      }
-
 
227
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
-
 
228
    }
-
 
229
 
181
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException
230
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException
182
    {
231
    {
183
      send_getSupplier(id);
232
      send_getSupplier(id);
184
      return recv_getSupplier();
233
      return recv_getSupplier();
185
    }
234
    }
Line 286... Line 335...
286
        throw result.wex;
335
        throw result.wex;
287
      }
336
      }
288
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
337
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
289
    }
338
    }
290
 
339
 
-
 
340
    public List<Purchase> getAllPurchases(long purchaseOrderId, boolean open) throws WarehouseServiceException, TException
-
 
341
    {
-
 
342
      send_getAllPurchases(purchaseOrderId, open);
-
 
343
      return recv_getAllPurchases();
-
 
344
    }
-
 
345
 
-
 
346
    public void send_getAllPurchases(long purchaseOrderId, boolean open) throws TException
-
 
347
    {
-
 
348
      oprot_.writeMessageBegin(new TMessage("getAllPurchases", TMessageType.CALL, seqid_));
-
 
349
      getAllPurchases_args args = new getAllPurchases_args();
-
 
350
      args.purchaseOrderId = purchaseOrderId;
-
 
351
      args.open = open;
-
 
352
      args.write(oprot_);
-
 
353
      oprot_.writeMessageEnd();
-
 
354
      oprot_.getTransport().flush();
-
 
355
    }
-
 
356
 
-
 
357
    public List<Purchase> recv_getAllPurchases() throws WarehouseServiceException, TException
-
 
358
    {
-
 
359
      TMessage msg = iprot_.readMessageBegin();
-
 
360
      if (msg.type == TMessageType.EXCEPTION) {
-
 
361
        TApplicationException x = TApplicationException.read(iprot_);
-
 
362
        iprot_.readMessageEnd();
-
 
363
        throw x;
-
 
364
      }
-
 
365
      getAllPurchases_result result = new getAllPurchases_result();
-
 
366
      result.read(iprot_);
-
 
367
      iprot_.readMessageEnd();
-
 
368
      if (result.isSetSuccess()) {
-
 
369
        return result.success;
-
 
370
      }
-
 
371
      if (result.wex != null) {
-
 
372
        throw result.wex;
-
 
373
      }
-
 
374
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
-
 
375
    }
-
 
376
 
291
    public void scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException
377
    public void scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException
292
    {
378
    {
293
      send_scanIn(purchaseId, itemId, itemNumber, imeiNumber, type);
379
      send_scanIn(purchaseId, itemNumber, imeiNumber, type);
294
      recv_scanIn();
380
      recv_scanIn();
295
    }
381
    }
296
 
382
 
297
    public void send_scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws TException
383
    public void send_scanIn(long purchaseId, String itemNumber, String imeiNumber, ScanType type) throws TException
298
    {
384
    {
299
      oprot_.writeMessageBegin(new TMessage("scanIn", TMessageType.CALL, seqid_));
385
      oprot_.writeMessageBegin(new TMessage("scanIn", TMessageType.CALL, seqid_));
300
      scanIn_args args = new scanIn_args();
386
      scanIn_args args = new scanIn_args();
301
      args.purchaseId = purchaseId;
387
      args.purchaseId = purchaseId;
302
      args.itemId = itemId;
-
 
303
      args.itemNumber = itemNumber;
388
      args.itemNumber = itemNumber;
304
      args.imeiNumber = imeiNumber;
389
      args.imeiNumber = imeiNumber;
305
      args.type = type;
390
      args.type = type;
306
      args.write(oprot_);
391
      args.write(oprot_);
307
      oprot_.writeMessageEnd();
392
      oprot_.writeMessageEnd();
Line 367... Line 452...
367
    {
452
    {
368
      super(iface);
453
      super(iface);
369
      iface_ = iface;
454
      iface_ = iface;
370
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
455
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
371
      processMap_.put("getPurchaseOrder", new getPurchaseOrder());
456
      processMap_.put("getPurchaseOrder", new getPurchaseOrder());
-
 
457
      processMap_.put("getAllPurchaseOrders", new getAllPurchaseOrders());
372
      processMap_.put("getSupplier", new getSupplier());
458
      processMap_.put("getSupplier", new getSupplier());
373
      processMap_.put("startPurchase", new startPurchase());
459
      processMap_.put("startPurchase", new startPurchase());
374
      processMap_.put("closePurchase", new closePurchase());
460
      processMap_.put("closePurchase", new closePurchase());
-
 
461
      processMap_.put("getAllPurchases", new getAllPurchases());
375
      processMap_.put("scanIn", new scanIn());
462
      processMap_.put("scanIn", new scanIn());
376
      processMap_.put("scanOut", new scanOut());
463
      processMap_.put("scanOut", new scanOut());
377
    }
464
    }
378
 
465
 
379
    private Iface iface_;
466
    private Iface iface_;
Line 451... Line 538...
451
        oprot.getTransport().flush();
538
        oprot.getTransport().flush();
452
      }
539
      }
453
 
540
 
454
    }
541
    }
455
 
542
 
-
 
543
    private class getAllPurchaseOrders implements ProcessFunction {
-
 
544
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
545
      {
-
 
546
        getAllPurchaseOrders_args args = new getAllPurchaseOrders_args();
-
 
547
        args.read(iprot);
-
 
548
        iprot.readMessageEnd();
-
 
549
        getAllPurchaseOrders_result result = new getAllPurchaseOrders_result();
-
 
550
        try {
-
 
551
          result.success = iface_.getAllPurchaseOrders(args.status);
-
 
552
        } catch (WarehouseServiceException wex) {
-
 
553
          result.wex = wex;
-
 
554
        } catch (Throwable th) {
-
 
555
          LOGGER.error("Internal error processing getAllPurchaseOrders", th);
-
 
556
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllPurchaseOrders");
-
 
557
          oprot.writeMessageBegin(new TMessage("getAllPurchaseOrders", TMessageType.EXCEPTION, seqid));
-
 
558
          x.write(oprot);
-
 
559
          oprot.writeMessageEnd();
-
 
560
          oprot.getTransport().flush();
-
 
561
          return;
-
 
562
        }
-
 
563
        oprot.writeMessageBegin(new TMessage("getAllPurchaseOrders", TMessageType.REPLY, seqid));
-
 
564
        result.write(oprot);
-
 
565
        oprot.writeMessageEnd();
-
 
566
        oprot.getTransport().flush();
-
 
567
      }
-
 
568
 
-
 
569
    }
-
 
570
 
456
    private class getSupplier implements ProcessFunction {
571
    private class getSupplier implements ProcessFunction {
457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
572
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
458
      {
573
      {
459
        getSupplier_args args = new getSupplier_args();
574
        getSupplier_args args = new getSupplier_args();
460
        args.read(iprot);
575
        args.read(iprot);
Line 537... Line 652...
537
        oprot.getTransport().flush();
652
        oprot.getTransport().flush();
538
      }
653
      }
539
 
654
 
540
    }
655
    }
541
 
656
 
-
 
657
    private class getAllPurchases implements ProcessFunction {
-
 
658
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
659
      {
-
 
660
        getAllPurchases_args args = new getAllPurchases_args();
-
 
661
        args.read(iprot);
-
 
662
        iprot.readMessageEnd();
-
 
663
        getAllPurchases_result result = new getAllPurchases_result();
-
 
664
        try {
-
 
665
          result.success = iface_.getAllPurchases(args.purchaseOrderId, args.open);
-
 
666
        } catch (WarehouseServiceException wex) {
-
 
667
          result.wex = wex;
-
 
668
        } catch (Throwable th) {
-
 
669
          LOGGER.error("Internal error processing getAllPurchases", th);
-
 
670
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllPurchases");
-
 
671
          oprot.writeMessageBegin(new TMessage("getAllPurchases", TMessageType.EXCEPTION, seqid));
-
 
672
          x.write(oprot);
-
 
673
          oprot.writeMessageEnd();
-
 
674
          oprot.getTransport().flush();
-
 
675
          return;
-
 
676
        }
-
 
677
        oprot.writeMessageBegin(new TMessage("getAllPurchases", TMessageType.REPLY, seqid));
-
 
678
        result.write(oprot);
-
 
679
        oprot.writeMessageEnd();
-
 
680
        oprot.getTransport().flush();
-
 
681
      }
-
 
682
 
-
 
683
    }
-
 
684
 
542
    private class scanIn implements ProcessFunction {
685
    private class scanIn implements ProcessFunction {
543
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
686
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
544
      {
687
      {
545
        scanIn_args args = new scanIn_args();
688
        scanIn_args args = new scanIn_args();
546
        args.read(iprot);
689
        args.read(iprot);
547
        iprot.readMessageEnd();
690
        iprot.readMessageEnd();
548
        scanIn_result result = new scanIn_result();
691
        scanIn_result result = new scanIn_result();
549
        try {
692
        try {
550
          iface_.scanIn(args.purchaseId, args.itemId, args.itemNumber, args.imeiNumber, args.type);
693
          iface_.scanIn(args.purchaseId, args.itemNumber, args.imeiNumber, args.type);
551
        } catch (WarehouseServiceException wex) {
694
        } catch (WarehouseServiceException wex) {
552
          result.wex = wex;
695
          result.wex = wex;
553
        } catch (Throwable th) {
696
        } catch (Throwable th) {
554
          LOGGER.error("Internal error processing scanIn", th);
697
          LOGGER.error("Internal error processing scanIn", th);
555
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing scanIn");
698
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing scanIn");
Line 1883... Line 2026...
1883
      // check for required fields
2026
      // check for required fields
1884
    }
2027
    }
1885
 
2028
 
1886
  }
2029
  }
1887
 
2030
 
-
 
2031
  public static class getAllPurchaseOrders_args implements TBase<getAllPurchaseOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPurchaseOrders_args>   {
-
 
2032
    private static final TStruct STRUCT_DESC = new TStruct("getAllPurchaseOrders_args");
-
 
2033
 
-
 
2034
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
-
 
2035
 
-
 
2036
    private POStatus status;
-
 
2037
 
-
 
2038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2039
    public enum _Fields implements TFieldIdEnum {
-
 
2040
      /**
-
 
2041
       * 
-
 
2042
       * @see POStatus
-
 
2043
       */
-
 
2044
      STATUS((short)1, "status");
-
 
2045
 
-
 
2046
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2047
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2048
 
-
 
2049
      static {
-
 
2050
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2051
          byId.put((int)field._thriftId, field);
-
 
2052
          byName.put(field.getFieldName(), field);
-
 
2053
        }
-
 
2054
      }
-
 
2055
 
-
 
2056
      /**
-
 
2057
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2058
       */
-
 
2059
      public static _Fields findByThriftId(int fieldId) {
-
 
2060
        return byId.get(fieldId);
-
 
2061
      }
-
 
2062
 
-
 
2063
      /**
-
 
2064
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2065
       * if it is not found.
-
 
2066
       */
-
 
2067
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2068
        _Fields fields = findByThriftId(fieldId);
-
 
2069
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2070
        return fields;
-
 
2071
      }
-
 
2072
 
-
 
2073
      /**
-
 
2074
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2075
       */
-
 
2076
      public static _Fields findByName(String name) {
-
 
2077
        return byName.get(name);
-
 
2078
      }
-
 
2079
 
-
 
2080
      private final short _thriftId;
-
 
2081
      private final String _fieldName;
-
 
2082
 
-
 
2083
      _Fields(short thriftId, String fieldName) {
-
 
2084
        _thriftId = thriftId;
-
 
2085
        _fieldName = fieldName;
-
 
2086
      }
-
 
2087
 
-
 
2088
      public short getThriftFieldId() {
-
 
2089
        return _thriftId;
-
 
2090
      }
-
 
2091
 
-
 
2092
      public String getFieldName() {
-
 
2093
        return _fieldName;
-
 
2094
      }
-
 
2095
    }
-
 
2096
 
-
 
2097
    // isset id assignments
-
 
2098
 
-
 
2099
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2100
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
-
 
2101
          new EnumMetaData(TType.ENUM, POStatus.class)));
-
 
2102
    }});
-
 
2103
 
-
 
2104
    static {
-
 
2105
      FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_args.class, metaDataMap);
-
 
2106
    }
-
 
2107
 
-
 
2108
    public getAllPurchaseOrders_args() {
-
 
2109
    }
-
 
2110
 
-
 
2111
    public getAllPurchaseOrders_args(
-
 
2112
      POStatus status)
-
 
2113
    {
-
 
2114
      this();
-
 
2115
      this.status = status;
-
 
2116
    }
-
 
2117
 
-
 
2118
    /**
-
 
2119
     * Performs a deep copy on <i>other</i>.
-
 
2120
     */
-
 
2121
    public getAllPurchaseOrders_args(getAllPurchaseOrders_args other) {
-
 
2122
      if (other.isSetStatus()) {
-
 
2123
        this.status = other.status;
-
 
2124
      }
-
 
2125
    }
-
 
2126
 
-
 
2127
    public getAllPurchaseOrders_args deepCopy() {
-
 
2128
      return new getAllPurchaseOrders_args(this);
-
 
2129
    }
-
 
2130
 
-
 
2131
    @Deprecated
-
 
2132
    public getAllPurchaseOrders_args clone() {
-
 
2133
      return new getAllPurchaseOrders_args(this);
-
 
2134
    }
-
 
2135
 
-
 
2136
    /**
-
 
2137
     * 
-
 
2138
     * @see POStatus
-
 
2139
     */
-
 
2140
    public POStatus getStatus() {
-
 
2141
      return this.status;
-
 
2142
    }
-
 
2143
 
-
 
2144
    /**
-
 
2145
     * 
-
 
2146
     * @see POStatus
-
 
2147
     */
-
 
2148
    public getAllPurchaseOrders_args setStatus(POStatus status) {
-
 
2149
      this.status = status;
-
 
2150
      return this;
-
 
2151
    }
-
 
2152
 
-
 
2153
    public void unsetStatus() {
-
 
2154
      this.status = null;
-
 
2155
    }
-
 
2156
 
-
 
2157
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
-
 
2158
    public boolean isSetStatus() {
-
 
2159
      return this.status != null;
-
 
2160
    }
-
 
2161
 
-
 
2162
    public void setStatusIsSet(boolean value) {
-
 
2163
      if (!value) {
-
 
2164
        this.status = null;
-
 
2165
      }
-
 
2166
    }
-
 
2167
 
-
 
2168
    public void setFieldValue(_Fields field, Object value) {
-
 
2169
      switch (field) {
-
 
2170
      case STATUS:
-
 
2171
        if (value == null) {
-
 
2172
          unsetStatus();
-
 
2173
        } else {
-
 
2174
          setStatus((POStatus)value);
-
 
2175
        }
-
 
2176
        break;
-
 
2177
 
-
 
2178
      }
-
 
2179
    }
-
 
2180
 
-
 
2181
    public void setFieldValue(int fieldID, Object value) {
-
 
2182
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2183
    }
-
 
2184
 
-
 
2185
    public Object getFieldValue(_Fields field) {
-
 
2186
      switch (field) {
-
 
2187
      case STATUS:
-
 
2188
        return getStatus();
-
 
2189
 
-
 
2190
      }
-
 
2191
      throw new IllegalStateException();
-
 
2192
    }
-
 
2193
 
-
 
2194
    public Object getFieldValue(int fieldId) {
-
 
2195
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2196
    }
-
 
2197
 
-
 
2198
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2199
    public boolean isSet(_Fields field) {
-
 
2200
      switch (field) {
-
 
2201
      case STATUS:
-
 
2202
        return isSetStatus();
-
 
2203
      }
-
 
2204
      throw new IllegalStateException();
-
 
2205
    }
-
 
2206
 
-
 
2207
    public boolean isSet(int fieldID) {
-
 
2208
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2209
    }
-
 
2210
 
-
 
2211
    @Override
-
 
2212
    public boolean equals(Object that) {
-
 
2213
      if (that == null)
-
 
2214
        return false;
-
 
2215
      if (that instanceof getAllPurchaseOrders_args)
-
 
2216
        return this.equals((getAllPurchaseOrders_args)that);
-
 
2217
      return false;
-
 
2218
    }
-
 
2219
 
-
 
2220
    public boolean equals(getAllPurchaseOrders_args that) {
-
 
2221
      if (that == null)
-
 
2222
        return false;
-
 
2223
 
-
 
2224
      boolean this_present_status = true && this.isSetStatus();
-
 
2225
      boolean that_present_status = true && that.isSetStatus();
-
 
2226
      if (this_present_status || that_present_status) {
-
 
2227
        if (!(this_present_status && that_present_status))
-
 
2228
          return false;
-
 
2229
        if (!this.status.equals(that.status))
-
 
2230
          return false;
-
 
2231
      }
-
 
2232
 
-
 
2233
      return true;
-
 
2234
    }
-
 
2235
 
-
 
2236
    @Override
-
 
2237
    public int hashCode() {
-
 
2238
      return 0;
-
 
2239
    }
-
 
2240
 
-
 
2241
    public int compareTo(getAllPurchaseOrders_args other) {
-
 
2242
      if (!getClass().equals(other.getClass())) {
-
 
2243
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2244
      }
-
 
2245
 
-
 
2246
      int lastComparison = 0;
-
 
2247
      getAllPurchaseOrders_args typedOther = (getAllPurchaseOrders_args)other;
-
 
2248
 
-
 
2249
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
-
 
2250
      if (lastComparison != 0) {
-
 
2251
        return lastComparison;
-
 
2252
      }
-
 
2253
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
-
 
2254
      if (lastComparison != 0) {
-
 
2255
        return lastComparison;
-
 
2256
      }
-
 
2257
      return 0;
-
 
2258
    }
-
 
2259
 
-
 
2260
    public void read(TProtocol iprot) throws TException {
-
 
2261
      TField field;
-
 
2262
      iprot.readStructBegin();
-
 
2263
      while (true)
-
 
2264
      {
-
 
2265
        field = iprot.readFieldBegin();
-
 
2266
        if (field.type == TType.STOP) { 
-
 
2267
          break;
-
 
2268
        }
-
 
2269
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2270
        if (fieldId == null) {
-
 
2271
          TProtocolUtil.skip(iprot, field.type);
-
 
2272
        } else {
-
 
2273
          switch (fieldId) {
-
 
2274
            case STATUS:
-
 
2275
              if (field.type == TType.I32) {
-
 
2276
                this.status = POStatus.findByValue(iprot.readI32());
-
 
2277
              } else { 
-
 
2278
                TProtocolUtil.skip(iprot, field.type);
-
 
2279
              }
-
 
2280
              break;
-
 
2281
          }
-
 
2282
          iprot.readFieldEnd();
-
 
2283
        }
-
 
2284
      }
-
 
2285
      iprot.readStructEnd();
-
 
2286
      validate();
-
 
2287
    }
-
 
2288
 
-
 
2289
    public void write(TProtocol oprot) throws TException {
-
 
2290
      validate();
-
 
2291
 
-
 
2292
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2293
      if (this.status != null) {
-
 
2294
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
-
 
2295
        oprot.writeI32(this.status.getValue());
-
 
2296
        oprot.writeFieldEnd();
-
 
2297
      }
-
 
2298
      oprot.writeFieldStop();
-
 
2299
      oprot.writeStructEnd();
-
 
2300
    }
-
 
2301
 
-
 
2302
    @Override
-
 
2303
    public String toString() {
-
 
2304
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_args(");
-
 
2305
      boolean first = true;
-
 
2306
 
-
 
2307
      sb.append("status:");
-
 
2308
      if (this.status == null) {
-
 
2309
        sb.append("null");
-
 
2310
      } else {
-
 
2311
        String status_name = status.name();
-
 
2312
        if (status_name != null) {
-
 
2313
          sb.append(status_name);
-
 
2314
          sb.append(" (");
-
 
2315
        }
-
 
2316
        sb.append(this.status);
-
 
2317
        if (status_name != null) {
-
 
2318
          sb.append(")");
-
 
2319
        }
-
 
2320
      }
-
 
2321
      first = false;
-
 
2322
      sb.append(")");
-
 
2323
      return sb.toString();
-
 
2324
    }
-
 
2325
 
-
 
2326
    public void validate() throws TException {
-
 
2327
      // check for required fields
-
 
2328
    }
-
 
2329
 
-
 
2330
  }
-
 
2331
 
-
 
2332
  public static class getAllPurchaseOrders_result implements TBase<getAllPurchaseOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPurchaseOrders_result>   {
-
 
2333
    private static final TStruct STRUCT_DESC = new TStruct("getAllPurchaseOrders_result");
-
 
2334
 
-
 
2335
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
2336
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
-
 
2337
 
-
 
2338
    private List<PurchaseOrder> success;
-
 
2339
    private WarehouseServiceException wex;
-
 
2340
 
-
 
2341
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2342
    public enum _Fields implements TFieldIdEnum {
-
 
2343
      SUCCESS((short)0, "success"),
-
 
2344
      WEX((short)1, "wex");
-
 
2345
 
-
 
2346
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2347
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2348
 
-
 
2349
      static {
-
 
2350
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2351
          byId.put((int)field._thriftId, field);
-
 
2352
          byName.put(field.getFieldName(), field);
-
 
2353
        }
-
 
2354
      }
-
 
2355
 
-
 
2356
      /**
-
 
2357
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2358
       */
-
 
2359
      public static _Fields findByThriftId(int fieldId) {
-
 
2360
        return byId.get(fieldId);
-
 
2361
      }
-
 
2362
 
-
 
2363
      /**
-
 
2364
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2365
       * if it is not found.
-
 
2366
       */
-
 
2367
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2368
        _Fields fields = findByThriftId(fieldId);
-
 
2369
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2370
        return fields;
-
 
2371
      }
-
 
2372
 
-
 
2373
      /**
-
 
2374
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2375
       */
-
 
2376
      public static _Fields findByName(String name) {
-
 
2377
        return byName.get(name);
-
 
2378
      }
-
 
2379
 
-
 
2380
      private final short _thriftId;
-
 
2381
      private final String _fieldName;
-
 
2382
 
-
 
2383
      _Fields(short thriftId, String fieldName) {
-
 
2384
        _thriftId = thriftId;
-
 
2385
        _fieldName = fieldName;
-
 
2386
      }
-
 
2387
 
-
 
2388
      public short getThriftFieldId() {
-
 
2389
        return _thriftId;
-
 
2390
      }
-
 
2391
 
-
 
2392
      public String getFieldName() {
-
 
2393
        return _fieldName;
-
 
2394
      }
-
 
2395
    }
-
 
2396
 
-
 
2397
    // isset id assignments
-
 
2398
 
-
 
2399
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2400
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
2401
          new ListMetaData(TType.LIST, 
-
 
2402
              new StructMetaData(TType.STRUCT, PurchaseOrder.class))));
-
 
2403
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
-
 
2404
          new FieldValueMetaData(TType.STRUCT)));
-
 
2405
    }});
-
 
2406
 
-
 
2407
    static {
-
 
2408
      FieldMetaData.addStructMetaDataMap(getAllPurchaseOrders_result.class, metaDataMap);
-
 
2409
    }
-
 
2410
 
-
 
2411
    public getAllPurchaseOrders_result() {
-
 
2412
    }
-
 
2413
 
-
 
2414
    public getAllPurchaseOrders_result(
-
 
2415
      List<PurchaseOrder> success,
-
 
2416
      WarehouseServiceException wex)
-
 
2417
    {
-
 
2418
      this();
-
 
2419
      this.success = success;
-
 
2420
      this.wex = wex;
-
 
2421
    }
-
 
2422
 
-
 
2423
    /**
-
 
2424
     * Performs a deep copy on <i>other</i>.
-
 
2425
     */
-
 
2426
    public getAllPurchaseOrders_result(getAllPurchaseOrders_result other) {
-
 
2427
      if (other.isSetSuccess()) {
-
 
2428
        List<PurchaseOrder> __this__success = new ArrayList<PurchaseOrder>();
-
 
2429
        for (PurchaseOrder other_element : other.success) {
-
 
2430
          __this__success.add(new PurchaseOrder(other_element));
-
 
2431
        }
-
 
2432
        this.success = __this__success;
-
 
2433
      }
-
 
2434
      if (other.isSetWex()) {
-
 
2435
        this.wex = new WarehouseServiceException(other.wex);
-
 
2436
      }
-
 
2437
    }
-
 
2438
 
-
 
2439
    public getAllPurchaseOrders_result deepCopy() {
-
 
2440
      return new getAllPurchaseOrders_result(this);
-
 
2441
    }
-
 
2442
 
-
 
2443
    @Deprecated
-
 
2444
    public getAllPurchaseOrders_result clone() {
-
 
2445
      return new getAllPurchaseOrders_result(this);
-
 
2446
    }
-
 
2447
 
-
 
2448
    public int getSuccessSize() {
-
 
2449
      return (this.success == null) ? 0 : this.success.size();
-
 
2450
    }
-
 
2451
 
-
 
2452
    public java.util.Iterator<PurchaseOrder> getSuccessIterator() {
-
 
2453
      return (this.success == null) ? null : this.success.iterator();
-
 
2454
    }
-
 
2455
 
-
 
2456
    public void addToSuccess(PurchaseOrder elem) {
-
 
2457
      if (this.success == null) {
-
 
2458
        this.success = new ArrayList<PurchaseOrder>();
-
 
2459
      }
-
 
2460
      this.success.add(elem);
-
 
2461
    }
-
 
2462
 
-
 
2463
    public List<PurchaseOrder> getSuccess() {
-
 
2464
      return this.success;
-
 
2465
    }
-
 
2466
 
-
 
2467
    public getAllPurchaseOrders_result setSuccess(List<PurchaseOrder> success) {
-
 
2468
      this.success = success;
-
 
2469
      return this;
-
 
2470
    }
-
 
2471
 
-
 
2472
    public void unsetSuccess() {
-
 
2473
      this.success = null;
-
 
2474
    }
-
 
2475
 
-
 
2476
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
2477
    public boolean isSetSuccess() {
-
 
2478
      return this.success != null;
-
 
2479
    }
-
 
2480
 
-
 
2481
    public void setSuccessIsSet(boolean value) {
-
 
2482
      if (!value) {
-
 
2483
        this.success = null;
-
 
2484
      }
-
 
2485
    }
-
 
2486
 
-
 
2487
    public WarehouseServiceException getWex() {
-
 
2488
      return this.wex;
-
 
2489
    }
-
 
2490
 
-
 
2491
    public getAllPurchaseOrders_result setWex(WarehouseServiceException wex) {
-
 
2492
      this.wex = wex;
-
 
2493
      return this;
-
 
2494
    }
-
 
2495
 
-
 
2496
    public void unsetWex() {
-
 
2497
      this.wex = null;
-
 
2498
    }
-
 
2499
 
-
 
2500
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
-
 
2501
    public boolean isSetWex() {
-
 
2502
      return this.wex != null;
-
 
2503
    }
-
 
2504
 
-
 
2505
    public void setWexIsSet(boolean value) {
-
 
2506
      if (!value) {
-
 
2507
        this.wex = null;
-
 
2508
      }
-
 
2509
    }
-
 
2510
 
-
 
2511
    public void setFieldValue(_Fields field, Object value) {
-
 
2512
      switch (field) {
-
 
2513
      case SUCCESS:
-
 
2514
        if (value == null) {
-
 
2515
          unsetSuccess();
-
 
2516
        } else {
-
 
2517
          setSuccess((List<PurchaseOrder>)value);
-
 
2518
        }
-
 
2519
        break;
-
 
2520
 
-
 
2521
      case WEX:
-
 
2522
        if (value == null) {
-
 
2523
          unsetWex();
-
 
2524
        } else {
-
 
2525
          setWex((WarehouseServiceException)value);
-
 
2526
        }
-
 
2527
        break;
-
 
2528
 
-
 
2529
      }
-
 
2530
    }
-
 
2531
 
-
 
2532
    public void setFieldValue(int fieldID, Object value) {
-
 
2533
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2534
    }
-
 
2535
 
-
 
2536
    public Object getFieldValue(_Fields field) {
-
 
2537
      switch (field) {
-
 
2538
      case SUCCESS:
-
 
2539
        return getSuccess();
-
 
2540
 
-
 
2541
      case WEX:
-
 
2542
        return getWex();
-
 
2543
 
-
 
2544
      }
-
 
2545
      throw new IllegalStateException();
-
 
2546
    }
-
 
2547
 
-
 
2548
    public Object getFieldValue(int fieldId) {
-
 
2549
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2550
    }
-
 
2551
 
-
 
2552
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2553
    public boolean isSet(_Fields field) {
-
 
2554
      switch (field) {
-
 
2555
      case SUCCESS:
-
 
2556
        return isSetSuccess();
-
 
2557
      case WEX:
-
 
2558
        return isSetWex();
-
 
2559
      }
-
 
2560
      throw new IllegalStateException();
-
 
2561
    }
-
 
2562
 
-
 
2563
    public boolean isSet(int fieldID) {
-
 
2564
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2565
    }
-
 
2566
 
-
 
2567
    @Override
-
 
2568
    public boolean equals(Object that) {
-
 
2569
      if (that == null)
-
 
2570
        return false;
-
 
2571
      if (that instanceof getAllPurchaseOrders_result)
-
 
2572
        return this.equals((getAllPurchaseOrders_result)that);
-
 
2573
      return false;
-
 
2574
    }
-
 
2575
 
-
 
2576
    public boolean equals(getAllPurchaseOrders_result that) {
-
 
2577
      if (that == null)
-
 
2578
        return false;
-
 
2579
 
-
 
2580
      boolean this_present_success = true && this.isSetSuccess();
-
 
2581
      boolean that_present_success = true && that.isSetSuccess();
-
 
2582
      if (this_present_success || that_present_success) {
-
 
2583
        if (!(this_present_success && that_present_success))
-
 
2584
          return false;
-
 
2585
        if (!this.success.equals(that.success))
-
 
2586
          return false;
-
 
2587
      }
-
 
2588
 
-
 
2589
      boolean this_present_wex = true && this.isSetWex();
-
 
2590
      boolean that_present_wex = true && that.isSetWex();
-
 
2591
      if (this_present_wex || that_present_wex) {
-
 
2592
        if (!(this_present_wex && that_present_wex))
-
 
2593
          return false;
-
 
2594
        if (!this.wex.equals(that.wex))
-
 
2595
          return false;
-
 
2596
      }
-
 
2597
 
-
 
2598
      return true;
-
 
2599
    }
-
 
2600
 
-
 
2601
    @Override
-
 
2602
    public int hashCode() {
-
 
2603
      return 0;
-
 
2604
    }
-
 
2605
 
-
 
2606
    public int compareTo(getAllPurchaseOrders_result other) {
-
 
2607
      if (!getClass().equals(other.getClass())) {
-
 
2608
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2609
      }
-
 
2610
 
-
 
2611
      int lastComparison = 0;
-
 
2612
      getAllPurchaseOrders_result typedOther = (getAllPurchaseOrders_result)other;
-
 
2613
 
-
 
2614
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
2615
      if (lastComparison != 0) {
-
 
2616
        return lastComparison;
-
 
2617
      }
-
 
2618
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
2619
      if (lastComparison != 0) {
-
 
2620
        return lastComparison;
-
 
2621
      }
-
 
2622
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
-
 
2623
      if (lastComparison != 0) {
-
 
2624
        return lastComparison;
-
 
2625
      }
-
 
2626
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
-
 
2627
      if (lastComparison != 0) {
-
 
2628
        return lastComparison;
-
 
2629
      }
-
 
2630
      return 0;
-
 
2631
    }
-
 
2632
 
-
 
2633
    public void read(TProtocol iprot) throws TException {
-
 
2634
      TField field;
-
 
2635
      iprot.readStructBegin();
-
 
2636
      while (true)
-
 
2637
      {
-
 
2638
        field = iprot.readFieldBegin();
-
 
2639
        if (field.type == TType.STOP) { 
-
 
2640
          break;
-
 
2641
        }
-
 
2642
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2643
        if (fieldId == null) {
-
 
2644
          TProtocolUtil.skip(iprot, field.type);
-
 
2645
        } else {
-
 
2646
          switch (fieldId) {
-
 
2647
            case SUCCESS:
-
 
2648
              if (field.type == TType.LIST) {
-
 
2649
                {
-
 
2650
                  TList _list4 = iprot.readListBegin();
-
 
2651
                  this.success = new ArrayList<PurchaseOrder>(_list4.size);
-
 
2652
                  for (int _i5 = 0; _i5 < _list4.size; ++_i5)
-
 
2653
                  {
-
 
2654
                    PurchaseOrder _elem6;
-
 
2655
                    _elem6 = new PurchaseOrder();
-
 
2656
                    _elem6.read(iprot);
-
 
2657
                    this.success.add(_elem6);
-
 
2658
                  }
-
 
2659
                  iprot.readListEnd();
-
 
2660
                }
-
 
2661
              } else { 
-
 
2662
                TProtocolUtil.skip(iprot, field.type);
-
 
2663
              }
-
 
2664
              break;
-
 
2665
            case WEX:
-
 
2666
              if (field.type == TType.STRUCT) {
-
 
2667
                this.wex = new WarehouseServiceException();
-
 
2668
                this.wex.read(iprot);
-
 
2669
              } else { 
-
 
2670
                TProtocolUtil.skip(iprot, field.type);
-
 
2671
              }
-
 
2672
              break;
-
 
2673
          }
-
 
2674
          iprot.readFieldEnd();
-
 
2675
        }
-
 
2676
      }
-
 
2677
      iprot.readStructEnd();
-
 
2678
      validate();
-
 
2679
    }
-
 
2680
 
-
 
2681
    public void write(TProtocol oprot) throws TException {
-
 
2682
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2683
 
-
 
2684
      if (this.isSetSuccess()) {
-
 
2685
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
2686
        {
-
 
2687
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
2688
          for (PurchaseOrder _iter7 : this.success)
-
 
2689
          {
-
 
2690
            _iter7.write(oprot);
-
 
2691
          }
-
 
2692
          oprot.writeListEnd();
-
 
2693
        }
-
 
2694
        oprot.writeFieldEnd();
-
 
2695
      } else if (this.isSetWex()) {
-
 
2696
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
2697
        this.wex.write(oprot);
-
 
2698
        oprot.writeFieldEnd();
-
 
2699
      }
-
 
2700
      oprot.writeFieldStop();
-
 
2701
      oprot.writeStructEnd();
-
 
2702
    }
-
 
2703
 
-
 
2704
    @Override
-
 
2705
    public String toString() {
-
 
2706
      StringBuilder sb = new StringBuilder("getAllPurchaseOrders_result(");
-
 
2707
      boolean first = true;
-
 
2708
 
-
 
2709
      sb.append("success:");
-
 
2710
      if (this.success == null) {
-
 
2711
        sb.append("null");
-
 
2712
      } else {
-
 
2713
        sb.append(this.success);
-
 
2714
      }
-
 
2715
      first = false;
-
 
2716
      if (!first) sb.append(", ");
-
 
2717
      sb.append("wex:");
-
 
2718
      if (this.wex == null) {
-
 
2719
        sb.append("null");
-
 
2720
      } else {
-
 
2721
        sb.append(this.wex);
-
 
2722
      }
-
 
2723
      first = false;
-
 
2724
      sb.append(")");
-
 
2725
      return sb.toString();
-
 
2726
    }
-
 
2727
 
-
 
2728
    public void validate() throws TException {
-
 
2729
      // check for required fields
-
 
2730
    }
-
 
2731
 
-
 
2732
  }
-
 
2733
 
1888
  public static class getSupplier_args implements TBase<getSupplier_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSupplier_args>   {
2734
  public static class getSupplier_args implements TBase<getSupplier_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSupplier_args>   {
1889
    private static final TStruct STRUCT_DESC = new TStruct("getSupplier_args");
2735
    private static final TStruct STRUCT_DESC = new TStruct("getSupplier_args");
1890
 
2736
 
1891
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2737
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
1892
 
2738
 
Line 3970... Line 4816...
3970
      // check for required fields
4816
      // check for required fields
3971
    }
4817
    }
3972
 
4818
 
3973
  }
4819
  }
3974
 
4820
 
-
 
4821
  public static class getAllPurchases_args implements TBase<getAllPurchases_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPurchases_args>   {
-
 
4822
    private static final TStruct STRUCT_DESC = new TStruct("getAllPurchases_args");
-
 
4823
 
-
 
4824
    private static final TField PURCHASE_ORDER_ID_FIELD_DESC = new TField("purchaseOrderId", TType.I64, (short)1);
-
 
4825
    private static final TField OPEN_FIELD_DESC = new TField("open", TType.BOOL, (short)2);
-
 
4826
 
-
 
4827
    private long purchaseOrderId;
-
 
4828
    private boolean open;
-
 
4829
 
-
 
4830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
4831
    public enum _Fields implements TFieldIdEnum {
-
 
4832
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
-
 
4833
      OPEN((short)2, "open");
-
 
4834
 
-
 
4835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
4836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
4837
 
-
 
4838
      static {
-
 
4839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
4840
          byId.put((int)field._thriftId, field);
-
 
4841
          byName.put(field.getFieldName(), field);
-
 
4842
        }
-
 
4843
      }
-
 
4844
 
-
 
4845
      /**
-
 
4846
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
4847
       */
-
 
4848
      public static _Fields findByThriftId(int fieldId) {
-
 
4849
        return byId.get(fieldId);
-
 
4850
      }
-
 
4851
 
-
 
4852
      /**
-
 
4853
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
4854
       * if it is not found.
-
 
4855
       */
-
 
4856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
4857
        _Fields fields = findByThriftId(fieldId);
-
 
4858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
4859
        return fields;
-
 
4860
      }
-
 
4861
 
-
 
4862
      /**
-
 
4863
       * Find the _Fields constant that matches name, or null if its not found.
-
 
4864
       */
-
 
4865
      public static _Fields findByName(String name) {
-
 
4866
        return byName.get(name);
-
 
4867
      }
-
 
4868
 
-
 
4869
      private final short _thriftId;
-
 
4870
      private final String _fieldName;
-
 
4871
 
-
 
4872
      _Fields(short thriftId, String fieldName) {
-
 
4873
        _thriftId = thriftId;
-
 
4874
        _fieldName = fieldName;
-
 
4875
      }
-
 
4876
 
-
 
4877
      public short getThriftFieldId() {
-
 
4878
        return _thriftId;
-
 
4879
      }
-
 
4880
 
-
 
4881
      public String getFieldName() {
-
 
4882
        return _fieldName;
-
 
4883
      }
-
 
4884
    }
-
 
4885
 
-
 
4886
    // isset id assignments
-
 
4887
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
-
 
4888
    private static final int __OPEN_ISSET_ID = 1;
-
 
4889
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
4890
 
-
 
4891
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
4892
      put(_Fields.PURCHASE_ORDER_ID, new FieldMetaData("purchaseOrderId", TFieldRequirementType.DEFAULT, 
-
 
4893
          new FieldValueMetaData(TType.I64)));
-
 
4894
      put(_Fields.OPEN, new FieldMetaData("open", TFieldRequirementType.DEFAULT, 
-
 
4895
          new FieldValueMetaData(TType.BOOL)));
-
 
4896
    }});
-
 
4897
 
-
 
4898
    static {
-
 
4899
      FieldMetaData.addStructMetaDataMap(getAllPurchases_args.class, metaDataMap);
-
 
4900
    }
-
 
4901
 
-
 
4902
    public getAllPurchases_args() {
-
 
4903
    }
-
 
4904
 
-
 
4905
    public getAllPurchases_args(
-
 
4906
      long purchaseOrderId,
-
 
4907
      boolean open)
-
 
4908
    {
-
 
4909
      this();
-
 
4910
      this.purchaseOrderId = purchaseOrderId;
-
 
4911
      setPurchaseOrderIdIsSet(true);
-
 
4912
      this.open = open;
-
 
4913
      setOpenIsSet(true);
-
 
4914
    }
-
 
4915
 
-
 
4916
    /**
-
 
4917
     * Performs a deep copy on <i>other</i>.
-
 
4918
     */
-
 
4919
    public getAllPurchases_args(getAllPurchases_args other) {
-
 
4920
      __isset_bit_vector.clear();
-
 
4921
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
4922
      this.purchaseOrderId = other.purchaseOrderId;
-
 
4923
      this.open = other.open;
-
 
4924
    }
-
 
4925
 
-
 
4926
    public getAllPurchases_args deepCopy() {
-
 
4927
      return new getAllPurchases_args(this);
-
 
4928
    }
-
 
4929
 
-
 
4930
    @Deprecated
-
 
4931
    public getAllPurchases_args clone() {
-
 
4932
      return new getAllPurchases_args(this);
-
 
4933
    }
-
 
4934
 
-
 
4935
    public long getPurchaseOrderId() {
-
 
4936
      return this.purchaseOrderId;
-
 
4937
    }
-
 
4938
 
-
 
4939
    public getAllPurchases_args setPurchaseOrderId(long purchaseOrderId) {
-
 
4940
      this.purchaseOrderId = purchaseOrderId;
-
 
4941
      setPurchaseOrderIdIsSet(true);
-
 
4942
      return this;
-
 
4943
    }
-
 
4944
 
-
 
4945
    public void unsetPurchaseOrderId() {
-
 
4946
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
-
 
4947
    }
-
 
4948
 
-
 
4949
    /** Returns true if field purchaseOrderId is set (has been asigned a value) and false otherwise */
-
 
4950
    public boolean isSetPurchaseOrderId() {
-
 
4951
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
-
 
4952
    }
-
 
4953
 
-
 
4954
    public void setPurchaseOrderIdIsSet(boolean value) {
-
 
4955
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
-
 
4956
    }
-
 
4957
 
-
 
4958
    public boolean isOpen() {
-
 
4959
      return this.open;
-
 
4960
    }
-
 
4961
 
-
 
4962
    public getAllPurchases_args setOpen(boolean open) {
-
 
4963
      this.open = open;
-
 
4964
      setOpenIsSet(true);
-
 
4965
      return this;
-
 
4966
    }
-
 
4967
 
-
 
4968
    public void unsetOpen() {
-
 
4969
      __isset_bit_vector.clear(__OPEN_ISSET_ID);
-
 
4970
    }
-
 
4971
 
-
 
4972
    /** Returns true if field open is set (has been asigned a value) and false otherwise */
-
 
4973
    public boolean isSetOpen() {
-
 
4974
      return __isset_bit_vector.get(__OPEN_ISSET_ID);
-
 
4975
    }
-
 
4976
 
-
 
4977
    public void setOpenIsSet(boolean value) {
-
 
4978
      __isset_bit_vector.set(__OPEN_ISSET_ID, value);
-
 
4979
    }
-
 
4980
 
-
 
4981
    public void setFieldValue(_Fields field, Object value) {
-
 
4982
      switch (field) {
-
 
4983
      case PURCHASE_ORDER_ID:
-
 
4984
        if (value == null) {
-
 
4985
          unsetPurchaseOrderId();
-
 
4986
        } else {
-
 
4987
          setPurchaseOrderId((Long)value);
-
 
4988
        }
-
 
4989
        break;
-
 
4990
 
-
 
4991
      case OPEN:
-
 
4992
        if (value == null) {
-
 
4993
          unsetOpen();
-
 
4994
        } else {
-
 
4995
          setOpen((Boolean)value);
-
 
4996
        }
-
 
4997
        break;
-
 
4998
 
-
 
4999
      }
-
 
5000
    }
-
 
5001
 
-
 
5002
    public void setFieldValue(int fieldID, Object value) {
-
 
5003
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
5004
    }
-
 
5005
 
-
 
5006
    public Object getFieldValue(_Fields field) {
-
 
5007
      switch (field) {
-
 
5008
      case PURCHASE_ORDER_ID:
-
 
5009
        return new Long(getPurchaseOrderId());
-
 
5010
 
-
 
5011
      case OPEN:
-
 
5012
        return new Boolean(isOpen());
-
 
5013
 
-
 
5014
      }
-
 
5015
      throw new IllegalStateException();
-
 
5016
    }
-
 
5017
 
-
 
5018
    public Object getFieldValue(int fieldId) {
-
 
5019
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
5020
    }
-
 
5021
 
-
 
5022
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
5023
    public boolean isSet(_Fields field) {
-
 
5024
      switch (field) {
-
 
5025
      case PURCHASE_ORDER_ID:
-
 
5026
        return isSetPurchaseOrderId();
-
 
5027
      case OPEN:
-
 
5028
        return isSetOpen();
-
 
5029
      }
-
 
5030
      throw new IllegalStateException();
-
 
5031
    }
-
 
5032
 
-
 
5033
    public boolean isSet(int fieldID) {
-
 
5034
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
5035
    }
-
 
5036
 
-
 
5037
    @Override
-
 
5038
    public boolean equals(Object that) {
-
 
5039
      if (that == null)
-
 
5040
        return false;
-
 
5041
      if (that instanceof getAllPurchases_args)
-
 
5042
        return this.equals((getAllPurchases_args)that);
-
 
5043
      return false;
-
 
5044
    }
-
 
5045
 
-
 
5046
    public boolean equals(getAllPurchases_args that) {
-
 
5047
      if (that == null)
-
 
5048
        return false;
-
 
5049
 
-
 
5050
      boolean this_present_purchaseOrderId = true;
-
 
5051
      boolean that_present_purchaseOrderId = true;
-
 
5052
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
-
 
5053
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
-
 
5054
          return false;
-
 
5055
        if (this.purchaseOrderId != that.purchaseOrderId)
-
 
5056
          return false;
-
 
5057
      }
-
 
5058
 
-
 
5059
      boolean this_present_open = true;
-
 
5060
      boolean that_present_open = true;
-
 
5061
      if (this_present_open || that_present_open) {
-
 
5062
        if (!(this_present_open && that_present_open))
-
 
5063
          return false;
-
 
5064
        if (this.open != that.open)
-
 
5065
          return false;
-
 
5066
      }
-
 
5067
 
-
 
5068
      return true;
-
 
5069
    }
-
 
5070
 
-
 
5071
    @Override
-
 
5072
    public int hashCode() {
-
 
5073
      return 0;
-
 
5074
    }
-
 
5075
 
-
 
5076
    public int compareTo(getAllPurchases_args other) {
-
 
5077
      if (!getClass().equals(other.getClass())) {
-
 
5078
        return getClass().getName().compareTo(other.getClass().getName());
-
 
5079
      }
-
 
5080
 
-
 
5081
      int lastComparison = 0;
-
 
5082
      getAllPurchases_args typedOther = (getAllPurchases_args)other;
-
 
5083
 
-
 
5084
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(isSetPurchaseOrderId());
-
 
5085
      if (lastComparison != 0) {
-
 
5086
        return lastComparison;
-
 
5087
      }
-
 
5088
      lastComparison = TBaseHelper.compareTo(purchaseOrderId, typedOther.purchaseOrderId);
-
 
5089
      if (lastComparison != 0) {
-
 
5090
        return lastComparison;
-
 
5091
      }
-
 
5092
      lastComparison = Boolean.valueOf(isSetOpen()).compareTo(isSetOpen());
-
 
5093
      if (lastComparison != 0) {
-
 
5094
        return lastComparison;
-
 
5095
      }
-
 
5096
      lastComparison = TBaseHelper.compareTo(open, typedOther.open);
-
 
5097
      if (lastComparison != 0) {
-
 
5098
        return lastComparison;
-
 
5099
      }
-
 
5100
      return 0;
-
 
5101
    }
-
 
5102
 
-
 
5103
    public void read(TProtocol iprot) throws TException {
-
 
5104
      TField field;
-
 
5105
      iprot.readStructBegin();
-
 
5106
      while (true)
-
 
5107
      {
-
 
5108
        field = iprot.readFieldBegin();
-
 
5109
        if (field.type == TType.STOP) { 
-
 
5110
          break;
-
 
5111
        }
-
 
5112
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
5113
        if (fieldId == null) {
-
 
5114
          TProtocolUtil.skip(iprot, field.type);
-
 
5115
        } else {
-
 
5116
          switch (fieldId) {
-
 
5117
            case PURCHASE_ORDER_ID:
-
 
5118
              if (field.type == TType.I64) {
-
 
5119
                this.purchaseOrderId = iprot.readI64();
-
 
5120
                setPurchaseOrderIdIsSet(true);
-
 
5121
              } else { 
-
 
5122
                TProtocolUtil.skip(iprot, field.type);
-
 
5123
              }
-
 
5124
              break;
-
 
5125
            case OPEN:
-
 
5126
              if (field.type == TType.BOOL) {
-
 
5127
                this.open = iprot.readBool();
-
 
5128
                setOpenIsSet(true);
-
 
5129
              } else { 
-
 
5130
                TProtocolUtil.skip(iprot, field.type);
-
 
5131
              }
-
 
5132
              break;
-
 
5133
          }
-
 
5134
          iprot.readFieldEnd();
-
 
5135
        }
-
 
5136
      }
-
 
5137
      iprot.readStructEnd();
-
 
5138
      validate();
-
 
5139
    }
-
 
5140
 
-
 
5141
    public void write(TProtocol oprot) throws TException {
-
 
5142
      validate();
-
 
5143
 
-
 
5144
      oprot.writeStructBegin(STRUCT_DESC);
-
 
5145
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
-
 
5146
      oprot.writeI64(this.purchaseOrderId);
-
 
5147
      oprot.writeFieldEnd();
-
 
5148
      oprot.writeFieldBegin(OPEN_FIELD_DESC);
-
 
5149
      oprot.writeBool(this.open);
-
 
5150
      oprot.writeFieldEnd();
-
 
5151
      oprot.writeFieldStop();
-
 
5152
      oprot.writeStructEnd();
-
 
5153
    }
-
 
5154
 
-
 
5155
    @Override
-
 
5156
    public String toString() {
-
 
5157
      StringBuilder sb = new StringBuilder("getAllPurchases_args(");
-
 
5158
      boolean first = true;
-
 
5159
 
-
 
5160
      sb.append("purchaseOrderId:");
-
 
5161
      sb.append(this.purchaseOrderId);
-
 
5162
      first = false;
-
 
5163
      if (!first) sb.append(", ");
-
 
5164
      sb.append("open:");
-
 
5165
      sb.append(this.open);
-
 
5166
      first = false;
-
 
5167
      sb.append(")");
-
 
5168
      return sb.toString();
-
 
5169
    }
-
 
5170
 
-
 
5171
    public void validate() throws TException {
-
 
5172
      // check for required fields
-
 
5173
    }
-
 
5174
 
-
 
5175
  }
-
 
5176
 
-
 
5177
  public static class getAllPurchases_result implements TBase<getAllPurchases_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllPurchases_result>   {
-
 
5178
    private static final TStruct STRUCT_DESC = new TStruct("getAllPurchases_result");
-
 
5179
 
-
 
5180
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
-
 
5181
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
-
 
5182
 
-
 
5183
    private List<Purchase> success;
-
 
5184
    private WarehouseServiceException wex;
-
 
5185
 
-
 
5186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
5187
    public enum _Fields implements TFieldIdEnum {
-
 
5188
      SUCCESS((short)0, "success"),
-
 
5189
      WEX((short)1, "wex");
-
 
5190
 
-
 
5191
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
5192
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
5193
 
-
 
5194
      static {
-
 
5195
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
5196
          byId.put((int)field._thriftId, field);
-
 
5197
          byName.put(field.getFieldName(), field);
-
 
5198
        }
-
 
5199
      }
-
 
5200
 
-
 
5201
      /**
-
 
5202
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
5203
       */
-
 
5204
      public static _Fields findByThriftId(int fieldId) {
-
 
5205
        return byId.get(fieldId);
-
 
5206
      }
-
 
5207
 
-
 
5208
      /**
-
 
5209
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
5210
       * if it is not found.
-
 
5211
       */
-
 
5212
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
5213
        _Fields fields = findByThriftId(fieldId);
-
 
5214
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
5215
        return fields;
-
 
5216
      }
-
 
5217
 
-
 
5218
      /**
-
 
5219
       * Find the _Fields constant that matches name, or null if its not found.
-
 
5220
       */
-
 
5221
      public static _Fields findByName(String name) {
-
 
5222
        return byName.get(name);
-
 
5223
      }
-
 
5224
 
-
 
5225
      private final short _thriftId;
-
 
5226
      private final String _fieldName;
-
 
5227
 
-
 
5228
      _Fields(short thriftId, String fieldName) {
-
 
5229
        _thriftId = thriftId;
-
 
5230
        _fieldName = fieldName;
-
 
5231
      }
-
 
5232
 
-
 
5233
      public short getThriftFieldId() {
-
 
5234
        return _thriftId;
-
 
5235
      }
-
 
5236
 
-
 
5237
      public String getFieldName() {
-
 
5238
        return _fieldName;
-
 
5239
      }
-
 
5240
    }
-
 
5241
 
-
 
5242
    // isset id assignments
-
 
5243
 
-
 
5244
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
5245
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
5246
          new ListMetaData(TType.LIST, 
-
 
5247
              new StructMetaData(TType.STRUCT, Purchase.class))));
-
 
5248
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
-
 
5249
          new FieldValueMetaData(TType.STRUCT)));
-
 
5250
    }});
-
 
5251
 
-
 
5252
    static {
-
 
5253
      FieldMetaData.addStructMetaDataMap(getAllPurchases_result.class, metaDataMap);
-
 
5254
    }
-
 
5255
 
-
 
5256
    public getAllPurchases_result() {
-
 
5257
    }
-
 
5258
 
-
 
5259
    public getAllPurchases_result(
-
 
5260
      List<Purchase> success,
-
 
5261
      WarehouseServiceException wex)
-
 
5262
    {
-
 
5263
      this();
-
 
5264
      this.success = success;
-
 
5265
      this.wex = wex;
-
 
5266
    }
-
 
5267
 
-
 
5268
    /**
-
 
5269
     * Performs a deep copy on <i>other</i>.
-
 
5270
     */
-
 
5271
    public getAllPurchases_result(getAllPurchases_result other) {
-
 
5272
      if (other.isSetSuccess()) {
-
 
5273
        List<Purchase> __this__success = new ArrayList<Purchase>();
-
 
5274
        for (Purchase other_element : other.success) {
-
 
5275
          __this__success.add(new Purchase(other_element));
-
 
5276
        }
-
 
5277
        this.success = __this__success;
-
 
5278
      }
-
 
5279
      if (other.isSetWex()) {
-
 
5280
        this.wex = new WarehouseServiceException(other.wex);
-
 
5281
      }
-
 
5282
    }
-
 
5283
 
-
 
5284
    public getAllPurchases_result deepCopy() {
-
 
5285
      return new getAllPurchases_result(this);
-
 
5286
    }
-
 
5287
 
-
 
5288
    @Deprecated
-
 
5289
    public getAllPurchases_result clone() {
-
 
5290
      return new getAllPurchases_result(this);
-
 
5291
    }
-
 
5292
 
-
 
5293
    public int getSuccessSize() {
-
 
5294
      return (this.success == null) ? 0 : this.success.size();
-
 
5295
    }
-
 
5296
 
-
 
5297
    public java.util.Iterator<Purchase> getSuccessIterator() {
-
 
5298
      return (this.success == null) ? null : this.success.iterator();
-
 
5299
    }
-
 
5300
 
-
 
5301
    public void addToSuccess(Purchase elem) {
-
 
5302
      if (this.success == null) {
-
 
5303
        this.success = new ArrayList<Purchase>();
-
 
5304
      }
-
 
5305
      this.success.add(elem);
-
 
5306
    }
-
 
5307
 
-
 
5308
    public List<Purchase> getSuccess() {
-
 
5309
      return this.success;
-
 
5310
    }
-
 
5311
 
-
 
5312
    public getAllPurchases_result setSuccess(List<Purchase> success) {
-
 
5313
      this.success = success;
-
 
5314
      return this;
-
 
5315
    }
-
 
5316
 
-
 
5317
    public void unsetSuccess() {
-
 
5318
      this.success = null;
-
 
5319
    }
-
 
5320
 
-
 
5321
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
5322
    public boolean isSetSuccess() {
-
 
5323
      return this.success != null;
-
 
5324
    }
-
 
5325
 
-
 
5326
    public void setSuccessIsSet(boolean value) {
-
 
5327
      if (!value) {
-
 
5328
        this.success = null;
-
 
5329
      }
-
 
5330
    }
-
 
5331
 
-
 
5332
    public WarehouseServiceException getWex() {
-
 
5333
      return this.wex;
-
 
5334
    }
-
 
5335
 
-
 
5336
    public getAllPurchases_result setWex(WarehouseServiceException wex) {
-
 
5337
      this.wex = wex;
-
 
5338
      return this;
-
 
5339
    }
-
 
5340
 
-
 
5341
    public void unsetWex() {
-
 
5342
      this.wex = null;
-
 
5343
    }
-
 
5344
 
-
 
5345
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
-
 
5346
    public boolean isSetWex() {
-
 
5347
      return this.wex != null;
-
 
5348
    }
-
 
5349
 
-
 
5350
    public void setWexIsSet(boolean value) {
-
 
5351
      if (!value) {
-
 
5352
        this.wex = null;
-
 
5353
      }
-
 
5354
    }
-
 
5355
 
-
 
5356
    public void setFieldValue(_Fields field, Object value) {
-
 
5357
      switch (field) {
-
 
5358
      case SUCCESS:
-
 
5359
        if (value == null) {
-
 
5360
          unsetSuccess();
-
 
5361
        } else {
-
 
5362
          setSuccess((List<Purchase>)value);
-
 
5363
        }
-
 
5364
        break;
-
 
5365
 
-
 
5366
      case WEX:
-
 
5367
        if (value == null) {
-
 
5368
          unsetWex();
-
 
5369
        } else {
-
 
5370
          setWex((WarehouseServiceException)value);
-
 
5371
        }
-
 
5372
        break;
-
 
5373
 
-
 
5374
      }
-
 
5375
    }
-
 
5376
 
-
 
5377
    public void setFieldValue(int fieldID, Object value) {
-
 
5378
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
5379
    }
-
 
5380
 
-
 
5381
    public Object getFieldValue(_Fields field) {
-
 
5382
      switch (field) {
-
 
5383
      case SUCCESS:
-
 
5384
        return getSuccess();
-
 
5385
 
-
 
5386
      case WEX:
-
 
5387
        return getWex();
-
 
5388
 
-
 
5389
      }
-
 
5390
      throw new IllegalStateException();
-
 
5391
    }
-
 
5392
 
-
 
5393
    public Object getFieldValue(int fieldId) {
-
 
5394
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
5395
    }
-
 
5396
 
-
 
5397
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
5398
    public boolean isSet(_Fields field) {
-
 
5399
      switch (field) {
-
 
5400
      case SUCCESS:
-
 
5401
        return isSetSuccess();
-
 
5402
      case WEX:
-
 
5403
        return isSetWex();
-
 
5404
      }
-
 
5405
      throw new IllegalStateException();
-
 
5406
    }
-
 
5407
 
-
 
5408
    public boolean isSet(int fieldID) {
-
 
5409
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
5410
    }
-
 
5411
 
-
 
5412
    @Override
-
 
5413
    public boolean equals(Object that) {
-
 
5414
      if (that == null)
-
 
5415
        return false;
-
 
5416
      if (that instanceof getAllPurchases_result)
-
 
5417
        return this.equals((getAllPurchases_result)that);
-
 
5418
      return false;
-
 
5419
    }
-
 
5420
 
-
 
5421
    public boolean equals(getAllPurchases_result that) {
-
 
5422
      if (that == null)
-
 
5423
        return false;
-
 
5424
 
-
 
5425
      boolean this_present_success = true && this.isSetSuccess();
-
 
5426
      boolean that_present_success = true && that.isSetSuccess();
-
 
5427
      if (this_present_success || that_present_success) {
-
 
5428
        if (!(this_present_success && that_present_success))
-
 
5429
          return false;
-
 
5430
        if (!this.success.equals(that.success))
-
 
5431
          return false;
-
 
5432
      }
-
 
5433
 
-
 
5434
      boolean this_present_wex = true && this.isSetWex();
-
 
5435
      boolean that_present_wex = true && that.isSetWex();
-
 
5436
      if (this_present_wex || that_present_wex) {
-
 
5437
        if (!(this_present_wex && that_present_wex))
-
 
5438
          return false;
-
 
5439
        if (!this.wex.equals(that.wex))
-
 
5440
          return false;
-
 
5441
      }
-
 
5442
 
-
 
5443
      return true;
-
 
5444
    }
-
 
5445
 
-
 
5446
    @Override
-
 
5447
    public int hashCode() {
-
 
5448
      return 0;
-
 
5449
    }
-
 
5450
 
-
 
5451
    public int compareTo(getAllPurchases_result other) {
-
 
5452
      if (!getClass().equals(other.getClass())) {
-
 
5453
        return getClass().getName().compareTo(other.getClass().getName());
-
 
5454
      }
-
 
5455
 
-
 
5456
      int lastComparison = 0;
-
 
5457
      getAllPurchases_result typedOther = (getAllPurchases_result)other;
-
 
5458
 
-
 
5459
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
5460
      if (lastComparison != 0) {
-
 
5461
        return lastComparison;
-
 
5462
      }
-
 
5463
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
5464
      if (lastComparison != 0) {
-
 
5465
        return lastComparison;
-
 
5466
      }
-
 
5467
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
-
 
5468
      if (lastComparison != 0) {
-
 
5469
        return lastComparison;
-
 
5470
      }
-
 
5471
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
-
 
5472
      if (lastComparison != 0) {
-
 
5473
        return lastComparison;
-
 
5474
      }
-
 
5475
      return 0;
-
 
5476
    }
-
 
5477
 
-
 
5478
    public void read(TProtocol iprot) throws TException {
-
 
5479
      TField field;
-
 
5480
      iprot.readStructBegin();
-
 
5481
      while (true)
-
 
5482
      {
-
 
5483
        field = iprot.readFieldBegin();
-
 
5484
        if (field.type == TType.STOP) { 
-
 
5485
          break;
-
 
5486
        }
-
 
5487
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
5488
        if (fieldId == null) {
-
 
5489
          TProtocolUtil.skip(iprot, field.type);
-
 
5490
        } else {
-
 
5491
          switch (fieldId) {
-
 
5492
            case SUCCESS:
-
 
5493
              if (field.type == TType.LIST) {
-
 
5494
                {
-
 
5495
                  TList _list8 = iprot.readListBegin();
-
 
5496
                  this.success = new ArrayList<Purchase>(_list8.size);
-
 
5497
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
-
 
5498
                  {
-
 
5499
                    Purchase _elem10;
-
 
5500
                    _elem10 = new Purchase();
-
 
5501
                    _elem10.read(iprot);
-
 
5502
                    this.success.add(_elem10);
-
 
5503
                  }
-
 
5504
                  iprot.readListEnd();
-
 
5505
                }
-
 
5506
              } else { 
-
 
5507
                TProtocolUtil.skip(iprot, field.type);
-
 
5508
              }
-
 
5509
              break;
-
 
5510
            case WEX:
-
 
5511
              if (field.type == TType.STRUCT) {
-
 
5512
                this.wex = new WarehouseServiceException();
-
 
5513
                this.wex.read(iprot);
-
 
5514
              } else { 
-
 
5515
                TProtocolUtil.skip(iprot, field.type);
-
 
5516
              }
-
 
5517
              break;
-
 
5518
          }
-
 
5519
          iprot.readFieldEnd();
-
 
5520
        }
-
 
5521
      }
-
 
5522
      iprot.readStructEnd();
-
 
5523
      validate();
-
 
5524
    }
-
 
5525
 
-
 
5526
    public void write(TProtocol oprot) throws TException {
-
 
5527
      oprot.writeStructBegin(STRUCT_DESC);
-
 
5528
 
-
 
5529
      if (this.isSetSuccess()) {
-
 
5530
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
5531
        {
-
 
5532
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-
 
5533
          for (Purchase _iter11 : this.success)
-
 
5534
          {
-
 
5535
            _iter11.write(oprot);
-
 
5536
          }
-
 
5537
          oprot.writeListEnd();
-
 
5538
        }
-
 
5539
        oprot.writeFieldEnd();
-
 
5540
      } else if (this.isSetWex()) {
-
 
5541
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
5542
        this.wex.write(oprot);
-
 
5543
        oprot.writeFieldEnd();
-
 
5544
      }
-
 
5545
      oprot.writeFieldStop();
-
 
5546
      oprot.writeStructEnd();
-
 
5547
    }
-
 
5548
 
-
 
5549
    @Override
-
 
5550
    public String toString() {
-
 
5551
      StringBuilder sb = new StringBuilder("getAllPurchases_result(");
-
 
5552
      boolean first = true;
-
 
5553
 
-
 
5554
      sb.append("success:");
-
 
5555
      if (this.success == null) {
-
 
5556
        sb.append("null");
-
 
5557
      } else {
-
 
5558
        sb.append(this.success);
-
 
5559
      }
-
 
5560
      first = false;
-
 
5561
      if (!first) sb.append(", ");
-
 
5562
      sb.append("wex:");
-
 
5563
      if (this.wex == null) {
-
 
5564
        sb.append("null");
-
 
5565
      } else {
-
 
5566
        sb.append(this.wex);
-
 
5567
      }
-
 
5568
      first = false;
-
 
5569
      sb.append(")");
-
 
5570
      return sb.toString();
-
 
5571
    }
-
 
5572
 
-
 
5573
    public void validate() throws TException {
-
 
5574
      // check for required fields
-
 
5575
    }
-
 
5576
 
-
 
5577
  }
-
 
5578
 
3975
  public static class scanIn_args implements TBase<scanIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<scanIn_args>   {
5579
  public static class scanIn_args implements TBase<scanIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<scanIn_args>   {
3976
    private static final TStruct STRUCT_DESC = new TStruct("scanIn_args");
5580
    private static final TStruct STRUCT_DESC = new TStruct("scanIn_args");
3977
 
5581
 
3978
    private static final TField PURCHASE_ID_FIELD_DESC = new TField("purchaseId", TType.I64, (short)1);
5582
    private static final TField PURCHASE_ID_FIELD_DESC = new TField("purchaseId", TType.I64, (short)1);
3979
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
-
 
3980
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)3);
5583
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)2);
3981
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.STRING, (short)4);
5584
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.STRING, (short)3);
3982
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)5);
5585
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)4);
3983
 
5586
 
3984
    private long purchaseId;
5587
    private long purchaseId;
3985
    private long itemId;
-
 
3986
    private String itemNumber;
5588
    private String itemNumber;
3987
    private String imeiNumber;
5589
    private String imeiNumber;
3988
    private ScanType type;
5590
    private ScanType type;
3989
 
5591
 
3990
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5592
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3991
    public enum _Fields implements TFieldIdEnum {
5593
    public enum _Fields implements TFieldIdEnum {
3992
      PURCHASE_ID((short)1, "purchaseId"),
5594
      PURCHASE_ID((short)1, "purchaseId"),
3993
      ITEM_ID((short)2, "itemId"),
-
 
3994
      ITEM_NUMBER((short)3, "itemNumber"),
5595
      ITEM_NUMBER((short)2, "itemNumber"),
3995
      IMEI_NUMBER((short)4, "imeiNumber"),
5596
      IMEI_NUMBER((short)3, "imeiNumber"),
3996
      /**
5597
      /**
3997
       * 
5598
       * 
3998
       * @see ScanType
5599
       * @see ScanType
3999
       */
5600
       */
4000
      TYPE((short)5, "type");
5601
      TYPE((short)4, "type");
4001
 
5602
 
4002
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4004
 
5605
 
4005
      static {
5606
      static {
Line 4050... Line 5651...
4050
      }
5651
      }
4051
    }
5652
    }
4052
 
5653
 
4053
    // isset id assignments
5654
    // isset id assignments
4054
    private static final int __PURCHASEID_ISSET_ID = 0;
5655
    private static final int __PURCHASEID_ISSET_ID = 0;
4055
    private static final int __ITEMID_ISSET_ID = 1;
-
 
4056
    private BitSet __isset_bit_vector = new BitSet(2);
5656
    private BitSet __isset_bit_vector = new BitSet(1);
4057
 
5657
 
4058
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5658
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4059
      put(_Fields.PURCHASE_ID, new FieldMetaData("purchaseId", TFieldRequirementType.DEFAULT, 
5659
      put(_Fields.PURCHASE_ID, new FieldMetaData("purchaseId", TFieldRequirementType.DEFAULT, 
4060
          new FieldValueMetaData(TType.I64)));
5660
          new FieldValueMetaData(TType.I64)));
4061
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
-
 
4062
          new FieldValueMetaData(TType.I64)));
-
 
4063
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
5661
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
4064
          new FieldValueMetaData(TType.STRING)));
5662
          new FieldValueMetaData(TType.STRING)));
4065
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
5663
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
4066
          new FieldValueMetaData(TType.STRING)));
5664
          new FieldValueMetaData(TType.STRING)));
4067
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
5665
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
Line 4075... Line 5673...
4075
    public scanIn_args() {
5673
    public scanIn_args() {
4076
    }
5674
    }
4077
 
5675
 
4078
    public scanIn_args(
5676
    public scanIn_args(
4079
      long purchaseId,
5677
      long purchaseId,
4080
      long itemId,
-
 
4081
      String itemNumber,
5678
      String itemNumber,
4082
      String imeiNumber,
5679
      String imeiNumber,
4083
      ScanType type)
5680
      ScanType type)
4084
    {
5681
    {
4085
      this();
5682
      this();
4086
      this.purchaseId = purchaseId;
5683
      this.purchaseId = purchaseId;
4087
      setPurchaseIdIsSet(true);
5684
      setPurchaseIdIsSet(true);
4088
      this.itemId = itemId;
-
 
4089
      setItemIdIsSet(true);
-
 
4090
      this.itemNumber = itemNumber;
5685
      this.itemNumber = itemNumber;
4091
      this.imeiNumber = imeiNumber;
5686
      this.imeiNumber = imeiNumber;
4092
      this.type = type;
5687
      this.type = type;
4093
    }
5688
    }
4094
 
5689
 
Line 4097... Line 5692...
4097
     */
5692
     */
4098
    public scanIn_args(scanIn_args other) {
5693
    public scanIn_args(scanIn_args other) {
4099
      __isset_bit_vector.clear();
5694
      __isset_bit_vector.clear();
4100
      __isset_bit_vector.or(other.__isset_bit_vector);
5695
      __isset_bit_vector.or(other.__isset_bit_vector);
4101
      this.purchaseId = other.purchaseId;
5696
      this.purchaseId = other.purchaseId;
4102
      this.itemId = other.itemId;
-
 
4103
      if (other.isSetItemNumber()) {
5697
      if (other.isSetItemNumber()) {
4104
        this.itemNumber = other.itemNumber;
5698
        this.itemNumber = other.itemNumber;
4105
      }
5699
      }
4106
      if (other.isSetImeiNumber()) {
5700
      if (other.isSetImeiNumber()) {
4107
        this.imeiNumber = other.imeiNumber;
5701
        this.imeiNumber = other.imeiNumber;
Line 4141... Line 5735...
4141
 
5735
 
4142
    public void setPurchaseIdIsSet(boolean value) {
5736
    public void setPurchaseIdIsSet(boolean value) {
4143
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
5737
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
4144
    }
5738
    }
4145
 
5739
 
4146
    public long getItemId() {
-
 
4147
      return this.itemId;
-
 
4148
    }
-
 
4149
 
-
 
4150
    public scanIn_args setItemId(long itemId) {
-
 
4151
      this.itemId = itemId;
-
 
4152
      setItemIdIsSet(true);
-
 
4153
      return this;
-
 
4154
    }
-
 
4155
 
-
 
4156
    public void unsetItemId() {
-
 
4157
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
4158
    }
-
 
4159
 
-
 
4160
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
-
 
4161
    public boolean isSetItemId() {
-
 
4162
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
4163
    }
-
 
4164
 
-
 
4165
    public void setItemIdIsSet(boolean value) {
-
 
4166
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
4167
    }
-
 
4168
 
-
 
4169
    public String getItemNumber() {
5740
    public String getItemNumber() {
4170
      return this.itemNumber;
5741
      return this.itemNumber;
4171
    }
5742
    }
4172
 
5743
 
4173
    public scanIn_args setItemNumber(String itemNumber) {
5744
    public scanIn_args setItemNumber(String itemNumber) {
Line 4254... Line 5825...
4254
        } else {
5825
        } else {
4255
          setPurchaseId((Long)value);
5826
          setPurchaseId((Long)value);
4256
        }
5827
        }
4257
        break;
5828
        break;
4258
 
5829
 
4259
      case ITEM_ID:
-
 
4260
        if (value == null) {
-
 
4261
          unsetItemId();
-
 
4262
        } else {
-
 
4263
          setItemId((Long)value);
-
 
4264
        }
-
 
4265
        break;
-
 
4266
 
-
 
4267
      case ITEM_NUMBER:
5830
      case ITEM_NUMBER:
4268
        if (value == null) {
5831
        if (value == null) {
4269
          unsetItemNumber();
5832
          unsetItemNumber();
4270
        } else {
5833
        } else {
4271
          setItemNumber((String)value);
5834
          setItemNumber((String)value);
Line 4298... Line 5861...
4298
    public Object getFieldValue(_Fields field) {
5861
    public Object getFieldValue(_Fields field) {
4299
      switch (field) {
5862
      switch (field) {
4300
      case PURCHASE_ID:
5863
      case PURCHASE_ID:
4301
        return new Long(getPurchaseId());
5864
        return new Long(getPurchaseId());
4302
 
5865
 
4303
      case ITEM_ID:
-
 
4304
        return new Long(getItemId());
-
 
4305
 
-
 
4306
      case ITEM_NUMBER:
5866
      case ITEM_NUMBER:
4307
        return getItemNumber();
5867
        return getItemNumber();
4308
 
5868
 
4309
      case IMEI_NUMBER:
5869
      case IMEI_NUMBER:
4310
        return getImeiNumber();
5870
        return getImeiNumber();
Line 4323... Line 5883...
4323
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5883
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4324
    public boolean isSet(_Fields field) {
5884
    public boolean isSet(_Fields field) {
4325
      switch (field) {
5885
      switch (field) {
4326
      case PURCHASE_ID:
5886
      case PURCHASE_ID:
4327
        return isSetPurchaseId();
5887
        return isSetPurchaseId();
4328
      case ITEM_ID:
-
 
4329
        return isSetItemId();
-
 
4330
      case ITEM_NUMBER:
5888
      case ITEM_NUMBER:
4331
        return isSetItemNumber();
5889
        return isSetItemNumber();
4332
      case IMEI_NUMBER:
5890
      case IMEI_NUMBER:
4333
        return isSetImeiNumber();
5891
        return isSetImeiNumber();
4334
      case TYPE:
5892
      case TYPE:
Line 4361... Line 5919...
4361
          return false;
5919
          return false;
4362
        if (this.purchaseId != that.purchaseId)
5920
        if (this.purchaseId != that.purchaseId)
4363
          return false;
5921
          return false;
4364
      }
5922
      }
4365
 
5923
 
4366
      boolean this_present_itemId = true;
-
 
4367
      boolean that_present_itemId = true;
-
 
4368
      if (this_present_itemId || that_present_itemId) {
-
 
4369
        if (!(this_present_itemId && that_present_itemId))
-
 
4370
          return false;
-
 
4371
        if (this.itemId != that.itemId)
-
 
4372
          return false;
-
 
4373
      }
-
 
4374
 
-
 
4375
      boolean this_present_itemNumber = true && this.isSetItemNumber();
5924
      boolean this_present_itemNumber = true && this.isSetItemNumber();
4376
      boolean that_present_itemNumber = true && that.isSetItemNumber();
5925
      boolean that_present_itemNumber = true && that.isSetItemNumber();
4377
      if (this_present_itemNumber || that_present_itemNumber) {
5926
      if (this_present_itemNumber || that_present_itemNumber) {
4378
        if (!(this_present_itemNumber && that_present_itemNumber))
5927
        if (!(this_present_itemNumber && that_present_itemNumber))
4379
          return false;
5928
          return false;
Line 4421... Line 5970...
4421
      }
5970
      }
4422
      lastComparison = TBaseHelper.compareTo(purchaseId, typedOther.purchaseId);
5971
      lastComparison = TBaseHelper.compareTo(purchaseId, typedOther.purchaseId);
4423
      if (lastComparison != 0) {
5972
      if (lastComparison != 0) {
4424
        return lastComparison;
5973
        return lastComparison;
4425
      }
5974
      }
4426
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
-
 
4427
      if (lastComparison != 0) {
-
 
4428
        return lastComparison;
-
 
4429
      }
-
 
4430
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
-
 
4431
      if (lastComparison != 0) {
-
 
4432
        return lastComparison;
-
 
4433
      }
-
 
4434
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
5975
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
4435
      if (lastComparison != 0) {
5976
      if (lastComparison != 0) {
4436
        return lastComparison;
5977
        return lastComparison;
4437
      }
5978
      }
4438
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
5979
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
Line 4478... Line 6019...
4478
                setPurchaseIdIsSet(true);
6019
                setPurchaseIdIsSet(true);
4479
              } else { 
6020
              } else { 
4480
                TProtocolUtil.skip(iprot, field.type);
6021
                TProtocolUtil.skip(iprot, field.type);
4481
              }
6022
              }
4482
              break;
6023
              break;
4483
            case ITEM_ID:
-
 
4484
              if (field.type == TType.I64) {
-
 
4485
                this.itemId = iprot.readI64();
-
 
4486
                setItemIdIsSet(true);
-
 
4487
              } else { 
-
 
4488
                TProtocolUtil.skip(iprot, field.type);
-
 
4489
              }
-
 
4490
              break;
-
 
4491
            case ITEM_NUMBER:
6024
            case ITEM_NUMBER:
4492
              if (field.type == TType.STRING) {
6025
              if (field.type == TType.STRING) {
4493
                this.itemNumber = iprot.readString();
6026
                this.itemNumber = iprot.readString();
4494
              } else { 
6027
              } else { 
4495
                TProtocolUtil.skip(iprot, field.type);
6028
                TProtocolUtil.skip(iprot, field.type);
Line 4522... Line 6055...
4522
 
6055
 
4523
      oprot.writeStructBegin(STRUCT_DESC);
6056
      oprot.writeStructBegin(STRUCT_DESC);
4524
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
6057
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
4525
      oprot.writeI64(this.purchaseId);
6058
      oprot.writeI64(this.purchaseId);
4526
      oprot.writeFieldEnd();
6059
      oprot.writeFieldEnd();
4527
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
4528
      oprot.writeI64(this.itemId);
-
 
4529
      oprot.writeFieldEnd();
-
 
4530
      if (this.itemNumber != null) {
6060
      if (this.itemNumber != null) {
4531
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
6061
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
4532
        oprot.writeString(this.itemNumber);
6062
        oprot.writeString(this.itemNumber);
4533
        oprot.writeFieldEnd();
6063
        oprot.writeFieldEnd();
4534
      }
6064
      }
Line 4553... Line 6083...
4553
 
6083
 
4554
      sb.append("purchaseId:");
6084
      sb.append("purchaseId:");
4555
      sb.append(this.purchaseId);
6085
      sb.append(this.purchaseId);
4556
      first = false;
6086
      first = false;
4557
      if (!first) sb.append(", ");
6087
      if (!first) sb.append(", ");
4558
      sb.append("itemId:");
-
 
4559
      sb.append(this.itemId);
-
 
4560
      first = false;
-
 
4561
      if (!first) sb.append(", ");
-
 
4562
      sb.append("itemNumber:");
6088
      sb.append("itemNumber:");
4563
      if (this.itemNumber == null) {
6089
      if (this.itemNumber == null) {
4564
        sb.append("null");
6090
        sb.append("null");
4565
      } else {
6091
      } else {
4566
        sb.append(this.itemNumber);
6092
        sb.append(this.itemNumber);