Subversion Repositories SmartDukaan

Rev

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

Rev 5372 Rev 5437
Line 23... Line 23...
23
public class WarehouseService {
23
public class WarehouseService {
24
 
24
 
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
26
 
26
 
27
    /**
27
    /**
28
     * Creating inventory for a serialized item
-
 
29
     * 
-
 
30
     * @param itemId
-
 
31
     * @param itemNumber
-
 
32
     * @param serialNumber
-
 
33
     * @param purchaseId
-
 
34
     */
-
 
35
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
36
 
-
 
37
    /**
-
 
38
     * Creating inventory for a serialized item using item number
-
 
39
     * 
-
 
40
     * @param itemNumber
-
 
41
     * @param serialNumber
-
 
42
     * @param purchaseId
-
 
43
     */
-
 
44
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
45
 
-
 
46
    /**
-
 
47
     * Creates inventory for an unserailized item
-
 
48
     * 
-
 
49
     * @param itemId
-
 
50
     * @param quantity
-
 
51
     * @param purchaseId
-
 
52
     */
-
 
53
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
54
 
-
 
55
    /**
-
 
56
     * Retrieves serialized inventory item given a serial number
28
     * Retrieves serialized inventory item given a serial number
57
     * 
29
     * 
58
     * @param serialNumber
30
     * @param serialNumber
59
     */
31
     */
60
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
32
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
Line 156... Line 128...
156
 
128
 
157
  }
129
  }
158
 
130
 
159
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
131
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
160
 
132
 
161
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
-
 
162
 
-
 
163
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException;
-
 
164
 
-
 
165
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
-
 
166
 
-
 
167
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
133
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
168
 
134
 
169
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
135
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
170
 
136
 
171
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException;
137
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException;
Line 208... Line 174...
208
 
174
 
209
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
175
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
210
      super(iprot, oprot);
176
      super(iprot, oprot);
211
    }
177
    }
212
 
178
 
213
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
-
 
214
    {
-
 
215
      send_createSerializedInventoryItem(itemId, itemNumber, serialNumber, purchaseId);
-
 
216
      return recv_createSerializedInventoryItem();
-
 
217
    }
-
 
218
 
-
 
219
    public void send_createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
-
 
220
    {
-
 
221
      createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
-
 
222
      args.setItemId(itemId);
-
 
223
      args.setItemNumber(itemNumber);
-
 
224
      args.setSerialNumber(serialNumber);
-
 
225
      args.setPurchaseId(purchaseId);
-
 
226
      sendBase("createSerializedInventoryItem", args);
-
 
227
    }
-
 
228
 
-
 
229
    public InventoryItem recv_createSerializedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
-
 
230
    {
-
 
231
      createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
-
 
232
      receiveBase(result, "createSerializedInventoryItem");
-
 
233
      if (result.isSetSuccess()) {
-
 
234
        return result.success;
-
 
235
      }
-
 
236
      if (result.wex != null) {
-
 
237
        throw result.wex;
-
 
238
      }
-
 
239
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");
-
 
240
    }
-
 
241
 
-
 
242
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
-
 
243
    {
-
 
244
      send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId);
-
 
245
      return recv_createSerializedInventoryItemFromItemNumber();
-
 
246
    }
-
 
247
 
-
 
248
    public void send_createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
-
 
249
    {
-
 
250
      createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
-
 
251
      args.setItemNumber(itemNumber);
-
 
252
      args.setSerialNumber(serialNumber);
-
 
253
      args.setPurchaseId(purchaseId);
-
 
254
      sendBase("createSerializedInventoryItemFromItemNumber", args);
-
 
255
    }
-
 
256
 
-
 
257
    public InventoryItem recv_createSerializedInventoryItemFromItemNumber() throws WarehouseServiceException, org.apache.thrift.TException
-
 
258
    {
-
 
259
      createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
-
 
260
      receiveBase(result, "createSerializedInventoryItemFromItemNumber");
-
 
261
      if (result.isSetSuccess()) {
-
 
262
        return result.success;
-
 
263
      }
-
 
264
      if (result.wex != null) {
-
 
265
        throw result.wex;
-
 
266
      }
-
 
267
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");
-
 
268
    }
-
 
269
 
-
 
270
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
-
 
271
    {
-
 
272
      send_createInventoryItem(itemId, quantity, purchaseId);
-
 
273
      return recv_createInventoryItem();
-
 
274
    }
-
 
275
 
-
 
276
    public void send_createInventoryItem(long itemId, long quantity, long purchaseId) throws org.apache.thrift.TException
-
 
277
    {
-
 
278
      createInventoryItem_args args = new createInventoryItem_args();
-
 
279
      args.setItemId(itemId);
-
 
280
      args.setQuantity(quantity);
-
 
281
      args.setPurchaseId(purchaseId);
-
 
282
      sendBase("createInventoryItem", args);
-
 
283
    }
-
 
284
 
-
 
285
    public InventoryItem recv_createInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
-
 
286
    {
-
 
287
      createInventoryItem_result result = new createInventoryItem_result();
-
 
288
      receiveBase(result, "createInventoryItem");
-
 
289
      if (result.isSetSuccess()) {
-
 
290
        return result.success;
-
 
291
      }
-
 
292
      if (result.wex != null) {
-
 
293
        throw result.wex;
-
 
294
      }
-
 
295
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");
-
 
296
    }
-
 
297
 
-
 
298
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
179
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
299
    {
180
    {
300
      send_getInventoryItem(serialNumber);
181
      send_getInventoryItem(serialNumber);
301
      return recv_getInventoryItem();
182
      return recv_getInventoryItem();
302
    }
183
    }
Line 620... Line 501...
620
 
501
 
621
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
502
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
622
      super(protocolFactory, clientManager, transport);
503
      super(protocolFactory, clientManager, transport);
623
    }
504
    }
624
 
505
 
625
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
-
 
626
      checkReady();
-
 
627
      createSerializedInventoryItem_call method_call = new createSerializedInventoryItem_call(itemId, itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
-
 
628
      this.___currentMethod = method_call;
-
 
629
      ___manager.call(method_call);
-
 
630
    }
-
 
631
 
-
 
632
    public static class createSerializedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
633
      private long itemId;
-
 
634
      private String itemNumber;
-
 
635
      private String serialNumber;
-
 
636
      private long purchaseId;
-
 
637
      public createSerializedInventoryItem_call(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_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 {
-
 
638
        super(client, protocolFactory, transport, resultHandler, false);
-
 
639
        this.itemId = itemId;
-
 
640
        this.itemNumber = itemNumber;
-
 
641
        this.serialNumber = serialNumber;
-
 
642
        this.purchaseId = purchaseId;
-
 
643
      }
-
 
644
 
-
 
645
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
646
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
647
        createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
-
 
648
        args.setItemId(itemId);
-
 
649
        args.setItemNumber(itemNumber);
-
 
650
        args.setSerialNumber(serialNumber);
-
 
651
        args.setPurchaseId(purchaseId);
-
 
652
        args.write(prot);
-
 
653
        prot.writeMessageEnd();
-
 
654
      }
-
 
655
 
-
 
656
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
657
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
658
          throw new IllegalStateException("Method call not finished!");
-
 
659
        }
-
 
660
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
661
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
662
        return (new Client(prot)).recv_createSerializedInventoryItem();
-
 
663
      }
-
 
664
    }
-
 
665
 
-
 
666
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException {
-
 
667
      checkReady();
-
 
668
      createSerializedInventoryItemFromItemNumber_call method_call = new createSerializedInventoryItemFromItemNumber_call(itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
-
 
669
      this.___currentMethod = method_call;
-
 
670
      ___manager.call(method_call);
-
 
671
    }
-
 
672
 
-
 
673
    public static class createSerializedInventoryItemFromItemNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
674
      private String itemNumber;
-
 
675
      private String serialNumber;
-
 
676
      private long purchaseId;
-
 
677
      public createSerializedInventoryItemFromItemNumber_call(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_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 {
-
 
678
        super(client, protocolFactory, transport, resultHandler, false);
-
 
679
        this.itemNumber = itemNumber;
-
 
680
        this.serialNumber = serialNumber;
-
 
681
        this.purchaseId = purchaseId;
-
 
682
      }
-
 
683
 
-
 
684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItemFromItemNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
686
        createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
-
 
687
        args.setItemNumber(itemNumber);
-
 
688
        args.setSerialNumber(serialNumber);
-
 
689
        args.setPurchaseId(purchaseId);
-
 
690
        args.write(prot);
-
 
691
        prot.writeMessageEnd();
-
 
692
      }
-
 
693
 
-
 
694
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
695
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
696
          throw new IllegalStateException("Method call not finished!");
-
 
697
        }
-
 
698
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
699
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
700
        return (new Client(prot)).recv_createSerializedInventoryItemFromItemNumber();
-
 
701
      }
-
 
702
    }
-
 
703
 
-
 
704
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
-
 
705
      checkReady();
-
 
706
      createInventoryItem_call method_call = new createInventoryItem_call(itemId, quantity, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
-
 
707
      this.___currentMethod = method_call;
-
 
708
      ___manager.call(method_call);
-
 
709
    }
-
 
710
 
-
 
711
    public static class createInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
712
      private long itemId;
-
 
713
      private long quantity;
-
 
714
      private long purchaseId;
-
 
715
      public createInventoryItem_call(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_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 {
-
 
716
        super(client, protocolFactory, transport, resultHandler, false);
-
 
717
        this.itemId = itemId;
-
 
718
        this.quantity = quantity;
-
 
719
        this.purchaseId = purchaseId;
-
 
720
      }
-
 
721
 
-
 
722
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
723
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
724
        createInventoryItem_args args = new createInventoryItem_args();
-
 
725
        args.setItemId(itemId);
-
 
726
        args.setQuantity(quantity);
-
 
727
        args.setPurchaseId(purchaseId);
-
 
728
        args.write(prot);
-
 
729
        prot.writeMessageEnd();
-
 
730
      }
-
 
731
 
-
 
732
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
733
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
734
          throw new IllegalStateException("Method call not finished!");
-
 
735
        }
-
 
736
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
737
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
738
        return (new Client(prot)).recv_createInventoryItem();
-
 
739
      }
-
 
740
    }
-
 
741
 
-
 
742
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
506
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
743
      checkReady();
507
      checkReady();
744
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
508
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
745
      this.___currentMethod = method_call;
509
      this.___currentMethod = method_call;
746
      ___manager.call(method_call);
510
      ___manager.call(method_call);
Line 1188... Line 952...
1188
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
952
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1189
      super(iface, getProcessMap(processMap));
953
      super(iface, getProcessMap(processMap));
1190
    }
954
    }
1191
 
955
 
1192
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
956
    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1193
      processMap.put("createSerializedInventoryItem", new createSerializedInventoryItem());
-
 
1194
      processMap.put("createSerializedInventoryItemFromItemNumber", new createSerializedInventoryItemFromItemNumber());
-
 
1195
      processMap.put("createInventoryItem", new createInventoryItem());
-
 
1196
      processMap.put("getInventoryItem", new getInventoryItem());
957
      processMap.put("getInventoryItem", new getInventoryItem());
1197
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
958
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
1198
      processMap.put("scanSerializedItem", new scanSerializedItem());
959
      processMap.put("scanSerializedItem", new scanSerializedItem());
1199
      processMap.put("scan", new scan());
960
      processMap.put("scan", new scan());
1200
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
961
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
Line 1206... Line 967...
1206
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
967
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
1207
      processMap.put("getPurchaseScans", new getPurchaseScans());
968
      processMap.put("getPurchaseScans", new getPurchaseScans());
1208
      return processMap;
969
      return processMap;
1209
    }
970
    }
1210
 
971
 
1211
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
-
 
1212
      public createSerializedInventoryItem() {
-
 
1213
        super("createSerializedInventoryItem");
-
 
1214
      }
-
 
1215
 
-
 
1216
      protected createSerializedInventoryItem_args getEmptyArgsInstance() {
-
 
1217
        return new createSerializedInventoryItem_args();
-
 
1218
      }
-
 
1219
 
-
 
1220
      protected createSerializedInventoryItem_result getResult(I iface, createSerializedInventoryItem_args args) throws org.apache.thrift.TException {
-
 
1221
        createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
-
 
1222
        try {
-
 
1223
          result.success = iface.createSerializedInventoryItem(args.itemId, args.itemNumber, args.serialNumber, args.purchaseId);
-
 
1224
        } catch (WarehouseServiceException wex) {
-
 
1225
          result.wex = wex;
-
 
1226
        }
-
 
1227
        return result;
-
 
1228
      }
-
 
1229
    }
-
 
1230
 
-
 
1231
    private static class createSerializedInventoryItemFromItemNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItemFromItemNumber_args> {
-
 
1232
      public createSerializedInventoryItemFromItemNumber() {
-
 
1233
        super("createSerializedInventoryItemFromItemNumber");
-
 
1234
      }
-
 
1235
 
-
 
1236
      protected createSerializedInventoryItemFromItemNumber_args getEmptyArgsInstance() {
-
 
1237
        return new createSerializedInventoryItemFromItemNumber_args();
-
 
1238
      }
-
 
1239
 
-
 
1240
      protected createSerializedInventoryItemFromItemNumber_result getResult(I iface, createSerializedInventoryItemFromItemNumber_args args) throws org.apache.thrift.TException {
-
 
1241
        createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
-
 
1242
        try {
-
 
1243
          result.success = iface.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId);
-
 
1244
        } catch (WarehouseServiceException wex) {
-
 
1245
          result.wex = wex;
-
 
1246
        }
-
 
1247
        return result;
-
 
1248
      }
-
 
1249
    }
-
 
1250
 
-
 
1251
    private static class createInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInventoryItem_args> {
-
 
1252
      public createInventoryItem() {
-
 
1253
        super("createInventoryItem");
-
 
1254
      }
-
 
1255
 
-
 
1256
      protected createInventoryItem_args getEmptyArgsInstance() {
-
 
1257
        return new createInventoryItem_args();
-
 
1258
      }
-
 
1259
 
-
 
1260
      protected createInventoryItem_result getResult(I iface, createInventoryItem_args args) throws org.apache.thrift.TException {
-
 
1261
        createInventoryItem_result result = new createInventoryItem_result();
-
 
1262
        try {
-
 
1263
          result.success = iface.createInventoryItem(args.itemId, args.quantity, args.purchaseId);
-
 
1264
        } catch (WarehouseServiceException wex) {
-
 
1265
          result.wex = wex;
-
 
1266
        }
-
 
1267
        return result;
-
 
1268
      }
-
 
1269
    }
-
 
1270
 
-
 
1271
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
972
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1272
      public getInventoryItem() {
973
      public getInventoryItem() {
1273
        super("getInventoryItem");
974
        super("getInventoryItem");
1274
      }
975
      }
1275
 
976
 
Line 1492... Line 1193...
1492
      }
1193
      }
1493
    }
1194
    }
1494
 
1195
 
1495
  }
1196
  }
1496
 
1197
 
1497
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
-
 
1498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
-
 
1499
 
-
 
1500
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
1501
    private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
-
 
1502
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)3);
-
 
1503
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)4);
-
 
1504
 
-
 
1505
    private long itemId; // required
-
 
1506
    private String itemNumber; // required
-
 
1507
    private String serialNumber; // required
-
 
1508
    private long purchaseId; // required
-
 
1509
 
-
 
1510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1511
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
1512
      ITEM_ID((short)1, "itemId"),
-
 
1513
      ITEM_NUMBER((short)2, "itemNumber"),
-
 
1514
      SERIAL_NUMBER((short)3, "serialNumber"),
-
 
1515
      PURCHASE_ID((short)4, "purchaseId");
-
 
1516
 
-
 
1517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1518
 
-
 
1519
      static {
-
 
1520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1521
          byName.put(field.getFieldName(), field);
-
 
1522
        }
-
 
1523
      }
-
 
1524
 
-
 
1525
      /**
-
 
1526
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1527
       */
-
 
1528
      public static _Fields findByThriftId(int fieldId) {
-
 
1529
        switch(fieldId) {
-
 
1530
          case 1: // ITEM_ID
-
 
1531
            return ITEM_ID;
-
 
1532
          case 2: // ITEM_NUMBER
-
 
1533
            return ITEM_NUMBER;
-
 
1534
          case 3: // SERIAL_NUMBER
-
 
1535
            return SERIAL_NUMBER;
-
 
1536
          case 4: // PURCHASE_ID
-
 
1537
            return PURCHASE_ID;
-
 
1538
          default:
-
 
1539
            return null;
-
 
1540
        }
-
 
1541
      }
-
 
1542
 
-
 
1543
      /**
-
 
1544
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1545
       * if it is not found.
-
 
1546
       */
-
 
1547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1548
        _Fields fields = findByThriftId(fieldId);
-
 
1549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1550
        return fields;
-
 
1551
      }
-
 
1552
 
-
 
1553
      /**
-
 
1554
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1555
       */
-
 
1556
      public static _Fields findByName(String name) {
-
 
1557
        return byName.get(name);
-
 
1558
      }
-
 
1559
 
-
 
1560
      private final short _thriftId;
-
 
1561
      private final String _fieldName;
-
 
1562
 
-
 
1563
      _Fields(short thriftId, String fieldName) {
-
 
1564
        _thriftId = thriftId;
-
 
1565
        _fieldName = fieldName;
-
 
1566
      }
-
 
1567
 
-
 
1568
      public short getThriftFieldId() {
-
 
1569
        return _thriftId;
-
 
1570
      }
-
 
1571
 
-
 
1572
      public String getFieldName() {
-
 
1573
        return _fieldName;
-
 
1574
      }
-
 
1575
    }
-
 
1576
 
-
 
1577
    // isset id assignments
-
 
1578
    private static final int __ITEMID_ISSET_ID = 0;
-
 
1579
    private static final int __PURCHASEID_ISSET_ID = 1;
-
 
1580
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
1581
 
-
 
1582
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
1583
    static {
-
 
1584
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
1585
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1586
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
1587
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1588
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
1589
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1590
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
1591
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
1592
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
1593
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
1594
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_args.class, metaDataMap);
-
 
1595
    }
-
 
1596
 
-
 
1597
    public createSerializedInventoryItem_args() {
-
 
1598
    }
-
 
1599
 
-
 
1600
    public createSerializedInventoryItem_args(
-
 
1601
      long itemId,
-
 
1602
      String itemNumber,
-
 
1603
      String serialNumber,
-
 
1604
      long purchaseId)
-
 
1605
    {
-
 
1606
      this();
-
 
1607
      this.itemId = itemId;
-
 
1608
      setItemIdIsSet(true);
-
 
1609
      this.itemNumber = itemNumber;
-
 
1610
      this.serialNumber = serialNumber;
-
 
1611
      this.purchaseId = purchaseId;
-
 
1612
      setPurchaseIdIsSet(true);
-
 
1613
    }
-
 
1614
 
-
 
1615
    /**
-
 
1616
     * Performs a deep copy on <i>other</i>.
-
 
1617
     */
-
 
1618
    public createSerializedInventoryItem_args(createSerializedInventoryItem_args other) {
-
 
1619
      __isset_bit_vector.clear();
-
 
1620
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
1621
      this.itemId = other.itemId;
-
 
1622
      if (other.isSetItemNumber()) {
-
 
1623
        this.itemNumber = other.itemNumber;
-
 
1624
      }
-
 
1625
      if (other.isSetSerialNumber()) {
-
 
1626
        this.serialNumber = other.serialNumber;
-
 
1627
      }
-
 
1628
      this.purchaseId = other.purchaseId;
-
 
1629
    }
-
 
1630
 
-
 
1631
    public createSerializedInventoryItem_args deepCopy() {
-
 
1632
      return new createSerializedInventoryItem_args(this);
-
 
1633
    }
-
 
1634
 
-
 
1635
    @Override
-
 
1636
    public void clear() {
-
 
1637
      setItemIdIsSet(false);
-
 
1638
      this.itemId = 0;
-
 
1639
      this.itemNumber = null;
-
 
1640
      this.serialNumber = null;
-
 
1641
      setPurchaseIdIsSet(false);
-
 
1642
      this.purchaseId = 0;
-
 
1643
    }
-
 
1644
 
-
 
1645
    public long getItemId() {
-
 
1646
      return this.itemId;
-
 
1647
    }
-
 
1648
 
-
 
1649
    public void setItemId(long itemId) {
-
 
1650
      this.itemId = itemId;
-
 
1651
      setItemIdIsSet(true);
-
 
1652
    }
-
 
1653
 
-
 
1654
    public void unsetItemId() {
-
 
1655
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
1656
    }
-
 
1657
 
-
 
1658
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
1659
    public boolean isSetItemId() {
-
 
1660
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
1661
    }
-
 
1662
 
-
 
1663
    public void setItemIdIsSet(boolean value) {
-
 
1664
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
1665
    }
-
 
1666
 
-
 
1667
    public String getItemNumber() {
-
 
1668
      return this.itemNumber;
-
 
1669
    }
-
 
1670
 
-
 
1671
    public void setItemNumber(String itemNumber) {
-
 
1672
      this.itemNumber = itemNumber;
-
 
1673
    }
-
 
1674
 
-
 
1675
    public void unsetItemNumber() {
-
 
1676
      this.itemNumber = null;
-
 
1677
    }
-
 
1678
 
-
 
1679
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
-
 
1680
    public boolean isSetItemNumber() {
-
 
1681
      return this.itemNumber != null;
-
 
1682
    }
-
 
1683
 
-
 
1684
    public void setItemNumberIsSet(boolean value) {
-
 
1685
      if (!value) {
-
 
1686
        this.itemNumber = null;
-
 
1687
      }
-
 
1688
    }
-
 
1689
 
-
 
1690
    public String getSerialNumber() {
-
 
1691
      return this.serialNumber;
-
 
1692
    }
-
 
1693
 
-
 
1694
    public void setSerialNumber(String serialNumber) {
-
 
1695
      this.serialNumber = serialNumber;
-
 
1696
    }
-
 
1697
 
-
 
1698
    public void unsetSerialNumber() {
-
 
1699
      this.serialNumber = null;
-
 
1700
    }
-
 
1701
 
-
 
1702
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
-
 
1703
    public boolean isSetSerialNumber() {
-
 
1704
      return this.serialNumber != null;
-
 
1705
    }
-
 
1706
 
-
 
1707
    public void setSerialNumberIsSet(boolean value) {
-
 
1708
      if (!value) {
-
 
1709
        this.serialNumber = null;
-
 
1710
      }
-
 
1711
    }
-
 
1712
 
-
 
1713
    public long getPurchaseId() {
-
 
1714
      return this.purchaseId;
-
 
1715
    }
-
 
1716
 
-
 
1717
    public void setPurchaseId(long purchaseId) {
-
 
1718
      this.purchaseId = purchaseId;
-
 
1719
      setPurchaseIdIsSet(true);
-
 
1720
    }
-
 
1721
 
-
 
1722
    public void unsetPurchaseId() {
-
 
1723
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
-
 
1724
    }
-
 
1725
 
-
 
1726
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
-
 
1727
    public boolean isSetPurchaseId() {
-
 
1728
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
-
 
1729
    }
-
 
1730
 
-
 
1731
    public void setPurchaseIdIsSet(boolean value) {
-
 
1732
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
-
 
1733
    }
-
 
1734
 
-
 
1735
    public void setFieldValue(_Fields field, Object value) {
-
 
1736
      switch (field) {
-
 
1737
      case ITEM_ID:
-
 
1738
        if (value == null) {
-
 
1739
          unsetItemId();
-
 
1740
        } else {
-
 
1741
          setItemId((Long)value);
-
 
1742
        }
-
 
1743
        break;
-
 
1744
 
-
 
1745
      case ITEM_NUMBER:
-
 
1746
        if (value == null) {
-
 
1747
          unsetItemNumber();
-
 
1748
        } else {
-
 
1749
          setItemNumber((String)value);
-
 
1750
        }
-
 
1751
        break;
-
 
1752
 
-
 
1753
      case SERIAL_NUMBER:
-
 
1754
        if (value == null) {
-
 
1755
          unsetSerialNumber();
-
 
1756
        } else {
-
 
1757
          setSerialNumber((String)value);
-
 
1758
        }
-
 
1759
        break;
-
 
1760
 
-
 
1761
      case PURCHASE_ID:
-
 
1762
        if (value == null) {
-
 
1763
          unsetPurchaseId();
-
 
1764
        } else {
-
 
1765
          setPurchaseId((Long)value);
-
 
1766
        }
-
 
1767
        break;
-
 
1768
 
-
 
1769
      }
-
 
1770
    }
-
 
1771
 
-
 
1772
    public Object getFieldValue(_Fields field) {
-
 
1773
      switch (field) {
-
 
1774
      case ITEM_ID:
-
 
1775
        return Long.valueOf(getItemId());
-
 
1776
 
-
 
1777
      case ITEM_NUMBER:
-
 
1778
        return getItemNumber();
-
 
1779
 
-
 
1780
      case SERIAL_NUMBER:
-
 
1781
        return getSerialNumber();
-
 
1782
 
-
 
1783
      case PURCHASE_ID:
-
 
1784
        return Long.valueOf(getPurchaseId());
-
 
1785
 
-
 
1786
      }
-
 
1787
      throw new IllegalStateException();
-
 
1788
    }
-
 
1789
 
-
 
1790
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
1791
    public boolean isSet(_Fields field) {
-
 
1792
      if (field == null) {
-
 
1793
        throw new IllegalArgumentException();
-
 
1794
      }
-
 
1795
 
-
 
1796
      switch (field) {
-
 
1797
      case ITEM_ID:
-
 
1798
        return isSetItemId();
-
 
1799
      case ITEM_NUMBER:
-
 
1800
        return isSetItemNumber();
-
 
1801
      case SERIAL_NUMBER:
-
 
1802
        return isSetSerialNumber();
-
 
1803
      case PURCHASE_ID:
-
 
1804
        return isSetPurchaseId();
-
 
1805
      }
-
 
1806
      throw new IllegalStateException();
-
 
1807
    }
-
 
1808
 
-
 
1809
    @Override
-
 
1810
    public boolean equals(Object that) {
-
 
1811
      if (that == null)
-
 
1812
        return false;
-
 
1813
      if (that instanceof createSerializedInventoryItem_args)
-
 
1814
        return this.equals((createSerializedInventoryItem_args)that);
-
 
1815
      return false;
-
 
1816
    }
-
 
1817
 
-
 
1818
    public boolean equals(createSerializedInventoryItem_args that) {
-
 
1819
      if (that == null)
-
 
1820
        return false;
-
 
1821
 
-
 
1822
      boolean this_present_itemId = true;
-
 
1823
      boolean that_present_itemId = true;
-
 
1824
      if (this_present_itemId || that_present_itemId) {
-
 
1825
        if (!(this_present_itemId && that_present_itemId))
-
 
1826
          return false;
-
 
1827
        if (this.itemId != that.itemId)
-
 
1828
          return false;
-
 
1829
      }
-
 
1830
 
-
 
1831
      boolean this_present_itemNumber = true && this.isSetItemNumber();
-
 
1832
      boolean that_present_itemNumber = true && that.isSetItemNumber();
-
 
1833
      if (this_present_itemNumber || that_present_itemNumber) {
-
 
1834
        if (!(this_present_itemNumber && that_present_itemNumber))
-
 
1835
          return false;
-
 
1836
        if (!this.itemNumber.equals(that.itemNumber))
-
 
1837
          return false;
-
 
1838
      }
-
 
1839
 
-
 
1840
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
-
 
1841
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
-
 
1842
      if (this_present_serialNumber || that_present_serialNumber) {
-
 
1843
        if (!(this_present_serialNumber && that_present_serialNumber))
-
 
1844
          return false;
-
 
1845
        if (!this.serialNumber.equals(that.serialNumber))
-
 
1846
          return false;
-
 
1847
      }
-
 
1848
 
-
 
1849
      boolean this_present_purchaseId = true;
-
 
1850
      boolean that_present_purchaseId = true;
-
 
1851
      if (this_present_purchaseId || that_present_purchaseId) {
-
 
1852
        if (!(this_present_purchaseId && that_present_purchaseId))
-
 
1853
          return false;
-
 
1854
        if (this.purchaseId != that.purchaseId)
-
 
1855
          return false;
-
 
1856
      }
-
 
1857
 
-
 
1858
      return true;
-
 
1859
    }
-
 
1860
 
-
 
1861
    @Override
-
 
1862
    public int hashCode() {
-
 
1863
      return 0;
-
 
1864
    }
-
 
1865
 
-
 
1866
    public int compareTo(createSerializedInventoryItem_args other) {
-
 
1867
      if (!getClass().equals(other.getClass())) {
-
 
1868
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1869
      }
-
 
1870
 
-
 
1871
      int lastComparison = 0;
-
 
1872
      createSerializedInventoryItem_args typedOther = (createSerializedInventoryItem_args)other;
-
 
1873
 
-
 
1874
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
1875
      if (lastComparison != 0) {
-
 
1876
        return lastComparison;
-
 
1877
      }
-
 
1878
      if (isSetItemId()) {
-
 
1879
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
1880
        if (lastComparison != 0) {
-
 
1881
          return lastComparison;
-
 
1882
        }
-
 
1883
      }
-
 
1884
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
-
 
1885
      if (lastComparison != 0) {
-
 
1886
        return lastComparison;
-
 
1887
      }
-
 
1888
      if (isSetItemNumber()) {
-
 
1889
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
-
 
1890
        if (lastComparison != 0) {
-
 
1891
          return lastComparison;
-
 
1892
        }
-
 
1893
      }
-
 
1894
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
-
 
1895
      if (lastComparison != 0) {
-
 
1896
        return lastComparison;
-
 
1897
      }
-
 
1898
      if (isSetSerialNumber()) {
-
 
1899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
-
 
1900
        if (lastComparison != 0) {
-
 
1901
          return lastComparison;
-
 
1902
        }
-
 
1903
      }
-
 
1904
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
-
 
1905
      if (lastComparison != 0) {
-
 
1906
        return lastComparison;
-
 
1907
      }
-
 
1908
      if (isSetPurchaseId()) {
-
 
1909
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
-
 
1910
        if (lastComparison != 0) {
-
 
1911
          return lastComparison;
-
 
1912
        }
-
 
1913
      }
-
 
1914
      return 0;
-
 
1915
    }
-
 
1916
 
-
 
1917
    public _Fields fieldForId(int fieldId) {
-
 
1918
      return _Fields.findByThriftId(fieldId);
-
 
1919
    }
-
 
1920
 
-
 
1921
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
1922
      org.apache.thrift.protocol.TField field;
-
 
1923
      iprot.readStructBegin();
-
 
1924
      while (true)
-
 
1925
      {
-
 
1926
        field = iprot.readFieldBegin();
-
 
1927
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
1928
          break;
-
 
1929
        }
-
 
1930
        switch (field.id) {
-
 
1931
          case 1: // ITEM_ID
-
 
1932
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1933
              this.itemId = iprot.readI64();
-
 
1934
              setItemIdIsSet(true);
-
 
1935
            } else { 
-
 
1936
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1937
            }
-
 
1938
            break;
-
 
1939
          case 2: // ITEM_NUMBER
-
 
1940
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1941
              this.itemNumber = iprot.readString();
-
 
1942
            } else { 
-
 
1943
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1944
            }
-
 
1945
            break;
-
 
1946
          case 3: // SERIAL_NUMBER
-
 
1947
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1948
              this.serialNumber = iprot.readString();
-
 
1949
            } else { 
-
 
1950
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1951
            }
-
 
1952
            break;
-
 
1953
          case 4: // PURCHASE_ID
-
 
1954
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1955
              this.purchaseId = iprot.readI64();
-
 
1956
              setPurchaseIdIsSet(true);
-
 
1957
            } else { 
-
 
1958
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1959
            }
-
 
1960
            break;
-
 
1961
          default:
-
 
1962
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1963
        }
-
 
1964
        iprot.readFieldEnd();
-
 
1965
      }
-
 
1966
      iprot.readStructEnd();
-
 
1967
      validate();
-
 
1968
    }
-
 
1969
 
-
 
1970
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
1971
      validate();
-
 
1972
 
-
 
1973
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1974
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
1975
      oprot.writeI64(this.itemId);
-
 
1976
      oprot.writeFieldEnd();
-
 
1977
      if (this.itemNumber != null) {
-
 
1978
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
-
 
1979
        oprot.writeString(this.itemNumber);
-
 
1980
        oprot.writeFieldEnd();
-
 
1981
      }
-
 
1982
      if (this.serialNumber != null) {
-
 
1983
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
-
 
1984
        oprot.writeString(this.serialNumber);
-
 
1985
        oprot.writeFieldEnd();
-
 
1986
      }
-
 
1987
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
-
 
1988
      oprot.writeI64(this.purchaseId);
-
 
1989
      oprot.writeFieldEnd();
-
 
1990
      oprot.writeFieldStop();
-
 
1991
      oprot.writeStructEnd();
-
 
1992
    }
-
 
1993
 
-
 
1994
    @Override
-
 
1995
    public String toString() {
-
 
1996
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_args(");
-
 
1997
      boolean first = true;
-
 
1998
 
-
 
1999
      sb.append("itemId:");
-
 
2000
      sb.append(this.itemId);
-
 
2001
      first = false;
-
 
2002
      if (!first) sb.append(", ");
-
 
2003
      sb.append("itemNumber:");
-
 
2004
      if (this.itemNumber == null) {
-
 
2005
        sb.append("null");
-
 
2006
      } else {
-
 
2007
        sb.append(this.itemNumber);
-
 
2008
      }
-
 
2009
      first = false;
-
 
2010
      if (!first) sb.append(", ");
-
 
2011
      sb.append("serialNumber:");
-
 
2012
      if (this.serialNumber == null) {
-
 
2013
        sb.append("null");
-
 
2014
      } else {
-
 
2015
        sb.append(this.serialNumber);
-
 
2016
      }
-
 
2017
      first = false;
-
 
2018
      if (!first) sb.append(", ");
-
 
2019
      sb.append("purchaseId:");
-
 
2020
      sb.append(this.purchaseId);
-
 
2021
      first = false;
-
 
2022
      sb.append(")");
-
 
2023
      return sb.toString();
-
 
2024
    }
-
 
2025
 
-
 
2026
    public void validate() throws org.apache.thrift.TException {
-
 
2027
      // check for required fields
-
 
2028
    }
-
 
2029
 
-
 
2030
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2031
      try {
-
 
2032
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2033
      } catch (org.apache.thrift.TException te) {
-
 
2034
        throw new java.io.IOException(te);
-
 
2035
      }
-
 
2036
    }
-
 
2037
 
-
 
2038
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2039
      try {
-
 
2040
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
2041
        __isset_bit_vector = new BitSet(1);
-
 
2042
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2043
      } catch (org.apache.thrift.TException te) {
-
 
2044
        throw new java.io.IOException(te);
-
 
2045
      }
-
 
2046
    }
-
 
2047
 
-
 
2048
  }
-
 
2049
 
-
 
2050
  public static class createSerializedInventoryItem_result implements org.apache.thrift.TBase<createSerializedInventoryItem_result, createSerializedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
-
 
2051
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_result");
-
 
2052
 
-
 
2053
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
2054
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
2055
 
-
 
2056
    private InventoryItem success; // required
-
 
2057
    private WarehouseServiceException wex; // required
-
 
2058
 
-
 
2059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2060
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
2061
      SUCCESS((short)0, "success"),
-
 
2062
      WEX((short)1, "wex");
-
 
2063
 
-
 
2064
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2065
 
-
 
2066
      static {
-
 
2067
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2068
          byName.put(field.getFieldName(), field);
-
 
2069
        }
-
 
2070
      }
-
 
2071
 
-
 
2072
      /**
-
 
2073
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2074
       */
-
 
2075
      public static _Fields findByThriftId(int fieldId) {
-
 
2076
        switch(fieldId) {
-
 
2077
          case 0: // SUCCESS
-
 
2078
            return SUCCESS;
-
 
2079
          case 1: // WEX
-
 
2080
            return WEX;
-
 
2081
          default:
-
 
2082
            return null;
-
 
2083
        }
-
 
2084
      }
-
 
2085
 
-
 
2086
      /**
-
 
2087
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2088
       * if it is not found.
-
 
2089
       */
-
 
2090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2091
        _Fields fields = findByThriftId(fieldId);
-
 
2092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2093
        return fields;
-
 
2094
      }
-
 
2095
 
-
 
2096
      /**
-
 
2097
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2098
       */
-
 
2099
      public static _Fields findByName(String name) {
-
 
2100
        return byName.get(name);
-
 
2101
      }
-
 
2102
 
-
 
2103
      private final short _thriftId;
-
 
2104
      private final String _fieldName;
-
 
2105
 
-
 
2106
      _Fields(short thriftId, String fieldName) {
-
 
2107
        _thriftId = thriftId;
-
 
2108
        _fieldName = fieldName;
-
 
2109
      }
-
 
2110
 
-
 
2111
      public short getThriftFieldId() {
-
 
2112
        return _thriftId;
-
 
2113
      }
-
 
2114
 
-
 
2115
      public String getFieldName() {
-
 
2116
        return _fieldName;
-
 
2117
      }
-
 
2118
    }
-
 
2119
 
-
 
2120
    // isset id assignments
-
 
2121
 
-
 
2122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
2123
    static {
-
 
2124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2125
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2126
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
-
 
2127
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2128
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
2129
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
2130
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_result.class, metaDataMap);
-
 
2131
    }
-
 
2132
 
-
 
2133
    public createSerializedInventoryItem_result() {
-
 
2134
    }
-
 
2135
 
-
 
2136
    public createSerializedInventoryItem_result(
-
 
2137
      InventoryItem success,
-
 
2138
      WarehouseServiceException wex)
-
 
2139
    {
-
 
2140
      this();
-
 
2141
      this.success = success;
-
 
2142
      this.wex = wex;
-
 
2143
    }
-
 
2144
 
-
 
2145
    /**
-
 
2146
     * Performs a deep copy on <i>other</i>.
-
 
2147
     */
-
 
2148
    public createSerializedInventoryItem_result(createSerializedInventoryItem_result other) {
-
 
2149
      if (other.isSetSuccess()) {
-
 
2150
        this.success = new InventoryItem(other.success);
-
 
2151
      }
-
 
2152
      if (other.isSetWex()) {
-
 
2153
        this.wex = new WarehouseServiceException(other.wex);
-
 
2154
      }
-
 
2155
    }
-
 
2156
 
-
 
2157
    public createSerializedInventoryItem_result deepCopy() {
-
 
2158
      return new createSerializedInventoryItem_result(this);
-
 
2159
    }
-
 
2160
 
-
 
2161
    @Override
-
 
2162
    public void clear() {
-
 
2163
      this.success = null;
-
 
2164
      this.wex = null;
-
 
2165
    }
-
 
2166
 
-
 
2167
    public InventoryItem getSuccess() {
-
 
2168
      return this.success;
-
 
2169
    }
-
 
2170
 
-
 
2171
    public void setSuccess(InventoryItem success) {
-
 
2172
      this.success = success;
-
 
2173
    }
-
 
2174
 
-
 
2175
    public void unsetSuccess() {
-
 
2176
      this.success = null;
-
 
2177
    }
-
 
2178
 
-
 
2179
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
2180
    public boolean isSetSuccess() {
-
 
2181
      return this.success != null;
-
 
2182
    }
-
 
2183
 
-
 
2184
    public void setSuccessIsSet(boolean value) {
-
 
2185
      if (!value) {
-
 
2186
        this.success = null;
-
 
2187
      }
-
 
2188
    }
-
 
2189
 
-
 
2190
    public WarehouseServiceException getWex() {
-
 
2191
      return this.wex;
-
 
2192
    }
-
 
2193
 
-
 
2194
    public void setWex(WarehouseServiceException wex) {
-
 
2195
      this.wex = wex;
-
 
2196
    }
-
 
2197
 
-
 
2198
    public void unsetWex() {
-
 
2199
      this.wex = null;
-
 
2200
    }
-
 
2201
 
-
 
2202
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
-
 
2203
    public boolean isSetWex() {
-
 
2204
      return this.wex != null;
-
 
2205
    }
-
 
2206
 
-
 
2207
    public void setWexIsSet(boolean value) {
-
 
2208
      if (!value) {
-
 
2209
        this.wex = null;
-
 
2210
      }
-
 
2211
    }
-
 
2212
 
-
 
2213
    public void setFieldValue(_Fields field, Object value) {
-
 
2214
      switch (field) {
-
 
2215
      case SUCCESS:
-
 
2216
        if (value == null) {
-
 
2217
          unsetSuccess();
-
 
2218
        } else {
-
 
2219
          setSuccess((InventoryItem)value);
-
 
2220
        }
-
 
2221
        break;
-
 
2222
 
-
 
2223
      case WEX:
-
 
2224
        if (value == null) {
-
 
2225
          unsetWex();
-
 
2226
        } else {
-
 
2227
          setWex((WarehouseServiceException)value);
-
 
2228
        }
-
 
2229
        break;
-
 
2230
 
-
 
2231
      }
-
 
2232
    }
-
 
2233
 
-
 
2234
    public Object getFieldValue(_Fields field) {
-
 
2235
      switch (field) {
-
 
2236
      case SUCCESS:
-
 
2237
        return getSuccess();
-
 
2238
 
-
 
2239
      case WEX:
-
 
2240
        return getWex();
-
 
2241
 
-
 
2242
      }
-
 
2243
      throw new IllegalStateException();
-
 
2244
    }
-
 
2245
 
-
 
2246
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
2247
    public boolean isSet(_Fields field) {
-
 
2248
      if (field == null) {
-
 
2249
        throw new IllegalArgumentException();
-
 
2250
      }
-
 
2251
 
-
 
2252
      switch (field) {
-
 
2253
      case SUCCESS:
-
 
2254
        return isSetSuccess();
-
 
2255
      case WEX:
-
 
2256
        return isSetWex();
-
 
2257
      }
-
 
2258
      throw new IllegalStateException();
-
 
2259
    }
-
 
2260
 
-
 
2261
    @Override
-
 
2262
    public boolean equals(Object that) {
-
 
2263
      if (that == null)
-
 
2264
        return false;
-
 
2265
      if (that instanceof createSerializedInventoryItem_result)
-
 
2266
        return this.equals((createSerializedInventoryItem_result)that);
-
 
2267
      return false;
-
 
2268
    }
-
 
2269
 
-
 
2270
    public boolean equals(createSerializedInventoryItem_result that) {
-
 
2271
      if (that == null)
-
 
2272
        return false;
-
 
2273
 
-
 
2274
      boolean this_present_success = true && this.isSetSuccess();
-
 
2275
      boolean that_present_success = true && that.isSetSuccess();
-
 
2276
      if (this_present_success || that_present_success) {
-
 
2277
        if (!(this_present_success && that_present_success))
-
 
2278
          return false;
-
 
2279
        if (!this.success.equals(that.success))
-
 
2280
          return false;
-
 
2281
      }
-
 
2282
 
-
 
2283
      boolean this_present_wex = true && this.isSetWex();
-
 
2284
      boolean that_present_wex = true && that.isSetWex();
-
 
2285
      if (this_present_wex || that_present_wex) {
-
 
2286
        if (!(this_present_wex && that_present_wex))
-
 
2287
          return false;
-
 
2288
        if (!this.wex.equals(that.wex))
-
 
2289
          return false;
-
 
2290
      }
-
 
2291
 
-
 
2292
      return true;
-
 
2293
    }
-
 
2294
 
-
 
2295
    @Override
-
 
2296
    public int hashCode() {
-
 
2297
      return 0;
-
 
2298
    }
-
 
2299
 
-
 
2300
    public int compareTo(createSerializedInventoryItem_result other) {
-
 
2301
      if (!getClass().equals(other.getClass())) {
-
 
2302
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2303
      }
-
 
2304
 
-
 
2305
      int lastComparison = 0;
-
 
2306
      createSerializedInventoryItem_result typedOther = (createSerializedInventoryItem_result)other;
-
 
2307
 
-
 
2308
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
2309
      if (lastComparison != 0) {
-
 
2310
        return lastComparison;
-
 
2311
      }
-
 
2312
      if (isSetSuccess()) {
-
 
2313
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
2314
        if (lastComparison != 0) {
-
 
2315
          return lastComparison;
-
 
2316
        }
-
 
2317
      }
-
 
2318
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
-
 
2319
      if (lastComparison != 0) {
-
 
2320
        return lastComparison;
-
 
2321
      }
-
 
2322
      if (isSetWex()) {
-
 
2323
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
-
 
2324
        if (lastComparison != 0) {
-
 
2325
          return lastComparison;
-
 
2326
        }
-
 
2327
      }
-
 
2328
      return 0;
-
 
2329
    }
-
 
2330
 
-
 
2331
    public _Fields fieldForId(int fieldId) {
-
 
2332
      return _Fields.findByThriftId(fieldId);
-
 
2333
    }
-
 
2334
 
-
 
2335
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
2336
      org.apache.thrift.protocol.TField field;
-
 
2337
      iprot.readStructBegin();
-
 
2338
      while (true)
-
 
2339
      {
-
 
2340
        field = iprot.readFieldBegin();
-
 
2341
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
2342
          break;
-
 
2343
        }
-
 
2344
        switch (field.id) {
-
 
2345
          case 0: // SUCCESS
-
 
2346
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
2347
              this.success = new InventoryItem();
-
 
2348
              this.success.read(iprot);
-
 
2349
            } else { 
-
 
2350
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2351
            }
-
 
2352
            break;
-
 
2353
          case 1: // WEX
-
 
2354
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
2355
              this.wex = new WarehouseServiceException();
-
 
2356
              this.wex.read(iprot);
-
 
2357
            } else { 
-
 
2358
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2359
            }
-
 
2360
            break;
-
 
2361
          default:
-
 
2362
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2363
        }
-
 
2364
        iprot.readFieldEnd();
-
 
2365
      }
-
 
2366
      iprot.readStructEnd();
-
 
2367
      validate();
-
 
2368
    }
-
 
2369
 
-
 
2370
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
2371
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2372
 
-
 
2373
      if (this.isSetSuccess()) {
-
 
2374
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
2375
        this.success.write(oprot);
-
 
2376
        oprot.writeFieldEnd();
-
 
2377
      } else if (this.isSetWex()) {
-
 
2378
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
2379
        this.wex.write(oprot);
-
 
2380
        oprot.writeFieldEnd();
-
 
2381
      }
-
 
2382
      oprot.writeFieldStop();
-
 
2383
      oprot.writeStructEnd();
-
 
2384
    }
-
 
2385
 
-
 
2386
    @Override
-
 
2387
    public String toString() {
-
 
2388
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_result(");
-
 
2389
      boolean first = true;
-
 
2390
 
-
 
2391
      sb.append("success:");
-
 
2392
      if (this.success == null) {
-
 
2393
        sb.append("null");
-
 
2394
      } else {
-
 
2395
        sb.append(this.success);
-
 
2396
      }
-
 
2397
      first = false;
-
 
2398
      if (!first) sb.append(", ");
-
 
2399
      sb.append("wex:");
-
 
2400
      if (this.wex == null) {
-
 
2401
        sb.append("null");
-
 
2402
      } else {
-
 
2403
        sb.append(this.wex);
-
 
2404
      }
-
 
2405
      first = false;
-
 
2406
      sb.append(")");
-
 
2407
      return sb.toString();
-
 
2408
    }
-
 
2409
 
-
 
2410
    public void validate() throws org.apache.thrift.TException {
-
 
2411
      // check for required fields
-
 
2412
    }
-
 
2413
 
-
 
2414
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2415
      try {
-
 
2416
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2417
      } catch (org.apache.thrift.TException te) {
-
 
2418
        throw new java.io.IOException(te);
-
 
2419
      }
-
 
2420
    }
-
 
2421
 
-
 
2422
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2423
      try {
-
 
2424
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2425
      } catch (org.apache.thrift.TException te) {
-
 
2426
        throw new java.io.IOException(te);
-
 
2427
      }
-
 
2428
    }
-
 
2429
 
-
 
2430
  }
-
 
2431
 
-
 
2432
  public static class createSerializedInventoryItemFromItemNumber_args implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_args, createSerializedInventoryItemFromItemNumber_args._Fields>, java.io.Serializable, Cloneable   {
-
 
2433
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_args");
-
 
2434
 
-
 
2435
    private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
-
 
2436
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
-
 
2437
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
2438
 
-
 
2439
    private String itemNumber; // required
-
 
2440
    private String serialNumber; // required
-
 
2441
    private long purchaseId; // required
-
 
2442
 
-
 
2443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2444
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
2445
      ITEM_NUMBER((short)1, "itemNumber"),
-
 
2446
      SERIAL_NUMBER((short)2, "serialNumber"),
-
 
2447
      PURCHASE_ID((short)3, "purchaseId");
-
 
2448
 
-
 
2449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2450
 
-
 
2451
      static {
-
 
2452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2453
          byName.put(field.getFieldName(), field);
-
 
2454
        }
-
 
2455
      }
-
 
2456
 
-
 
2457
      /**
-
 
2458
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2459
       */
-
 
2460
      public static _Fields findByThriftId(int fieldId) {
-
 
2461
        switch(fieldId) {
-
 
2462
          case 1: // ITEM_NUMBER
-
 
2463
            return ITEM_NUMBER;
-
 
2464
          case 2: // SERIAL_NUMBER
-
 
2465
            return SERIAL_NUMBER;
-
 
2466
          case 3: // PURCHASE_ID
-
 
2467
            return PURCHASE_ID;
-
 
2468
          default:
-
 
2469
            return null;
-
 
2470
        }
-
 
2471
      }
-
 
2472
 
-
 
2473
      /**
-
 
2474
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2475
       * if it is not found.
-
 
2476
       */
-
 
2477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2478
        _Fields fields = findByThriftId(fieldId);
-
 
2479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2480
        return fields;
-
 
2481
      }
-
 
2482
 
-
 
2483
      /**
-
 
2484
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2485
       */
-
 
2486
      public static _Fields findByName(String name) {
-
 
2487
        return byName.get(name);
-
 
2488
      }
-
 
2489
 
-
 
2490
      private final short _thriftId;
-
 
2491
      private final String _fieldName;
-
 
2492
 
-
 
2493
      _Fields(short thriftId, String fieldName) {
-
 
2494
        _thriftId = thriftId;
-
 
2495
        _fieldName = fieldName;
-
 
2496
      }
-
 
2497
 
-
 
2498
      public short getThriftFieldId() {
-
 
2499
        return _thriftId;
-
 
2500
      }
-
 
2501
 
-
 
2502
      public String getFieldName() {
-
 
2503
        return _fieldName;
-
 
2504
      }
-
 
2505
    }
-
 
2506
 
-
 
2507
    // isset id assignments
-
 
2508
    private static final int __PURCHASEID_ISSET_ID = 0;
-
 
2509
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
2510
 
-
 
2511
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
2512
    static {
-
 
2513
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2514
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2515
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
2516
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2517
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
2518
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2519
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
2520
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
2521
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_args.class, metaDataMap);
-
 
2522
    }
-
 
2523
 
-
 
2524
    public createSerializedInventoryItemFromItemNumber_args() {
-
 
2525
    }
-
 
2526
 
-
 
2527
    public createSerializedInventoryItemFromItemNumber_args(
-
 
2528
      String itemNumber,
-
 
2529
      String serialNumber,
-
 
2530
      long purchaseId)
-
 
2531
    {
-
 
2532
      this();
-
 
2533
      this.itemNumber = itemNumber;
-
 
2534
      this.serialNumber = serialNumber;
-
 
2535
      this.purchaseId = purchaseId;
-
 
2536
      setPurchaseIdIsSet(true);
-
 
2537
    }
-
 
2538
 
-
 
2539
    /**
-
 
2540
     * Performs a deep copy on <i>other</i>.
-
 
2541
     */
-
 
2542
    public createSerializedInventoryItemFromItemNumber_args(createSerializedInventoryItemFromItemNumber_args other) {
-
 
2543
      __isset_bit_vector.clear();
-
 
2544
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
2545
      if (other.isSetItemNumber()) {
-
 
2546
        this.itemNumber = other.itemNumber;
-
 
2547
      }
-
 
2548
      if (other.isSetSerialNumber()) {
-
 
2549
        this.serialNumber = other.serialNumber;
-
 
2550
      }
-
 
2551
      this.purchaseId = other.purchaseId;
-
 
2552
    }
-
 
2553
 
-
 
2554
    public createSerializedInventoryItemFromItemNumber_args deepCopy() {
-
 
2555
      return new createSerializedInventoryItemFromItemNumber_args(this);
-
 
2556
    }
-
 
2557
 
-
 
2558
    @Override
-
 
2559
    public void clear() {
-
 
2560
      this.itemNumber = null;
-
 
2561
      this.serialNumber = null;
-
 
2562
      setPurchaseIdIsSet(false);
-
 
2563
      this.purchaseId = 0;
-
 
2564
    }
-
 
2565
 
-
 
2566
    public String getItemNumber() {
-
 
2567
      return this.itemNumber;
-
 
2568
    }
-
 
2569
 
-
 
2570
    public void setItemNumber(String itemNumber) {
-
 
2571
      this.itemNumber = itemNumber;
-
 
2572
    }
-
 
2573
 
-
 
2574
    public void unsetItemNumber() {
-
 
2575
      this.itemNumber = null;
-
 
2576
    }
-
 
2577
 
-
 
2578
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
-
 
2579
    public boolean isSetItemNumber() {
-
 
2580
      return this.itemNumber != null;
-
 
2581
    }
-
 
2582
 
-
 
2583
    public void setItemNumberIsSet(boolean value) {
-
 
2584
      if (!value) {
-
 
2585
        this.itemNumber = null;
-
 
2586
      }
-
 
2587
    }
-
 
2588
 
-
 
2589
    public String getSerialNumber() {
-
 
2590
      return this.serialNumber;
-
 
2591
    }
-
 
2592
 
-
 
2593
    public void setSerialNumber(String serialNumber) {
-
 
2594
      this.serialNumber = serialNumber;
-
 
2595
    }
-
 
2596
 
-
 
2597
    public void unsetSerialNumber() {
-
 
2598
      this.serialNumber = null;
-
 
2599
    }
-
 
2600
 
-
 
2601
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
-
 
2602
    public boolean isSetSerialNumber() {
-
 
2603
      return this.serialNumber != null;
-
 
2604
    }
-
 
2605
 
-
 
2606
    public void setSerialNumberIsSet(boolean value) {
-
 
2607
      if (!value) {
-
 
2608
        this.serialNumber = null;
-
 
2609
      }
-
 
2610
    }
-
 
2611
 
-
 
2612
    public long getPurchaseId() {
-
 
2613
      return this.purchaseId;
-
 
2614
    }
-
 
2615
 
-
 
2616
    public void setPurchaseId(long purchaseId) {
-
 
2617
      this.purchaseId = purchaseId;
-
 
2618
      setPurchaseIdIsSet(true);
-
 
2619
    }
-
 
2620
 
-
 
2621
    public void unsetPurchaseId() {
-
 
2622
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
-
 
2623
    }
-
 
2624
 
-
 
2625
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
-
 
2626
    public boolean isSetPurchaseId() {
-
 
2627
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
-
 
2628
    }
-
 
2629
 
-
 
2630
    public void setPurchaseIdIsSet(boolean value) {
-
 
2631
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
-
 
2632
    }
-
 
2633
 
-
 
2634
    public void setFieldValue(_Fields field, Object value) {
-
 
2635
      switch (field) {
-
 
2636
      case ITEM_NUMBER:
-
 
2637
        if (value == null) {
-
 
2638
          unsetItemNumber();
-
 
2639
        } else {
-
 
2640
          setItemNumber((String)value);
-
 
2641
        }
-
 
2642
        break;
-
 
2643
 
-
 
2644
      case SERIAL_NUMBER:
-
 
2645
        if (value == null) {
-
 
2646
          unsetSerialNumber();
-
 
2647
        } else {
-
 
2648
          setSerialNumber((String)value);
-
 
2649
        }
-
 
2650
        break;
-
 
2651
 
-
 
2652
      case PURCHASE_ID:
-
 
2653
        if (value == null) {
-
 
2654
          unsetPurchaseId();
-
 
2655
        } else {
-
 
2656
          setPurchaseId((Long)value);
-
 
2657
        }
-
 
2658
        break;
-
 
2659
 
-
 
2660
      }
-
 
2661
    }
-
 
2662
 
-
 
2663
    public Object getFieldValue(_Fields field) {
-
 
2664
      switch (field) {
-
 
2665
      case ITEM_NUMBER:
-
 
2666
        return getItemNumber();
-
 
2667
 
-
 
2668
      case SERIAL_NUMBER:
-
 
2669
        return getSerialNumber();
-
 
2670
 
-
 
2671
      case PURCHASE_ID:
-
 
2672
        return Long.valueOf(getPurchaseId());
-
 
2673
 
-
 
2674
      }
-
 
2675
      throw new IllegalStateException();
-
 
2676
    }
-
 
2677
 
-
 
2678
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
2679
    public boolean isSet(_Fields field) {
-
 
2680
      if (field == null) {
-
 
2681
        throw new IllegalArgumentException();
-
 
2682
      }
-
 
2683
 
-
 
2684
      switch (field) {
-
 
2685
      case ITEM_NUMBER:
-
 
2686
        return isSetItemNumber();
-
 
2687
      case SERIAL_NUMBER:
-
 
2688
        return isSetSerialNumber();
-
 
2689
      case PURCHASE_ID:
-
 
2690
        return isSetPurchaseId();
-
 
2691
      }
-
 
2692
      throw new IllegalStateException();
-
 
2693
    }
-
 
2694
 
-
 
2695
    @Override
-
 
2696
    public boolean equals(Object that) {
-
 
2697
      if (that == null)
-
 
2698
        return false;
-
 
2699
      if (that instanceof createSerializedInventoryItemFromItemNumber_args)
-
 
2700
        return this.equals((createSerializedInventoryItemFromItemNumber_args)that);
-
 
2701
      return false;
-
 
2702
    }
-
 
2703
 
-
 
2704
    public boolean equals(createSerializedInventoryItemFromItemNumber_args that) {
-
 
2705
      if (that == null)
-
 
2706
        return false;
-
 
2707
 
-
 
2708
      boolean this_present_itemNumber = true && this.isSetItemNumber();
-
 
2709
      boolean that_present_itemNumber = true && that.isSetItemNumber();
-
 
2710
      if (this_present_itemNumber || that_present_itemNumber) {
-
 
2711
        if (!(this_present_itemNumber && that_present_itemNumber))
-
 
2712
          return false;
-
 
2713
        if (!this.itemNumber.equals(that.itemNumber))
-
 
2714
          return false;
-
 
2715
      }
-
 
2716
 
-
 
2717
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
-
 
2718
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
-
 
2719
      if (this_present_serialNumber || that_present_serialNumber) {
-
 
2720
        if (!(this_present_serialNumber && that_present_serialNumber))
-
 
2721
          return false;
-
 
2722
        if (!this.serialNumber.equals(that.serialNumber))
-
 
2723
          return false;
-
 
2724
      }
-
 
2725
 
-
 
2726
      boolean this_present_purchaseId = true;
-
 
2727
      boolean that_present_purchaseId = true;
-
 
2728
      if (this_present_purchaseId || that_present_purchaseId) {
-
 
2729
        if (!(this_present_purchaseId && that_present_purchaseId))
-
 
2730
          return false;
-
 
2731
        if (this.purchaseId != that.purchaseId)
-
 
2732
          return false;
-
 
2733
      }
-
 
2734
 
-
 
2735
      return true;
-
 
2736
    }
-
 
2737
 
-
 
2738
    @Override
-
 
2739
    public int hashCode() {
-
 
2740
      return 0;
-
 
2741
    }
-
 
2742
 
-
 
2743
    public int compareTo(createSerializedInventoryItemFromItemNumber_args other) {
-
 
2744
      if (!getClass().equals(other.getClass())) {
-
 
2745
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2746
      }
-
 
2747
 
-
 
2748
      int lastComparison = 0;
-
 
2749
      createSerializedInventoryItemFromItemNumber_args typedOther = (createSerializedInventoryItemFromItemNumber_args)other;
-
 
2750
 
-
 
2751
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
-
 
2752
      if (lastComparison != 0) {
-
 
2753
        return lastComparison;
-
 
2754
      }
-
 
2755
      if (isSetItemNumber()) {
-
 
2756
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
-
 
2757
        if (lastComparison != 0) {
-
 
2758
          return lastComparison;
-
 
2759
        }
-
 
2760
      }
-
 
2761
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
-
 
2762
      if (lastComparison != 0) {
-
 
2763
        return lastComparison;
-
 
2764
      }
-
 
2765
      if (isSetSerialNumber()) {
-
 
2766
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
-
 
2767
        if (lastComparison != 0) {
-
 
2768
          return lastComparison;
-
 
2769
        }
-
 
2770
      }
-
 
2771
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
-
 
2772
      if (lastComparison != 0) {
-
 
2773
        return lastComparison;
-
 
2774
      }
-
 
2775
      if (isSetPurchaseId()) {
-
 
2776
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
-
 
2777
        if (lastComparison != 0) {
-
 
2778
          return lastComparison;
-
 
2779
        }
-
 
2780
      }
-
 
2781
      return 0;
-
 
2782
    }
-
 
2783
 
-
 
2784
    public _Fields fieldForId(int fieldId) {
-
 
2785
      return _Fields.findByThriftId(fieldId);
-
 
2786
    }
-
 
2787
 
-
 
2788
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
2789
      org.apache.thrift.protocol.TField field;
-
 
2790
      iprot.readStructBegin();
-
 
2791
      while (true)
-
 
2792
      {
-
 
2793
        field = iprot.readFieldBegin();
-
 
2794
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
2795
          break;
-
 
2796
        }
-
 
2797
        switch (field.id) {
-
 
2798
          case 1: // ITEM_NUMBER
-
 
2799
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
2800
              this.itemNumber = iprot.readString();
-
 
2801
            } else { 
-
 
2802
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2803
            }
-
 
2804
            break;
-
 
2805
          case 2: // SERIAL_NUMBER
-
 
2806
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
2807
              this.serialNumber = iprot.readString();
-
 
2808
            } else { 
-
 
2809
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2810
            }
-
 
2811
            break;
-
 
2812
          case 3: // PURCHASE_ID
-
 
2813
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
2814
              this.purchaseId = iprot.readI64();
-
 
2815
              setPurchaseIdIsSet(true);
-
 
2816
            } else { 
-
 
2817
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2818
            }
-
 
2819
            break;
-
 
2820
          default:
-
 
2821
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
2822
        }
-
 
2823
        iprot.readFieldEnd();
-
 
2824
      }
-
 
2825
      iprot.readStructEnd();
-
 
2826
      validate();
-
 
2827
    }
-
 
2828
 
-
 
2829
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
2830
      validate();
-
 
2831
 
-
 
2832
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2833
      if (this.itemNumber != null) {
-
 
2834
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
-
 
2835
        oprot.writeString(this.itemNumber);
-
 
2836
        oprot.writeFieldEnd();
-
 
2837
      }
-
 
2838
      if (this.serialNumber != null) {
-
 
2839
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
-
 
2840
        oprot.writeString(this.serialNumber);
-
 
2841
        oprot.writeFieldEnd();
-
 
2842
      }
-
 
2843
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
-
 
2844
      oprot.writeI64(this.purchaseId);
-
 
2845
      oprot.writeFieldEnd();
-
 
2846
      oprot.writeFieldStop();
-
 
2847
      oprot.writeStructEnd();
-
 
2848
    }
-
 
2849
 
-
 
2850
    @Override
-
 
2851
    public String toString() {
-
 
2852
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_args(");
-
 
2853
      boolean first = true;
-
 
2854
 
-
 
2855
      sb.append("itemNumber:");
-
 
2856
      if (this.itemNumber == null) {
-
 
2857
        sb.append("null");
-
 
2858
      } else {
-
 
2859
        sb.append(this.itemNumber);
-
 
2860
      }
-
 
2861
      first = false;
-
 
2862
      if (!first) sb.append(", ");
-
 
2863
      sb.append("serialNumber:");
-
 
2864
      if (this.serialNumber == null) {
-
 
2865
        sb.append("null");
-
 
2866
      } else {
-
 
2867
        sb.append(this.serialNumber);
-
 
2868
      }
-
 
2869
      first = false;
-
 
2870
      if (!first) sb.append(", ");
-
 
2871
      sb.append("purchaseId:");
-
 
2872
      sb.append(this.purchaseId);
-
 
2873
      first = false;
-
 
2874
      sb.append(")");
-
 
2875
      return sb.toString();
-
 
2876
    }
-
 
2877
 
-
 
2878
    public void validate() throws org.apache.thrift.TException {
-
 
2879
      // check for required fields
-
 
2880
    }
-
 
2881
 
-
 
2882
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
2883
      try {
-
 
2884
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
2885
      } catch (org.apache.thrift.TException te) {
-
 
2886
        throw new java.io.IOException(te);
-
 
2887
      }
-
 
2888
    }
-
 
2889
 
-
 
2890
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
2891
      try {
-
 
2892
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
2893
        __isset_bit_vector = new BitSet(1);
-
 
2894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
2895
      } catch (org.apache.thrift.TException te) {
-
 
2896
        throw new java.io.IOException(te);
-
 
2897
      }
-
 
2898
    }
-
 
2899
 
-
 
2900
  }
-
 
2901
 
-
 
2902
  public static class createSerializedInventoryItemFromItemNumber_result implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_result, createSerializedInventoryItemFromItemNumber_result._Fields>, java.io.Serializable, Cloneable   {
-
 
2903
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_result");
-
 
2904
 
-
 
2905
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
2906
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
2907
 
-
 
2908
    private InventoryItem success; // required
-
 
2909
    private WarehouseServiceException wex; // required
-
 
2910
 
-
 
2911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2912
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
2913
      SUCCESS((short)0, "success"),
-
 
2914
      WEX((short)1, "wex");
-
 
2915
 
-
 
2916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2917
 
-
 
2918
      static {
-
 
2919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2920
          byName.put(field.getFieldName(), field);
-
 
2921
        }
-
 
2922
      }
-
 
2923
 
-
 
2924
      /**
-
 
2925
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2926
       */
-
 
2927
      public static _Fields findByThriftId(int fieldId) {
-
 
2928
        switch(fieldId) {
-
 
2929
          case 0: // SUCCESS
-
 
2930
            return SUCCESS;
-
 
2931
          case 1: // WEX
-
 
2932
            return WEX;
-
 
2933
          default:
-
 
2934
            return null;
-
 
2935
        }
-
 
2936
      }
-
 
2937
 
-
 
2938
      /**
-
 
2939
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2940
       * if it is not found.
-
 
2941
       */
-
 
2942
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2943
        _Fields fields = findByThriftId(fieldId);
-
 
2944
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2945
        return fields;
-
 
2946
      }
-
 
2947
 
-
 
2948
      /**
-
 
2949
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2950
       */
-
 
2951
      public static _Fields findByName(String name) {
-
 
2952
        return byName.get(name);
-
 
2953
      }
-
 
2954
 
-
 
2955
      private final short _thriftId;
-
 
2956
      private final String _fieldName;
-
 
2957
 
-
 
2958
      _Fields(short thriftId, String fieldName) {
-
 
2959
        _thriftId = thriftId;
-
 
2960
        _fieldName = fieldName;
-
 
2961
      }
-
 
2962
 
-
 
2963
      public short getThriftFieldId() {
-
 
2964
        return _thriftId;
-
 
2965
      }
-
 
2966
 
-
 
2967
      public String getFieldName() {
-
 
2968
        return _fieldName;
-
 
2969
      }
-
 
2970
    }
-
 
2971
 
-
 
2972
    // isset id assignments
-
 
2973
 
-
 
2974
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
2975
    static {
-
 
2976
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
2977
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2978
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
-
 
2979
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
2980
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
2981
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
2982
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_result.class, metaDataMap);
-
 
2983
    }
-
 
2984
 
-
 
2985
    public createSerializedInventoryItemFromItemNumber_result() {
-
 
2986
    }
-
 
2987
 
-
 
2988
    public createSerializedInventoryItemFromItemNumber_result(
-
 
2989
      InventoryItem success,
-
 
2990
      WarehouseServiceException wex)
-
 
2991
    {
-
 
2992
      this();
-
 
2993
      this.success = success;
-
 
2994
      this.wex = wex;
-
 
2995
    }
-
 
2996
 
-
 
2997
    /**
-
 
2998
     * Performs a deep copy on <i>other</i>.
-
 
2999
     */
-
 
3000
    public createSerializedInventoryItemFromItemNumber_result(createSerializedInventoryItemFromItemNumber_result other) {
-
 
3001
      if (other.isSetSuccess()) {
-
 
3002
        this.success = new InventoryItem(other.success);
-
 
3003
      }
-
 
3004
      if (other.isSetWex()) {
-
 
3005
        this.wex = new WarehouseServiceException(other.wex);
-
 
3006
      }
-
 
3007
    }
-
 
3008
 
-
 
3009
    public createSerializedInventoryItemFromItemNumber_result deepCopy() {
-
 
3010
      return new createSerializedInventoryItemFromItemNumber_result(this);
-
 
3011
    }
-
 
3012
 
-
 
3013
    @Override
-
 
3014
    public void clear() {
-
 
3015
      this.success = null;
-
 
3016
      this.wex = null;
-
 
3017
    }
-
 
3018
 
-
 
3019
    public InventoryItem getSuccess() {
-
 
3020
      return this.success;
-
 
3021
    }
-
 
3022
 
-
 
3023
    public void setSuccess(InventoryItem success) {
-
 
3024
      this.success = success;
-
 
3025
    }
-
 
3026
 
-
 
3027
    public void unsetSuccess() {
-
 
3028
      this.success = null;
-
 
3029
    }
-
 
3030
 
-
 
3031
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
3032
    public boolean isSetSuccess() {
-
 
3033
      return this.success != null;
-
 
3034
    }
-
 
3035
 
-
 
3036
    public void setSuccessIsSet(boolean value) {
-
 
3037
      if (!value) {
-
 
3038
        this.success = null;
-
 
3039
      }
-
 
3040
    }
-
 
3041
 
-
 
3042
    public WarehouseServiceException getWex() {
-
 
3043
      return this.wex;
-
 
3044
    }
-
 
3045
 
-
 
3046
    public void setWex(WarehouseServiceException wex) {
-
 
3047
      this.wex = wex;
-
 
3048
    }
-
 
3049
 
-
 
3050
    public void unsetWex() {
-
 
3051
      this.wex = null;
-
 
3052
    }
-
 
3053
 
-
 
3054
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
-
 
3055
    public boolean isSetWex() {
-
 
3056
      return this.wex != null;
-
 
3057
    }
-
 
3058
 
-
 
3059
    public void setWexIsSet(boolean value) {
-
 
3060
      if (!value) {
-
 
3061
        this.wex = null;
-
 
3062
      }
-
 
3063
    }
-
 
3064
 
-
 
3065
    public void setFieldValue(_Fields field, Object value) {
-
 
3066
      switch (field) {
-
 
3067
      case SUCCESS:
-
 
3068
        if (value == null) {
-
 
3069
          unsetSuccess();
-
 
3070
        } else {
-
 
3071
          setSuccess((InventoryItem)value);
-
 
3072
        }
-
 
3073
        break;
-
 
3074
 
-
 
3075
      case WEX:
-
 
3076
        if (value == null) {
-
 
3077
          unsetWex();
-
 
3078
        } else {
-
 
3079
          setWex((WarehouseServiceException)value);
-
 
3080
        }
-
 
3081
        break;
-
 
3082
 
-
 
3083
      }
-
 
3084
    }
-
 
3085
 
-
 
3086
    public Object getFieldValue(_Fields field) {
-
 
3087
      switch (field) {
-
 
3088
      case SUCCESS:
-
 
3089
        return getSuccess();
-
 
3090
 
-
 
3091
      case WEX:
-
 
3092
        return getWex();
-
 
3093
 
-
 
3094
      }
-
 
3095
      throw new IllegalStateException();
-
 
3096
    }
-
 
3097
 
-
 
3098
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
3099
    public boolean isSet(_Fields field) {
-
 
3100
      if (field == null) {
-
 
3101
        throw new IllegalArgumentException();
-
 
3102
      }
-
 
3103
 
-
 
3104
      switch (field) {
-
 
3105
      case SUCCESS:
-
 
3106
        return isSetSuccess();
-
 
3107
      case WEX:
-
 
3108
        return isSetWex();
-
 
3109
      }
-
 
3110
      throw new IllegalStateException();
-
 
3111
    }
-
 
3112
 
-
 
3113
    @Override
-
 
3114
    public boolean equals(Object that) {
-
 
3115
      if (that == null)
-
 
3116
        return false;
-
 
3117
      if (that instanceof createSerializedInventoryItemFromItemNumber_result)
-
 
3118
        return this.equals((createSerializedInventoryItemFromItemNumber_result)that);
-
 
3119
      return false;
-
 
3120
    }
-
 
3121
 
-
 
3122
    public boolean equals(createSerializedInventoryItemFromItemNumber_result that) {
-
 
3123
      if (that == null)
-
 
3124
        return false;
-
 
3125
 
-
 
3126
      boolean this_present_success = true && this.isSetSuccess();
-
 
3127
      boolean that_present_success = true && that.isSetSuccess();
-
 
3128
      if (this_present_success || that_present_success) {
-
 
3129
        if (!(this_present_success && that_present_success))
-
 
3130
          return false;
-
 
3131
        if (!this.success.equals(that.success))
-
 
3132
          return false;
-
 
3133
      }
-
 
3134
 
-
 
3135
      boolean this_present_wex = true && this.isSetWex();
-
 
3136
      boolean that_present_wex = true && that.isSetWex();
-
 
3137
      if (this_present_wex || that_present_wex) {
-
 
3138
        if (!(this_present_wex && that_present_wex))
-
 
3139
          return false;
-
 
3140
        if (!this.wex.equals(that.wex))
-
 
3141
          return false;
-
 
3142
      }
-
 
3143
 
-
 
3144
      return true;
-
 
3145
    }
-
 
3146
 
-
 
3147
    @Override
-
 
3148
    public int hashCode() {
-
 
3149
      return 0;
-
 
3150
    }
-
 
3151
 
-
 
3152
    public int compareTo(createSerializedInventoryItemFromItemNumber_result other) {
-
 
3153
      if (!getClass().equals(other.getClass())) {
-
 
3154
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3155
      }
-
 
3156
 
-
 
3157
      int lastComparison = 0;
-
 
3158
      createSerializedInventoryItemFromItemNumber_result typedOther = (createSerializedInventoryItemFromItemNumber_result)other;
-
 
3159
 
-
 
3160
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
3161
      if (lastComparison != 0) {
-
 
3162
        return lastComparison;
-
 
3163
      }
-
 
3164
      if (isSetSuccess()) {
-
 
3165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
3166
        if (lastComparison != 0) {
-
 
3167
          return lastComparison;
-
 
3168
        }
-
 
3169
      }
-
 
3170
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
-
 
3171
      if (lastComparison != 0) {
-
 
3172
        return lastComparison;
-
 
3173
      }
-
 
3174
      if (isSetWex()) {
-
 
3175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
-
 
3176
        if (lastComparison != 0) {
-
 
3177
          return lastComparison;
-
 
3178
        }
-
 
3179
      }
-
 
3180
      return 0;
-
 
3181
    }
-
 
3182
 
-
 
3183
    public _Fields fieldForId(int fieldId) {
-
 
3184
      return _Fields.findByThriftId(fieldId);
-
 
3185
    }
-
 
3186
 
-
 
3187
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
3188
      org.apache.thrift.protocol.TField field;
-
 
3189
      iprot.readStructBegin();
-
 
3190
      while (true)
-
 
3191
      {
-
 
3192
        field = iprot.readFieldBegin();
-
 
3193
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
3194
          break;
-
 
3195
        }
-
 
3196
        switch (field.id) {
-
 
3197
          case 0: // SUCCESS
-
 
3198
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
3199
              this.success = new InventoryItem();
-
 
3200
              this.success.read(iprot);
-
 
3201
            } else { 
-
 
3202
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3203
            }
-
 
3204
            break;
-
 
3205
          case 1: // WEX
-
 
3206
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
3207
              this.wex = new WarehouseServiceException();
-
 
3208
              this.wex.read(iprot);
-
 
3209
            } else { 
-
 
3210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3211
            }
-
 
3212
            break;
-
 
3213
          default:
-
 
3214
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3215
        }
-
 
3216
        iprot.readFieldEnd();
-
 
3217
      }
-
 
3218
      iprot.readStructEnd();
-
 
3219
      validate();
-
 
3220
    }
-
 
3221
 
-
 
3222
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
3223
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3224
 
-
 
3225
      if (this.isSetSuccess()) {
-
 
3226
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
3227
        this.success.write(oprot);
-
 
3228
        oprot.writeFieldEnd();
-
 
3229
      } else if (this.isSetWex()) {
-
 
3230
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
3231
        this.wex.write(oprot);
-
 
3232
        oprot.writeFieldEnd();
-
 
3233
      }
-
 
3234
      oprot.writeFieldStop();
-
 
3235
      oprot.writeStructEnd();
-
 
3236
    }
-
 
3237
 
-
 
3238
    @Override
-
 
3239
    public String toString() {
-
 
3240
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_result(");
-
 
3241
      boolean first = true;
-
 
3242
 
-
 
3243
      sb.append("success:");
-
 
3244
      if (this.success == null) {
-
 
3245
        sb.append("null");
-
 
3246
      } else {
-
 
3247
        sb.append(this.success);
-
 
3248
      }
-
 
3249
      first = false;
-
 
3250
      if (!first) sb.append(", ");
-
 
3251
      sb.append("wex:");
-
 
3252
      if (this.wex == null) {
-
 
3253
        sb.append("null");
-
 
3254
      } else {
-
 
3255
        sb.append(this.wex);
-
 
3256
      }
-
 
3257
      first = false;
-
 
3258
      sb.append(")");
-
 
3259
      return sb.toString();
-
 
3260
    }
-
 
3261
 
-
 
3262
    public void validate() throws org.apache.thrift.TException {
-
 
3263
      // check for required fields
-
 
3264
    }
-
 
3265
 
-
 
3266
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3267
      try {
-
 
3268
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3269
      } catch (org.apache.thrift.TException te) {
-
 
3270
        throw new java.io.IOException(te);
-
 
3271
      }
-
 
3272
    }
-
 
3273
 
-
 
3274
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3275
      try {
-
 
3276
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3277
      } catch (org.apache.thrift.TException te) {
-
 
3278
        throw new java.io.IOException(te);
-
 
3279
      }
-
 
3280
    }
-
 
3281
 
-
 
3282
  }
-
 
3283
 
-
 
3284
  public static class createInventoryItem_args implements org.apache.thrift.TBase<createInventoryItem_args, createInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
-
 
3285
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_args");
-
 
3286
 
-
 
3287
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
3288
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
3289
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
3290
 
-
 
3291
    private long itemId; // required
-
 
3292
    private long quantity; // required
-
 
3293
    private long purchaseId; // required
-
 
3294
 
-
 
3295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3296
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
3297
      ITEM_ID((short)1, "itemId"),
-
 
3298
      QUANTITY((short)2, "quantity"),
-
 
3299
      PURCHASE_ID((short)3, "purchaseId");
-
 
3300
 
-
 
3301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3302
 
-
 
3303
      static {
-
 
3304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3305
          byName.put(field.getFieldName(), field);
-
 
3306
        }
-
 
3307
      }
-
 
3308
 
-
 
3309
      /**
-
 
3310
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3311
       */
-
 
3312
      public static _Fields findByThriftId(int fieldId) {
-
 
3313
        switch(fieldId) {
-
 
3314
          case 1: // ITEM_ID
-
 
3315
            return ITEM_ID;
-
 
3316
          case 2: // QUANTITY
-
 
3317
            return QUANTITY;
-
 
3318
          case 3: // PURCHASE_ID
-
 
3319
            return PURCHASE_ID;
-
 
3320
          default:
-
 
3321
            return null;
-
 
3322
        }
-
 
3323
      }
-
 
3324
 
-
 
3325
      /**
-
 
3326
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3327
       * if it is not found.
-
 
3328
       */
-
 
3329
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3330
        _Fields fields = findByThriftId(fieldId);
-
 
3331
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3332
        return fields;
-
 
3333
      }
-
 
3334
 
-
 
3335
      /**
-
 
3336
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3337
       */
-
 
3338
      public static _Fields findByName(String name) {
-
 
3339
        return byName.get(name);
-
 
3340
      }
-
 
3341
 
-
 
3342
      private final short _thriftId;
-
 
3343
      private final String _fieldName;
-
 
3344
 
-
 
3345
      _Fields(short thriftId, String fieldName) {
-
 
3346
        _thriftId = thriftId;
-
 
3347
        _fieldName = fieldName;
-
 
3348
      }
-
 
3349
 
-
 
3350
      public short getThriftFieldId() {
-
 
3351
        return _thriftId;
-
 
3352
      }
-
 
3353
 
-
 
3354
      public String getFieldName() {
-
 
3355
        return _fieldName;
-
 
3356
      }
-
 
3357
    }
-
 
3358
 
-
 
3359
    // isset id assignments
-
 
3360
    private static final int __ITEMID_ISSET_ID = 0;
-
 
3361
    private static final int __QUANTITY_ISSET_ID = 1;
-
 
3362
    private static final int __PURCHASEID_ISSET_ID = 2;
-
 
3363
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
3364
 
-
 
3365
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
3366
    static {
-
 
3367
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3368
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3369
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
3370
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3371
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
3372
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3373
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
3374
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
3375
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_args.class, metaDataMap);
-
 
3376
    }
-
 
3377
 
-
 
3378
    public createInventoryItem_args() {
-
 
3379
    }
-
 
3380
 
-
 
3381
    public createInventoryItem_args(
-
 
3382
      long itemId,
-
 
3383
      long quantity,
-
 
3384
      long purchaseId)
-
 
3385
    {
-
 
3386
      this();
-
 
3387
      this.itemId = itemId;
-
 
3388
      setItemIdIsSet(true);
-
 
3389
      this.quantity = quantity;
-
 
3390
      setQuantityIsSet(true);
-
 
3391
      this.purchaseId = purchaseId;
-
 
3392
      setPurchaseIdIsSet(true);
-
 
3393
    }
-
 
3394
 
-
 
3395
    /**
-
 
3396
     * Performs a deep copy on <i>other</i>.
-
 
3397
     */
-
 
3398
    public createInventoryItem_args(createInventoryItem_args other) {
-
 
3399
      __isset_bit_vector.clear();
-
 
3400
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
3401
      this.itemId = other.itemId;
-
 
3402
      this.quantity = other.quantity;
-
 
3403
      this.purchaseId = other.purchaseId;
-
 
3404
    }
-
 
3405
 
-
 
3406
    public createInventoryItem_args deepCopy() {
-
 
3407
      return new createInventoryItem_args(this);
-
 
3408
    }
-
 
3409
 
-
 
3410
    @Override
-
 
3411
    public void clear() {
-
 
3412
      setItemIdIsSet(false);
-
 
3413
      this.itemId = 0;
-
 
3414
      setQuantityIsSet(false);
-
 
3415
      this.quantity = 0;
-
 
3416
      setPurchaseIdIsSet(false);
-
 
3417
      this.purchaseId = 0;
-
 
3418
    }
-
 
3419
 
-
 
3420
    public long getItemId() {
-
 
3421
      return this.itemId;
-
 
3422
    }
-
 
3423
 
-
 
3424
    public void setItemId(long itemId) {
-
 
3425
      this.itemId = itemId;
-
 
3426
      setItemIdIsSet(true);
-
 
3427
    }
-
 
3428
 
-
 
3429
    public void unsetItemId() {
-
 
3430
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
3431
    }
-
 
3432
 
-
 
3433
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
3434
    public boolean isSetItemId() {
-
 
3435
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
3436
    }
-
 
3437
 
-
 
3438
    public void setItemIdIsSet(boolean value) {
-
 
3439
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
3440
    }
-
 
3441
 
-
 
3442
    public long getQuantity() {
-
 
3443
      return this.quantity;
-
 
3444
    }
-
 
3445
 
-
 
3446
    public void setQuantity(long quantity) {
-
 
3447
      this.quantity = quantity;
-
 
3448
      setQuantityIsSet(true);
-
 
3449
    }
-
 
3450
 
-
 
3451
    public void unsetQuantity() {
-
 
3452
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
-
 
3453
    }
-
 
3454
 
-
 
3455
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
-
 
3456
    public boolean isSetQuantity() {
-
 
3457
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
-
 
3458
    }
-
 
3459
 
-
 
3460
    public void setQuantityIsSet(boolean value) {
-
 
3461
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
-
 
3462
    }
-
 
3463
 
-
 
3464
    public long getPurchaseId() {
-
 
3465
      return this.purchaseId;
-
 
3466
    }
-
 
3467
 
-
 
3468
    public void setPurchaseId(long purchaseId) {
-
 
3469
      this.purchaseId = purchaseId;
-
 
3470
      setPurchaseIdIsSet(true);
-
 
3471
    }
-
 
3472
 
-
 
3473
    public void unsetPurchaseId() {
-
 
3474
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
-
 
3475
    }
-
 
3476
 
-
 
3477
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
-
 
3478
    public boolean isSetPurchaseId() {
-
 
3479
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
-
 
3480
    }
-
 
3481
 
-
 
3482
    public void setPurchaseIdIsSet(boolean value) {
-
 
3483
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
-
 
3484
    }
-
 
3485
 
-
 
3486
    public void setFieldValue(_Fields field, Object value) {
-
 
3487
      switch (field) {
-
 
3488
      case ITEM_ID:
-
 
3489
        if (value == null) {
-
 
3490
          unsetItemId();
-
 
3491
        } else {
-
 
3492
          setItemId((Long)value);
-
 
3493
        }
-
 
3494
        break;
-
 
3495
 
-
 
3496
      case QUANTITY:
-
 
3497
        if (value == null) {
-
 
3498
          unsetQuantity();
-
 
3499
        } else {
-
 
3500
          setQuantity((Long)value);
-
 
3501
        }
-
 
3502
        break;
-
 
3503
 
-
 
3504
      case PURCHASE_ID:
-
 
3505
        if (value == null) {
-
 
3506
          unsetPurchaseId();
-
 
3507
        } else {
-
 
3508
          setPurchaseId((Long)value);
-
 
3509
        }
-
 
3510
        break;
-
 
3511
 
-
 
3512
      }
-
 
3513
    }
-
 
3514
 
-
 
3515
    public Object getFieldValue(_Fields field) {
-
 
3516
      switch (field) {
-
 
3517
      case ITEM_ID:
-
 
3518
        return Long.valueOf(getItemId());
-
 
3519
 
-
 
3520
      case QUANTITY:
-
 
3521
        return Long.valueOf(getQuantity());
-
 
3522
 
-
 
3523
      case PURCHASE_ID:
-
 
3524
        return Long.valueOf(getPurchaseId());
-
 
3525
 
-
 
3526
      }
-
 
3527
      throw new IllegalStateException();
-
 
3528
    }
-
 
3529
 
-
 
3530
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
3531
    public boolean isSet(_Fields field) {
-
 
3532
      if (field == null) {
-
 
3533
        throw new IllegalArgumentException();
-
 
3534
      }
-
 
3535
 
-
 
3536
      switch (field) {
-
 
3537
      case ITEM_ID:
-
 
3538
        return isSetItemId();
-
 
3539
      case QUANTITY:
-
 
3540
        return isSetQuantity();
-
 
3541
      case PURCHASE_ID:
-
 
3542
        return isSetPurchaseId();
-
 
3543
      }
-
 
3544
      throw new IllegalStateException();
-
 
3545
    }
-
 
3546
 
-
 
3547
    @Override
-
 
3548
    public boolean equals(Object that) {
-
 
3549
      if (that == null)
-
 
3550
        return false;
-
 
3551
      if (that instanceof createInventoryItem_args)
-
 
3552
        return this.equals((createInventoryItem_args)that);
-
 
3553
      return false;
-
 
3554
    }
-
 
3555
 
-
 
3556
    public boolean equals(createInventoryItem_args that) {
-
 
3557
      if (that == null)
-
 
3558
        return false;
-
 
3559
 
-
 
3560
      boolean this_present_itemId = true;
-
 
3561
      boolean that_present_itemId = true;
-
 
3562
      if (this_present_itemId || that_present_itemId) {
-
 
3563
        if (!(this_present_itemId && that_present_itemId))
-
 
3564
          return false;
-
 
3565
        if (this.itemId != that.itemId)
-
 
3566
          return false;
-
 
3567
      }
-
 
3568
 
-
 
3569
      boolean this_present_quantity = true;
-
 
3570
      boolean that_present_quantity = true;
-
 
3571
      if (this_present_quantity || that_present_quantity) {
-
 
3572
        if (!(this_present_quantity && that_present_quantity))
-
 
3573
          return false;
-
 
3574
        if (this.quantity != that.quantity)
-
 
3575
          return false;
-
 
3576
      }
-
 
3577
 
-
 
3578
      boolean this_present_purchaseId = true;
-
 
3579
      boolean that_present_purchaseId = true;
-
 
3580
      if (this_present_purchaseId || that_present_purchaseId) {
-
 
3581
        if (!(this_present_purchaseId && that_present_purchaseId))
-
 
3582
          return false;
-
 
3583
        if (this.purchaseId != that.purchaseId)
-
 
3584
          return false;
-
 
3585
      }
-
 
3586
 
-
 
3587
      return true;
-
 
3588
    }
-
 
3589
 
-
 
3590
    @Override
-
 
3591
    public int hashCode() {
-
 
3592
      return 0;
-
 
3593
    }
-
 
3594
 
-
 
3595
    public int compareTo(createInventoryItem_args other) {
-
 
3596
      if (!getClass().equals(other.getClass())) {
-
 
3597
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3598
      }
-
 
3599
 
-
 
3600
      int lastComparison = 0;
-
 
3601
      createInventoryItem_args typedOther = (createInventoryItem_args)other;
-
 
3602
 
-
 
3603
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
3604
      if (lastComparison != 0) {
-
 
3605
        return lastComparison;
-
 
3606
      }
-
 
3607
      if (isSetItemId()) {
-
 
3608
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
3609
        if (lastComparison != 0) {
-
 
3610
          return lastComparison;
-
 
3611
        }
-
 
3612
      }
-
 
3613
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
-
 
3614
      if (lastComparison != 0) {
-
 
3615
        return lastComparison;
-
 
3616
      }
-
 
3617
      if (isSetQuantity()) {
-
 
3618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
-
 
3619
        if (lastComparison != 0) {
-
 
3620
          return lastComparison;
-
 
3621
        }
-
 
3622
      }
-
 
3623
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
-
 
3624
      if (lastComparison != 0) {
-
 
3625
        return lastComparison;
-
 
3626
      }
-
 
3627
      if (isSetPurchaseId()) {
-
 
3628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
-
 
3629
        if (lastComparison != 0) {
-
 
3630
          return lastComparison;
-
 
3631
        }
-
 
3632
      }
-
 
3633
      return 0;
-
 
3634
    }
-
 
3635
 
-
 
3636
    public _Fields fieldForId(int fieldId) {
-
 
3637
      return _Fields.findByThriftId(fieldId);
-
 
3638
    }
-
 
3639
 
-
 
3640
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
3641
      org.apache.thrift.protocol.TField field;
-
 
3642
      iprot.readStructBegin();
-
 
3643
      while (true)
-
 
3644
      {
-
 
3645
        field = iprot.readFieldBegin();
-
 
3646
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
3647
          break;
-
 
3648
        }
-
 
3649
        switch (field.id) {
-
 
3650
          case 1: // ITEM_ID
-
 
3651
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
3652
              this.itemId = iprot.readI64();
-
 
3653
              setItemIdIsSet(true);
-
 
3654
            } else { 
-
 
3655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3656
            }
-
 
3657
            break;
-
 
3658
          case 2: // QUANTITY
-
 
3659
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
3660
              this.quantity = iprot.readI64();
-
 
3661
              setQuantityIsSet(true);
-
 
3662
            } else { 
-
 
3663
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3664
            }
-
 
3665
            break;
-
 
3666
          case 3: // PURCHASE_ID
-
 
3667
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
3668
              this.purchaseId = iprot.readI64();
-
 
3669
              setPurchaseIdIsSet(true);
-
 
3670
            } else { 
-
 
3671
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3672
            }
-
 
3673
            break;
-
 
3674
          default:
-
 
3675
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
3676
        }
-
 
3677
        iprot.readFieldEnd();
-
 
3678
      }
-
 
3679
      iprot.readStructEnd();
-
 
3680
      validate();
-
 
3681
    }
-
 
3682
 
-
 
3683
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
3684
      validate();
-
 
3685
 
-
 
3686
      oprot.writeStructBegin(STRUCT_DESC);
-
 
3687
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
3688
      oprot.writeI64(this.itemId);
-
 
3689
      oprot.writeFieldEnd();
-
 
3690
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
-
 
3691
      oprot.writeI64(this.quantity);
-
 
3692
      oprot.writeFieldEnd();
-
 
3693
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
-
 
3694
      oprot.writeI64(this.purchaseId);
-
 
3695
      oprot.writeFieldEnd();
-
 
3696
      oprot.writeFieldStop();
-
 
3697
      oprot.writeStructEnd();
-
 
3698
    }
-
 
3699
 
-
 
3700
    @Override
-
 
3701
    public String toString() {
-
 
3702
      StringBuilder sb = new StringBuilder("createInventoryItem_args(");
-
 
3703
      boolean first = true;
-
 
3704
 
-
 
3705
      sb.append("itemId:");
-
 
3706
      sb.append(this.itemId);
-
 
3707
      first = false;
-
 
3708
      if (!first) sb.append(", ");
-
 
3709
      sb.append("quantity:");
-
 
3710
      sb.append(this.quantity);
-
 
3711
      first = false;
-
 
3712
      if (!first) sb.append(", ");
-
 
3713
      sb.append("purchaseId:");
-
 
3714
      sb.append(this.purchaseId);
-
 
3715
      first = false;
-
 
3716
      sb.append(")");
-
 
3717
      return sb.toString();
-
 
3718
    }
-
 
3719
 
-
 
3720
    public void validate() throws org.apache.thrift.TException {
-
 
3721
      // check for required fields
-
 
3722
    }
-
 
3723
 
-
 
3724
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
3725
      try {
-
 
3726
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
3727
      } catch (org.apache.thrift.TException te) {
-
 
3728
        throw new java.io.IOException(te);
-
 
3729
      }
-
 
3730
    }
-
 
3731
 
-
 
3732
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
3733
      try {
-
 
3734
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
3735
        __isset_bit_vector = new BitSet(1);
-
 
3736
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
3737
      } catch (org.apache.thrift.TException te) {
-
 
3738
        throw new java.io.IOException(te);
-
 
3739
      }
-
 
3740
    }
-
 
3741
 
-
 
3742
  }
-
 
3743
 
-
 
3744
  public static class createInventoryItem_result implements org.apache.thrift.TBase<createInventoryItem_result, createInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
-
 
3745
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_result");
-
 
3746
 
-
 
3747
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
-
 
3748
    private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
3749
 
-
 
3750
    private InventoryItem success; // required
-
 
3751
    private WarehouseServiceException wex; // required
-
 
3752
 
-
 
3753
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
3754
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
3755
      SUCCESS((short)0, "success"),
-
 
3756
      WEX((short)1, "wex");
-
 
3757
 
-
 
3758
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
3759
 
-
 
3760
      static {
-
 
3761
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
3762
          byName.put(field.getFieldName(), field);
-
 
3763
        }
-
 
3764
      }
-
 
3765
 
-
 
3766
      /**
-
 
3767
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
3768
       */
-
 
3769
      public static _Fields findByThriftId(int fieldId) {
-
 
3770
        switch(fieldId) {
-
 
3771
          case 0: // SUCCESS
-
 
3772
            return SUCCESS;
-
 
3773
          case 1: // WEX
-
 
3774
            return WEX;
-
 
3775
          default:
-
 
3776
            return null;
-
 
3777
        }
-
 
3778
      }
-
 
3779
 
-
 
3780
      /**
-
 
3781
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
3782
       * if it is not found.
-
 
3783
       */
-
 
3784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
3785
        _Fields fields = findByThriftId(fieldId);
-
 
3786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
3787
        return fields;
-
 
3788
      }
-
 
3789
 
-
 
3790
      /**
-
 
3791
       * Find the _Fields constant that matches name, or null if its not found.
-
 
3792
       */
-
 
3793
      public static _Fields findByName(String name) {
-
 
3794
        return byName.get(name);
-
 
3795
      }
-
 
3796
 
-
 
3797
      private final short _thriftId;
-
 
3798
      private final String _fieldName;
-
 
3799
 
-
 
3800
      _Fields(short thriftId, String fieldName) {
-
 
3801
        _thriftId = thriftId;
-
 
3802
        _fieldName = fieldName;
-
 
3803
      }
-
 
3804
 
-
 
3805
      public short getThriftFieldId() {
-
 
3806
        return _thriftId;
-
 
3807
      }
-
 
3808
 
-
 
3809
      public String getFieldName() {
-
 
3810
        return _fieldName;
-
 
3811
      }
-
 
3812
    }
-
 
3813
 
-
 
3814
    // isset id assignments
-
 
3815
 
-
 
3816
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
3817
    static {
-
 
3818
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
3819
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3820
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
-
 
3821
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
3822
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
3823
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
3824
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_result.class, metaDataMap);
-
 
3825
    }
-
 
3826
 
-
 
3827
    public createInventoryItem_result() {
-
 
3828
    }
-
 
3829
 
-
 
3830
    public createInventoryItem_result(
-
 
3831
      InventoryItem success,
-
 
3832
      WarehouseServiceException wex)
-
 
3833
    {
-
 
3834
      this();
-
 
3835
      this.success = success;
-
 
3836
      this.wex = wex;
-
 
3837
    }
-
 
3838
 
-
 
3839
    /**
-
 
3840
     * Performs a deep copy on <i>other</i>.
-
 
3841
     */
-
 
3842
    public createInventoryItem_result(createInventoryItem_result other) {
-
 
3843
      if (other.isSetSuccess()) {
-
 
3844
        this.success = new InventoryItem(other.success);
-
 
3845
      }
-
 
3846
      if (other.isSetWex()) {
-
 
3847
        this.wex = new WarehouseServiceException(other.wex);
-
 
3848
      }
-
 
3849
    }
-
 
3850
 
-
 
3851
    public createInventoryItem_result deepCopy() {
-
 
3852
      return new createInventoryItem_result(this);
-
 
3853
    }
-
 
3854
 
-
 
3855
    @Override
-
 
3856
    public void clear() {
-
 
3857
      this.success = null;
-
 
3858
      this.wex = null;
-
 
3859
    }
-
 
3860
 
-
 
3861
    public InventoryItem getSuccess() {
-
 
3862
      return this.success;
-
 
3863
    }
-
 
3864
 
-
 
3865
    public void setSuccess(InventoryItem success) {
-
 
3866
      this.success = success;
-
 
3867
    }
-
 
3868
 
-
 
3869
    public void unsetSuccess() {
-
 
3870
      this.success = null;
-
 
3871
    }
-
 
3872
 
-
 
3873
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
3874
    public boolean isSetSuccess() {
-
 
3875
      return this.success != null;
-
 
3876
    }
-
 
3877
 
-
 
3878
    public void setSuccessIsSet(boolean value) {
-
 
3879
      if (!value) {
-
 
3880
        this.success = null;
-
 
3881
      }
-
 
3882
    }
-
 
3883
 
-
 
3884
    public WarehouseServiceException getWex() {
-
 
3885
      return this.wex;
-
 
3886
    }
-
 
3887
 
-
 
3888
    public void setWex(WarehouseServiceException wex) {
-
 
3889
      this.wex = wex;
-
 
3890
    }
-
 
3891
 
-
 
3892
    public void unsetWex() {
-
 
3893
      this.wex = null;
-
 
3894
    }
-
 
3895
 
-
 
3896
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
-
 
3897
    public boolean isSetWex() {
-
 
3898
      return this.wex != null;
-
 
3899
    }
-
 
3900
 
-
 
3901
    public void setWexIsSet(boolean value) {
-
 
3902
      if (!value) {
-
 
3903
        this.wex = null;
-
 
3904
      }
-
 
3905
    }
-
 
3906
 
-
 
3907
    public void setFieldValue(_Fields field, Object value) {
-
 
3908
      switch (field) {
-
 
3909
      case SUCCESS:
-
 
3910
        if (value == null) {
-
 
3911
          unsetSuccess();
-
 
3912
        } else {
-
 
3913
          setSuccess((InventoryItem)value);
-
 
3914
        }
-
 
3915
        break;
-
 
3916
 
-
 
3917
      case WEX:
-
 
3918
        if (value == null) {
-
 
3919
          unsetWex();
-
 
3920
        } else {
-
 
3921
          setWex((WarehouseServiceException)value);
-
 
3922
        }
-
 
3923
        break;
-
 
3924
 
-
 
3925
      }
-
 
3926
    }
-
 
3927
 
-
 
3928
    public Object getFieldValue(_Fields field) {
-
 
3929
      switch (field) {
-
 
3930
      case SUCCESS:
-
 
3931
        return getSuccess();
-
 
3932
 
-
 
3933
      case WEX:
-
 
3934
        return getWex();
-
 
3935
 
-
 
3936
      }
-
 
3937
      throw new IllegalStateException();
-
 
3938
    }
-
 
3939
 
-
 
3940
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
3941
    public boolean isSet(_Fields field) {
-
 
3942
      if (field == null) {
-
 
3943
        throw new IllegalArgumentException();
-
 
3944
      }
-
 
3945
 
-
 
3946
      switch (field) {
-
 
3947
      case SUCCESS:
-
 
3948
        return isSetSuccess();
-
 
3949
      case WEX:
-
 
3950
        return isSetWex();
-
 
3951
      }
-
 
3952
      throw new IllegalStateException();
-
 
3953
    }
-
 
3954
 
-
 
3955
    @Override
-
 
3956
    public boolean equals(Object that) {
-
 
3957
      if (that == null)
-
 
3958
        return false;
-
 
3959
      if (that instanceof createInventoryItem_result)
-
 
3960
        return this.equals((createInventoryItem_result)that);
-
 
3961
      return false;
-
 
3962
    }
-
 
3963
 
-
 
3964
    public boolean equals(createInventoryItem_result that) {
-
 
3965
      if (that == null)
-
 
3966
        return false;
-
 
3967
 
-
 
3968
      boolean this_present_success = true && this.isSetSuccess();
-
 
3969
      boolean that_present_success = true && that.isSetSuccess();
-
 
3970
      if (this_present_success || that_present_success) {
-
 
3971
        if (!(this_present_success && that_present_success))
-
 
3972
          return false;
-
 
3973
        if (!this.success.equals(that.success))
-
 
3974
          return false;
-
 
3975
      }
-
 
3976
 
-
 
3977
      boolean this_present_wex = true && this.isSetWex();
-
 
3978
      boolean that_present_wex = true && that.isSetWex();
-
 
3979
      if (this_present_wex || that_present_wex) {
-
 
3980
        if (!(this_present_wex && that_present_wex))
-
 
3981
          return false;
-
 
3982
        if (!this.wex.equals(that.wex))
-
 
3983
          return false;
-
 
3984
      }
-
 
3985
 
-
 
3986
      return true;
-
 
3987
    }
-
 
3988
 
-
 
3989
    @Override
-
 
3990
    public int hashCode() {
-
 
3991
      return 0;
-
 
3992
    }
-
 
3993
 
-
 
3994
    public int compareTo(createInventoryItem_result other) {
-
 
3995
      if (!getClass().equals(other.getClass())) {
-
 
3996
        return getClass().getName().compareTo(other.getClass().getName());
-
 
3997
      }
-
 
3998
 
-
 
3999
      int lastComparison = 0;
-
 
4000
      createInventoryItem_result typedOther = (createInventoryItem_result)other;
-
 
4001
 
-
 
4002
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
4003
      if (lastComparison != 0) {
-
 
4004
        return lastComparison;
-
 
4005
      }
-
 
4006
      if (isSetSuccess()) {
-
 
4007
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
4008
        if (lastComparison != 0) {
-
 
4009
          return lastComparison;
-
 
4010
        }
-
 
4011
      }
-
 
4012
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
-
 
4013
      if (lastComparison != 0) {
-
 
4014
        return lastComparison;
-
 
4015
      }
-
 
4016
      if (isSetWex()) {
-
 
4017
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
-
 
4018
        if (lastComparison != 0) {
-
 
4019
          return lastComparison;
-
 
4020
        }
-
 
4021
      }
-
 
4022
      return 0;
-
 
4023
    }
-
 
4024
 
-
 
4025
    public _Fields fieldForId(int fieldId) {
-
 
4026
      return _Fields.findByThriftId(fieldId);
-
 
4027
    }
-
 
4028
 
-
 
4029
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
4030
      org.apache.thrift.protocol.TField field;
-
 
4031
      iprot.readStructBegin();
-
 
4032
      while (true)
-
 
4033
      {
-
 
4034
        field = iprot.readFieldBegin();
-
 
4035
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
4036
          break;
-
 
4037
        }
-
 
4038
        switch (field.id) {
-
 
4039
          case 0: // SUCCESS
-
 
4040
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
4041
              this.success = new InventoryItem();
-
 
4042
              this.success.read(iprot);
-
 
4043
            } else { 
-
 
4044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
4045
            }
-
 
4046
            break;
-
 
4047
          case 1: // WEX
-
 
4048
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
4049
              this.wex = new WarehouseServiceException();
-
 
4050
              this.wex.read(iprot);
-
 
4051
            } else { 
-
 
4052
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
4053
            }
-
 
4054
            break;
-
 
4055
          default:
-
 
4056
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
4057
        }
-
 
4058
        iprot.readFieldEnd();
-
 
4059
      }
-
 
4060
      iprot.readStructEnd();
-
 
4061
      validate();
-
 
4062
    }
-
 
4063
 
-
 
4064
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
4065
      oprot.writeStructBegin(STRUCT_DESC);
-
 
4066
 
-
 
4067
      if (this.isSetSuccess()) {
-
 
4068
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
4069
        this.success.write(oprot);
-
 
4070
        oprot.writeFieldEnd();
-
 
4071
      } else if (this.isSetWex()) {
-
 
4072
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
4073
        this.wex.write(oprot);
-
 
4074
        oprot.writeFieldEnd();
-
 
4075
      }
-
 
4076
      oprot.writeFieldStop();
-
 
4077
      oprot.writeStructEnd();
-
 
4078
    }
-
 
4079
 
-
 
4080
    @Override
-
 
4081
    public String toString() {
-
 
4082
      StringBuilder sb = new StringBuilder("createInventoryItem_result(");
-
 
4083
      boolean first = true;
-
 
4084
 
-
 
4085
      sb.append("success:");
-
 
4086
      if (this.success == null) {
-
 
4087
        sb.append("null");
-
 
4088
      } else {
-
 
4089
        sb.append(this.success);
-
 
4090
      }
-
 
4091
      first = false;
-
 
4092
      if (!first) sb.append(", ");
-
 
4093
      sb.append("wex:");
-
 
4094
      if (this.wex == null) {
-
 
4095
        sb.append("null");
-
 
4096
      } else {
-
 
4097
        sb.append(this.wex);
-
 
4098
      }
-
 
4099
      first = false;
-
 
4100
      sb.append(")");
-
 
4101
      return sb.toString();
-
 
4102
    }
-
 
4103
 
-
 
4104
    public void validate() throws org.apache.thrift.TException {
-
 
4105
      // check for required fields
-
 
4106
    }
-
 
4107
 
-
 
4108
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
4109
      try {
-
 
4110
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
4111
      } catch (org.apache.thrift.TException te) {
-
 
4112
        throw new java.io.IOException(te);
-
 
4113
      }
-
 
4114
    }
-
 
4115
 
-
 
4116
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
4117
      try {
-
 
4118
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
4119
      } catch (org.apache.thrift.TException te) {
-
 
4120
        throw new java.io.IOException(te);
-
 
4121
      }
-
 
4122
    }
-
 
4123
 
-
 
4124
  }
-
 
4125
 
-
 
4126
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1198
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4127
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
4128
 
1200
 
4129
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
1201
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)1);
4130
 
1202