Subversion Repositories SmartDukaan

Rev

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

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