Subversion Repositories SmartDukaan

Rev

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

Rev 16264 Rev 21242
Line 377... Line 377...
377
     * 
377
     * 
378
     * @param date
378
     * @param date
379
     */
379
     */
380
    public List<TransferInvoiceScan> fetchScansPerTransferInvoiceNumber(long date) throws org.apache.thrift.TException;
380
    public List<TransferInvoiceScan> fetchScansPerTransferInvoiceNumber(long date) throws org.apache.thrift.TException;
381
 
381
 
-
 
382
    public List<InventoryItem> getInventoryItems(List<String> serialNumbers) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
383
 
382
  }
384
  }
383
 
385
 
384
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
386
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
385
 
387
 
386
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
388
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 523... Line 525...
523
 
525
 
524
    public void updateShipmentReferenceTransferLot(long transferLotId, long shipmentReferenceId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateShipmentReferenceTransferLot_call> resultHandler) throws org.apache.thrift.TException;
526
    public void updateShipmentReferenceTransferLot(long transferLotId, long shipmentReferenceId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateShipmentReferenceTransferLot_call> resultHandler) throws org.apache.thrift.TException;
525
 
527
 
526
    public void fetchScansPerTransferInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerTransferInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
528
    public void fetchScansPerTransferInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerTransferInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
527
 
529
 
-
 
530
    public void getInventoryItems(List<String> serialNumbers, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItems_call> resultHandler) throws org.apache.thrift.TException;
-
 
531
 
528
  }
532
  }
529
 
533
 
530
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
534
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
531
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
535
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
532
      public Factory() {}
536
      public Factory() {}
Line 2347... Line 2351...
2347
        return result.success;
2351
        return result.success;
2348
      }
2352
      }
2349
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerTransferInvoiceNumber failed: unknown result");
2353
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerTransferInvoiceNumber failed: unknown result");
2350
    }
2354
    }
2351
 
2355
 
-
 
2356
    public List<InventoryItem> getInventoryItems(List<String> serialNumbers) throws WarehouseServiceException, org.apache.thrift.TException
-
 
2357
    {
-
 
2358
      send_getInventoryItems(serialNumbers);
-
 
2359
      return recv_getInventoryItems();
-
 
2360
    }
-
 
2361
 
-
 
2362
    public void send_getInventoryItems(List<String> serialNumbers) throws org.apache.thrift.TException
-
 
2363
    {
-
 
2364
      getInventoryItems_args args = new getInventoryItems_args();
-
 
2365
      args.setSerialNumbers(serialNumbers);
-
 
2366
      sendBase("getInventoryItems", args);
-
 
2367
    }
-
 
2368
 
-
 
2369
    public List<InventoryItem> recv_getInventoryItems() throws WarehouseServiceException, org.apache.thrift.TException
-
 
2370
    {
-
 
2371
      getInventoryItems_result result = new getInventoryItems_result();
-
 
2372
      receiveBase(result, "getInventoryItems");
-
 
2373
      if (result.isSetSuccess()) {
-
 
2374
        return result.success;
-
 
2375
      }
-
 
2376
      if (result.wex != null) {
-
 
2377
        throw result.wex;
-
 
2378
      }
-
 
2379
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItems failed: unknown result");
-
 
2380
    }
-
 
2381
 
2352
  }
2382
  }
2353
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2383
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2354
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2384
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2355
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2385
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2356
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
2386
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 4865... Line 4895...
4865
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4895
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4866
        return (new Client(prot)).recv_fetchScansPerTransferInvoiceNumber();
4896
        return (new Client(prot)).recv_fetchScansPerTransferInvoiceNumber();
4867
      }
4897
      }
4868
    }
4898
    }
4869
 
4899
 
-
 
4900
    public void getInventoryItems(List<String> serialNumbers, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_call> resultHandler) throws org.apache.thrift.TException {
-
 
4901
      checkReady();
-
 
4902
      getInventoryItems_call method_call = new getInventoryItems_call(serialNumbers, resultHandler, this, ___protocolFactory, ___transport);
-
 
4903
      this.___currentMethod = method_call;
-
 
4904
      ___manager.call(method_call);
-
 
4905
    }
-
 
4906
 
-
 
4907
    public static class getInventoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
4908
      private List<String> serialNumbers;
-
 
4909
      public getInventoryItems_call(List<String> serialNumbers, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_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 {
-
 
4910
        super(client, protocolFactory, transport, resultHandler, false);
-
 
4911
        this.serialNumbers = serialNumbers;
-
 
4912
      }
-
 
4913
 
-
 
4914
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
4915
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
4916
        getInventoryItems_args args = new getInventoryItems_args();
-
 
4917
        args.setSerialNumbers(serialNumbers);
-
 
4918
        args.write(prot);
-
 
4919
        prot.writeMessageEnd();
-
 
4920
      }
-
 
4921
 
-
 
4922
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
4923
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
4924
          throw new IllegalStateException("Method call not finished!");
-
 
4925
        }
-
 
4926
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
4927
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
4928
        return (new Client(prot)).recv_getInventoryItems();
-
 
4929
      }
-
 
4930
    }
-
 
4931
 
4870
  }
4932
  }
4871
 
4933
 
4872
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4934
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4873
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4935
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4874
    public Processor(I iface) {
4936
    public Processor(I iface) {
Line 4949... Line 5011...
4949
      processMap.put("getAllUnCompletedStockShipments", new getAllUnCompletedStockShipments());
5011
      processMap.put("getAllUnCompletedStockShipments", new getAllUnCompletedStockShipments());
4950
      processMap.put("getRemovalStockShipmentReferenceById", new getRemovalStockShipmentReferenceById());
5012
      processMap.put("getRemovalStockShipmentReferenceById", new getRemovalStockShipmentReferenceById());
4951
      processMap.put("createRemovalStockShipmentReference", new createRemovalStockShipmentReference());
5013
      processMap.put("createRemovalStockShipmentReference", new createRemovalStockShipmentReference());
4952
      processMap.put("updateShipmentReferenceTransferLot", new updateShipmentReferenceTransferLot());
5014
      processMap.put("updateShipmentReferenceTransferLot", new updateShipmentReferenceTransferLot());
4953
      processMap.put("fetchScansPerTransferInvoiceNumber", new fetchScansPerTransferInvoiceNumber());
5015
      processMap.put("fetchScansPerTransferInvoiceNumber", new fetchScansPerTransferInvoiceNumber());
-
 
5016
      processMap.put("getInventoryItems", new getInventoryItems());
4954
      return processMap;
5017
      return processMap;
4955
    }
5018
    }
4956
 
5019
 
4957
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
5020
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
4958
      public getInventoryItem() {
5021
      public getInventoryItem() {
Line 6276... Line 6339...
6276
        result.success = iface.fetchScansPerTransferInvoiceNumber(args.date);
6339
        result.success = iface.fetchScansPerTransferInvoiceNumber(args.date);
6277
        return result;
6340
        return result;
6278
      }
6341
      }
6279
    }
6342
    }
6280
 
6343
 
-
 
6344
    private static class getInventoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItems_args> {
-
 
6345
      public getInventoryItems() {
-
 
6346
        super("getInventoryItems");
-
 
6347
      }
-
 
6348
 
-
 
6349
      protected getInventoryItems_args getEmptyArgsInstance() {
-
 
6350
        return new getInventoryItems_args();
-
 
6351
      }
-
 
6352
 
-
 
6353
      protected getInventoryItems_result getResult(I iface, getInventoryItems_args args) throws org.apache.thrift.TException {
-
 
6354
        getInventoryItems_result result = new getInventoryItems_result();
-
 
6355
        try {
-
 
6356
          result.success = iface.getInventoryItems(args.serialNumbers);
-
 
6357
        } catch (WarehouseServiceException wex) {
-
 
6358
          result.wex = wex;
-
 
6359
        }
-
 
6360
        return result;
-
 
6361
      }
-
 
6362
    }
-
 
6363
 
6281
  }
6364
  }
6282
 
6365
 
6283
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
6366
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
6284
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
6367
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
6285
 
6368
 
Line 59065... Line 59148...
59065
      }
59148
      }
59066
      first = false;
59149
      first = false;
59067
      sb.append(")");
59150
      sb.append(")");
59068
      return sb.toString();
59151
      return sb.toString();
59069
    }
59152
    }
-
 
59153
 
-
 
59154
    public void validate() throws org.apache.thrift.TException {
-
 
59155
      // check for required fields
-
 
59156
    }
-
 
59157
 
-
 
59158
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
59159
      try {
-
 
59160
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
59161
      } catch (org.apache.thrift.TException te) {
-
 
59162
        throw new java.io.IOException(te);
-
 
59163
      }
-
 
59164
    }
-
 
59165
 
-
 
59166
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
59167
      try {
-
 
59168
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
59169
      } catch (org.apache.thrift.TException te) {
-
 
59170
        throw new java.io.IOException(te);
-
 
59171
      }
-
 
59172
    }
-
 
59173
 
-
 
59174
  }
-
 
59175
 
-
 
59176
  public static class getInventoryItems_args implements org.apache.thrift.TBase<getInventoryItems_args, getInventoryItems_args._Fields>, java.io.Serializable, Cloneable   {
-
 
59177
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_args");
-
 
59178
 
-
 
59179
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBERS_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumbers", org.apache.thrift.protocol.TType.LIST, (short)1);
-
 
59180
 
-
 
59181
    private List<String> serialNumbers; // required
-
 
59182
 
-
 
59183
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
59184
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
59185
      SERIAL_NUMBERS((short)1, "serialNumbers");
-
 
59186
 
-
 
59187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
59188
 
-
 
59189
      static {
-
 
59190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
59191
          byName.put(field.getFieldName(), field);
-
 
59192
        }
-
 
59193
      }
-
 
59194
 
-
 
59195
      /**
-
 
59196
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
59197
       */
-
 
59198
      public static _Fields findByThriftId(int fieldId) {
-
 
59199
        switch(fieldId) {
-
 
59200
          case 1: // SERIAL_NUMBERS
-
 
59201
            return SERIAL_NUMBERS;
-
 
59202
          default:
-
 
59203
            return null;
-
 
59204
        }
-
 
59205
      }
-
 
59206
 
-
 
59207
      /**
-
 
59208
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
59209
       * if it is not found.
-
 
59210
       */
-
 
59211
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
59212
        _Fields fields = findByThriftId(fieldId);
-
 
59213
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
59214
        return fields;
-
 
59215
      }
-
 
59216
 
-
 
59217
      /**
-
 
59218
       * Find the _Fields constant that matches name, or null if its not found.
-
 
59219
       */
-
 
59220
      public static _Fields findByName(String name) {
-
 
59221
        return byName.get(name);
-
 
59222
      }
-
 
59223
 
-
 
59224
      private final short _thriftId;
-
 
59225
      private final String _fieldName;
-
 
59226
 
-
 
59227
      _Fields(short thriftId, String fieldName) {
-
 
59228
        _thriftId = thriftId;
-
 
59229
        _fieldName = fieldName;
-
 
59230
      }
-
 
59231
 
-
 
59232
      public short getThriftFieldId() {
-
 
59233
        return _thriftId;
-
 
59234
      }
-
 
59235
 
-
 
59236
      public String getFieldName() {
-
 
59237
        return _fieldName;
-
 
59238
      }
-
 
59239
    }
-
 
59240
 
-
 
59241
    // isset id assignments
-
 
59242
 
-
 
59243
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
59244
    static {
-
 
59245
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
59246
      tmpMap.put(_Fields.SERIAL_NUMBERS, new org.apache.thrift.meta_data.FieldMetaData("serialNumbers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
59247
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
59248
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
-
 
59249
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
59250
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItems_args.class, metaDataMap);
-
 
59251
    }
-
 
59252
 
-
 
59253
    public getInventoryItems_args() {
-
 
59254
    }
-
 
59255
 
-
 
59256
    public getInventoryItems_args(
-
 
59257
      List<String> serialNumbers)
-
 
59258
    {
-
 
59259
      this();
-
 
59260
      this.serialNumbers = serialNumbers;
-
 
59261
    }
-
 
59262
 
-
 
59263
    /**
-
 
59264
     * Performs a deep copy on <i>other</i>.
-
 
59265
     */
-
 
59266
    public getInventoryItems_args(getInventoryItems_args other) {
-
 
59267
      if (other.isSetSerialNumbers()) {
-
 
59268
        List<String> __this__serialNumbers = new ArrayList<String>();
-
 
59269
        for (String other_element : other.serialNumbers) {
-
 
59270
          __this__serialNumbers.add(other_element);
-
 
59271
        }
-
 
59272
        this.serialNumbers = __this__serialNumbers;
-
 
59273
      }
-
 
59274
    }
-
 
59275
 
-
 
59276
    public getInventoryItems_args deepCopy() {
-
 
59277
      return new getInventoryItems_args(this);
-
 
59278
    }
-
 
59279
 
-
 
59280
    @Override
-
 
59281
    public void clear() {
-
 
59282
      this.serialNumbers = null;
-
 
59283
    }
-
 
59284
 
-
 
59285
    public int getSerialNumbersSize() {
-
 
59286
      return (this.serialNumbers == null) ? 0 : this.serialNumbers.size();
-
 
59287
    }
-
 
59288
 
-
 
59289
    public java.util.Iterator<String> getSerialNumbersIterator() {
-
 
59290
      return (this.serialNumbers == null) ? null : this.serialNumbers.iterator();
-
 
59291
    }
-
 
59292
 
-
 
59293
    public void addToSerialNumbers(String elem) {
-
 
59294
      if (this.serialNumbers == null) {
-
 
59295
        this.serialNumbers = new ArrayList<String>();
-
 
59296
      }
-
 
59297
      this.serialNumbers.add(elem);
-
 
59298
    }
-
 
59299
 
-
 
59300
    public List<String> getSerialNumbers() {
-
 
59301
      return this.serialNumbers;
-
 
59302
    }
-
 
59303
 
-
 
59304
    public void setSerialNumbers(List<String> serialNumbers) {
-
 
59305
      this.serialNumbers = serialNumbers;
-
 
59306
    }
-
 
59307
 
-
 
59308
    public void unsetSerialNumbers() {
-
 
59309
      this.serialNumbers = null;
-
 
59310
    }
-
 
59311
 
-
 
59312
    /** Returns true if field serialNumbers is set (has been assigned a value) and false otherwise */
-
 
59313
    public boolean isSetSerialNumbers() {
-
 
59314
      return this.serialNumbers != null;
-
 
59315
    }
-
 
59316
 
-
 
59317
    public void setSerialNumbersIsSet(boolean value) {
-
 
59318
      if (!value) {
-
 
59319
        this.serialNumbers = null;
-
 
59320
      }
-
 
59321
    }
-
 
59322
 
-
 
59323
    public void setFieldValue(_Fields field, Object value) {
-
 
59324
      switch (field) {
-
 
59325
      case SERIAL_NUMBERS:
-
 
59326
        if (value == null) {
-
 
59327
          unsetSerialNumbers();
-
 
59328
        } else {
-
 
59329
          setSerialNumbers((List<String>)value);
-
 
59330
        }
-
 
59331
        break;
-
 
59332
 
-
 
59333
      }
-
 
59334
    }
-
 
59335
 
-
 
59336
    public Object getFieldValue(_Fields field) {
-
 
59337
      switch (field) {
-
 
59338
      case SERIAL_NUMBERS:
-
 
59339
        return getSerialNumbers();
-
 
59340
 
-
 
59341
      }
-
 
59342
      throw new IllegalStateException();
-
 
59343
    }
-
 
59344
 
-
 
59345
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
59346
    public boolean isSet(_Fields field) {
-
 
59347
      if (field == null) {
-
 
59348
        throw new IllegalArgumentException();
-
 
59349
      }
-
 
59350
 
-
 
59351
      switch (field) {
-
 
59352
      case SERIAL_NUMBERS:
-
 
59353
        return isSetSerialNumbers();
-
 
59354
      }
-
 
59355
      throw new IllegalStateException();
-
 
59356
    }
-
 
59357
 
-
 
59358
    @Override
-
 
59359
    public boolean equals(Object that) {
-
 
59360
      if (that == null)
-
 
59361
        return false;
-
 
59362
      if (that instanceof getInventoryItems_args)
-
 
59363
        return this.equals((getInventoryItems_args)that);
-
 
59364
      return false;
-
 
59365
    }
-
 
59366
 
-
 
59367
    public boolean equals(getInventoryItems_args that) {
-
 
59368
      if (that == null)
-
 
59369
        return false;
-
 
59370
 
-
 
59371
      boolean this_present_serialNumbers = true && this.isSetSerialNumbers();
-
 
59372
      boolean that_present_serialNumbers = true && that.isSetSerialNumbers();
-
 
59373
      if (this_present_serialNumbers || that_present_serialNumbers) {
-
 
59374
        if (!(this_present_serialNumbers && that_present_serialNumbers))
-
 
59375
          return false;
-
 
59376
        if (!this.serialNumbers.equals(that.serialNumbers))
-
 
59377
          return false;
-
 
59378
      }
-
 
59379
 
-
 
59380
      return true;
-
 
59381
    }
-
 
59382
 
-
 
59383
    @Override
-
 
59384
    public int hashCode() {
-
 
59385
      return 0;
-
 
59386
    }
-
 
59387
 
-
 
59388
    public int compareTo(getInventoryItems_args other) {
-
 
59389
      if (!getClass().equals(other.getClass())) {
-
 
59390
        return getClass().getName().compareTo(other.getClass().getName());
-
 
59391
      }
-
 
59392
 
-
 
59393
      int lastComparison = 0;
-
 
59394
      getInventoryItems_args typedOther = (getInventoryItems_args)other;
-
 
59395
 
-
 
59396
      lastComparison = Boolean.valueOf(isSetSerialNumbers()).compareTo(typedOther.isSetSerialNumbers());
-
 
59397
      if (lastComparison != 0) {
-
 
59398
        return lastComparison;
-
 
59399
      }
-
 
59400
      if (isSetSerialNumbers()) {
-
 
59401
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumbers, typedOther.serialNumbers);
-
 
59402
        if (lastComparison != 0) {
-
 
59403
          return lastComparison;
-
 
59404
        }
-
 
59405
      }
-
 
59406
      return 0;
-
 
59407
    }
-
 
59408
 
-
 
59409
    public _Fields fieldForId(int fieldId) {
-
 
59410
      return _Fields.findByThriftId(fieldId);
-
 
59411
    }
-
 
59412
 
-
 
59413
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
59414
      org.apache.thrift.protocol.TField field;
-
 
59415
      iprot.readStructBegin();
-
 
59416
      while (true)
-
 
59417
      {
-
 
59418
        field = iprot.readFieldBegin();
-
 
59419
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
59420
          break;
-
 
59421
        }
-
 
59422
        switch (field.id) {
-
 
59423
          case 1: // SERIAL_NUMBERS
-
 
59424
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
59425
              {
-
 
59426
                org.apache.thrift.protocol.TList _list190 = iprot.readListBegin();
-
 
59427
                this.serialNumbers = new ArrayList<String>(_list190.size);
-
 
59428
                for (int _i191 = 0; _i191 < _list190.size; ++_i191)
-
 
59429
                {
-
 
59430
                  String _elem192; // required
-
 
59431
                  _elem192 = iprot.readString();
-
 
59432
                  this.serialNumbers.add(_elem192);
-
 
59433
                }
-
 
59434
                iprot.readListEnd();
-
 
59435
              }
-
 
59436
            } else { 
-
 
59437
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
59438
            }
-
 
59439
            break;
-
 
59440
          default:
-
 
59441
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
59442
        }
-
 
59443
        iprot.readFieldEnd();
-
 
59444
      }
-
 
59445
      iprot.readStructEnd();
-
 
59446
      validate();
-
 
59447
    }
-
 
59448
 
-
 
59449
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
59450
      validate();
-
 
59451
 
-
 
59452
      oprot.writeStructBegin(STRUCT_DESC);
-
 
59453
      if (this.serialNumbers != null) {
-
 
59454
        oprot.writeFieldBegin(SERIAL_NUMBERS_FIELD_DESC);
-
 
59455
        {
-
 
59456
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.serialNumbers.size()));
-
 
59457
          for (String _iter193 : this.serialNumbers)
-
 
59458
          {
-
 
59459
            oprot.writeString(_iter193);
-
 
59460
          }
-
 
59461
          oprot.writeListEnd();
-
 
59462
        }
-
 
59463
        oprot.writeFieldEnd();
-
 
59464
      }
-
 
59465
      oprot.writeFieldStop();
-
 
59466
      oprot.writeStructEnd();
-
 
59467
    }
-
 
59468
 
-
 
59469
    @Override
-
 
59470
    public String toString() {
-
 
59471
      StringBuilder sb = new StringBuilder("getInventoryItems_args(");
-
 
59472
      boolean first = true;
-
 
59473
 
-
 
59474
      sb.append("serialNumbers:");
-
 
59475
      if (this.serialNumbers == null) {
-
 
59476
        sb.append("null");
-
 
59477
      } else {
-
 
59478
        sb.append(this.serialNumbers);
-
 
59479
      }
-
 
59480
      first = false;
-
 
59481
      sb.append(")");
-
 
59482
      return sb.toString();
-
 
59483
    }
-
 
59484
 
-
 
59485
    public void validate() throws org.apache.thrift.TException {
-
 
59486
      // check for required fields
-
 
59487
    }
-
 
59488
 
-
 
59489
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
59490
      try {
-
 
59491
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
59492
      } catch (org.apache.thrift.TException te) {
-
 
59493
        throw new java.io.IOException(te);
-
 
59494
      }
-
 
59495
    }
-
 
59496
 
-
 
59497
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
59498
      try {
-
 
59499
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
59500
      } catch (org.apache.thrift.TException te) {
-
 
59501
        throw new java.io.IOException(te);
-
 
59502
      }
-
 
59503
    }
-
 
59504
 
-
 
59505
  }
-
 
59506
 
-
 
59507
  public static class getInventoryItems_result implements org.apache.thrift.TBase<getInventoryItems_result, getInventoryItems_result._Fields>, java.io.Serializable, Cloneable   {
-
 
59508
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_result");
-
 
59509
 
-
 
59510
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
 
59511
    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);
-
 
59512
 
-
 
59513
    private List<InventoryItem> success; // required
-
 
59514
    private WarehouseServiceException wex; // required
-
 
59515
 
-
 
59516
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
59517
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
59518
      SUCCESS((short)0, "success"),
-
 
59519
      WEX((short)1, "wex");
-
 
59520
 
-
 
59521
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
59522
 
-
 
59523
      static {
-
 
59524
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
59525
          byName.put(field.getFieldName(), field);
-
 
59526
        }
-
 
59527
      }
-
 
59528
 
-
 
59529
      /**
-
 
59530
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
59531
       */
-
 
59532
      public static _Fields findByThriftId(int fieldId) {
-
 
59533
        switch(fieldId) {
-
 
59534
          case 0: // SUCCESS
-
 
59535
            return SUCCESS;
-
 
59536
          case 1: // WEX
-
 
59537
            return WEX;
-
 
59538
          default:
-
 
59539
            return null;
-
 
59540
        }
-
 
59541
      }
-
 
59542
 
-
 
59543
      /**
-
 
59544
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
59545
       * if it is not found.
-
 
59546
       */
-
 
59547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
59548
        _Fields fields = findByThriftId(fieldId);
-
 
59549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
59550
        return fields;
-
 
59551
      }
-
 
59552
 
-
 
59553
      /**
-
 
59554
       * Find the _Fields constant that matches name, or null if its not found.
-
 
59555
       */
-
 
59556
      public static _Fields findByName(String name) {
-
 
59557
        return byName.get(name);
-
 
59558
      }
-
 
59559
 
-
 
59560
      private final short _thriftId;
-
 
59561
      private final String _fieldName;
-
 
59562
 
-
 
59563
      _Fields(short thriftId, String fieldName) {
-
 
59564
        _thriftId = thriftId;
-
 
59565
        _fieldName = fieldName;
-
 
59566
      }
-
 
59567
 
-
 
59568
      public short getThriftFieldId() {
-
 
59569
        return _thriftId;
-
 
59570
      }
-
 
59571
 
-
 
59572
      public String getFieldName() {
-
 
59573
        return _fieldName;
-
 
59574
      }
-
 
59575
    }
-
 
59576
 
-
 
59577
    // isset id assignments
-
 
59578
 
-
 
59579
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
59580
    static {
-
 
59581
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
59582
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
59583
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
59584
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
-
 
59585
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
59586
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
59587
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
59588
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItems_result.class, metaDataMap);
-
 
59589
    }
-
 
59590
 
-
 
59591
    public getInventoryItems_result() {
-
 
59592
    }
-
 
59593
 
-
 
59594
    public getInventoryItems_result(
-
 
59595
      List<InventoryItem> success,
-
 
59596
      WarehouseServiceException wex)
-
 
59597
    {
-
 
59598
      this();
-
 
59599
      this.success = success;
-
 
59600
      this.wex = wex;
-
 
59601
    }
-
 
59602
 
-
 
59603
    /**
-
 
59604
     * Performs a deep copy on <i>other</i>.
-
 
59605
     */
-
 
59606
    public getInventoryItems_result(getInventoryItems_result other) {
-
 
59607
      if (other.isSetSuccess()) {
-
 
59608
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
-
 
59609
        for (InventoryItem other_element : other.success) {
-
 
59610
          __this__success.add(new InventoryItem(other_element));
-
 
59611
        }
-
 
59612
        this.success = __this__success;
-
 
59613
      }
-
 
59614
      if (other.isSetWex()) {
-
 
59615
        this.wex = new WarehouseServiceException(other.wex);
-
 
59616
      }
-
 
59617
    }
-
 
59618
 
-
 
59619
    public getInventoryItems_result deepCopy() {
-
 
59620
      return new getInventoryItems_result(this);
-
 
59621
    }
-
 
59622
 
-
 
59623
    @Override
-
 
59624
    public void clear() {
-
 
59625
      this.success = null;
-
 
59626
      this.wex = null;
-
 
59627
    }
-
 
59628
 
-
 
59629
    public int getSuccessSize() {
-
 
59630
      return (this.success == null) ? 0 : this.success.size();
-
 
59631
    }
-
 
59632
 
-
 
59633
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
-
 
59634
      return (this.success == null) ? null : this.success.iterator();
-
 
59635
    }
-
 
59636
 
-
 
59637
    public void addToSuccess(InventoryItem elem) {
-
 
59638
      if (this.success == null) {
-
 
59639
        this.success = new ArrayList<InventoryItem>();
-
 
59640
      }
-
 
59641
      this.success.add(elem);
-
 
59642
    }
-
 
59643
 
-
 
59644
    public List<InventoryItem> getSuccess() {
-
 
59645
      return this.success;
-
 
59646
    }
-
 
59647
 
-
 
59648
    public void setSuccess(List<InventoryItem> success) {
-
 
59649
      this.success = success;
-
 
59650
    }
-
 
59651
 
-
 
59652
    public void unsetSuccess() {
-
 
59653
      this.success = null;
-
 
59654
    }
-
 
59655
 
-
 
59656
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
59657
    public boolean isSetSuccess() {
-
 
59658
      return this.success != null;
-
 
59659
    }
-
 
59660
 
-
 
59661
    public void setSuccessIsSet(boolean value) {
-
 
59662
      if (!value) {
-
 
59663
        this.success = null;
-
 
59664
      }
-
 
59665
    }
-
 
59666
 
-
 
59667
    public WarehouseServiceException getWex() {
-
 
59668
      return this.wex;
-
 
59669
    }
-
 
59670
 
-
 
59671
    public void setWex(WarehouseServiceException wex) {
-
 
59672
      this.wex = wex;
-
 
59673
    }
-
 
59674
 
-
 
59675
    public void unsetWex() {
-
 
59676
      this.wex = null;
-
 
59677
    }
-
 
59678
 
-
 
59679
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
-
 
59680
    public boolean isSetWex() {
-
 
59681
      return this.wex != null;
-
 
59682
    }
-
 
59683
 
-
 
59684
    public void setWexIsSet(boolean value) {
-
 
59685
      if (!value) {
-
 
59686
        this.wex = null;
-
 
59687
      }
-
 
59688
    }
-
 
59689
 
-
 
59690
    public void setFieldValue(_Fields field, Object value) {
-
 
59691
      switch (field) {
-
 
59692
      case SUCCESS:
-
 
59693
        if (value == null) {
-
 
59694
          unsetSuccess();
-
 
59695
        } else {
-
 
59696
          setSuccess((List<InventoryItem>)value);
-
 
59697
        }
-
 
59698
        break;
-
 
59699
 
-
 
59700
      case WEX:
-
 
59701
        if (value == null) {
-
 
59702
          unsetWex();
-
 
59703
        } else {
-
 
59704
          setWex((WarehouseServiceException)value);
-
 
59705
        }
-
 
59706
        break;
-
 
59707
 
-
 
59708
      }
-
 
59709
    }
-
 
59710
 
-
 
59711
    public Object getFieldValue(_Fields field) {
-
 
59712
      switch (field) {
-
 
59713
      case SUCCESS:
-
 
59714
        return getSuccess();
-
 
59715
 
-
 
59716
      case WEX:
-
 
59717
        return getWex();
-
 
59718
 
-
 
59719
      }
-
 
59720
      throw new IllegalStateException();
-
 
59721
    }
-
 
59722
 
-
 
59723
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
59724
    public boolean isSet(_Fields field) {
-
 
59725
      if (field == null) {
-
 
59726
        throw new IllegalArgumentException();
-
 
59727
      }
-
 
59728
 
-
 
59729
      switch (field) {
-
 
59730
      case SUCCESS:
-
 
59731
        return isSetSuccess();
-
 
59732
      case WEX:
-
 
59733
        return isSetWex();
-
 
59734
      }
-
 
59735
      throw new IllegalStateException();
-
 
59736
    }
-
 
59737
 
-
 
59738
    @Override
-
 
59739
    public boolean equals(Object that) {
-
 
59740
      if (that == null)
-
 
59741
        return false;
-
 
59742
      if (that instanceof getInventoryItems_result)
-
 
59743
        return this.equals((getInventoryItems_result)that);
-
 
59744
      return false;
-
 
59745
    }
-
 
59746
 
-
 
59747
    public boolean equals(getInventoryItems_result that) {
-
 
59748
      if (that == null)
-
 
59749
        return false;
-
 
59750
 
-
 
59751
      boolean this_present_success = true && this.isSetSuccess();
-
 
59752
      boolean that_present_success = true && that.isSetSuccess();
-
 
59753
      if (this_present_success || that_present_success) {
-
 
59754
        if (!(this_present_success && that_present_success))
-
 
59755
          return false;
-
 
59756
        if (!this.success.equals(that.success))
-
 
59757
          return false;
-
 
59758
      }
-
 
59759
 
-
 
59760
      boolean this_present_wex = true && this.isSetWex();
-
 
59761
      boolean that_present_wex = true && that.isSetWex();
-
 
59762
      if (this_present_wex || that_present_wex) {
-
 
59763
        if (!(this_present_wex && that_present_wex))
-
 
59764
          return false;
-
 
59765
        if (!this.wex.equals(that.wex))
-
 
59766
          return false;
-
 
59767
      }
-
 
59768
 
-
 
59769
      return true;
-
 
59770
    }
-
 
59771
 
-
 
59772
    @Override
-
 
59773
    public int hashCode() {
-
 
59774
      return 0;
-
 
59775
    }
-
 
59776
 
-
 
59777
    public int compareTo(getInventoryItems_result other) {
-
 
59778
      if (!getClass().equals(other.getClass())) {
-
 
59779
        return getClass().getName().compareTo(other.getClass().getName());
-
 
59780
      }
-
 
59781
 
-
 
59782
      int lastComparison = 0;
-
 
59783
      getInventoryItems_result typedOther = (getInventoryItems_result)other;
-
 
59784
 
-
 
59785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
59786
      if (lastComparison != 0) {
-
 
59787
        return lastComparison;
-
 
59788
      }
-
 
59789
      if (isSetSuccess()) {
-
 
59790
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
59791
        if (lastComparison != 0) {
-
 
59792
          return lastComparison;
-
 
59793
        }
-
 
59794
      }
-
 
59795
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
-
 
59796
      if (lastComparison != 0) {
-
 
59797
        return lastComparison;
-
 
59798
      }
-
 
59799
      if (isSetWex()) {
-
 
59800
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
-
 
59801
        if (lastComparison != 0) {
-
 
59802
          return lastComparison;
-
 
59803
        }
-
 
59804
      }
-
 
59805
      return 0;
-
 
59806
    }
-
 
59807
 
-
 
59808
    public _Fields fieldForId(int fieldId) {
-
 
59809
      return _Fields.findByThriftId(fieldId);
-
 
59810
    }
-
 
59811
 
-
 
59812
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
59813
      org.apache.thrift.protocol.TField field;
-
 
59814
      iprot.readStructBegin();
-
 
59815
      while (true)
-
 
59816
      {
-
 
59817
        field = iprot.readFieldBegin();
-
 
59818
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
59819
          break;
-
 
59820
        }
-
 
59821
        switch (field.id) {
-
 
59822
          case 0: // SUCCESS
-
 
59823
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
59824
              {
-
 
59825
                org.apache.thrift.protocol.TList _list194 = iprot.readListBegin();
-
 
59826
                this.success = new ArrayList<InventoryItem>(_list194.size);
-
 
59827
                for (int _i195 = 0; _i195 < _list194.size; ++_i195)
-
 
59828
                {
-
 
59829
                  InventoryItem _elem196; // required
-
 
59830
                  _elem196 = new InventoryItem();
-
 
59831
                  _elem196.read(iprot);
-
 
59832
                  this.success.add(_elem196);
-
 
59833
                }
-
 
59834
                iprot.readListEnd();
-
 
59835
              }
-
 
59836
            } else { 
-
 
59837
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
59838
            }
-
 
59839
            break;
-
 
59840
          case 1: // WEX
-
 
59841
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
59842
              this.wex = new WarehouseServiceException();
-
 
59843
              this.wex.read(iprot);
-
 
59844
            } else { 
-
 
59845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
59846
            }
-
 
59847
            break;
-
 
59848
          default:
-
 
59849
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
59850
        }
-
 
59851
        iprot.readFieldEnd();
-
 
59852
      }
-
 
59853
      iprot.readStructEnd();
-
 
59854
      validate();
-
 
59855
    }
-
 
59856
 
-
 
59857
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
59858
      oprot.writeStructBegin(STRUCT_DESC);
-
 
59859
 
-
 
59860
      if (this.isSetSuccess()) {
-
 
59861
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
59862
        {
-
 
59863
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
59864
          for (InventoryItem _iter197 : this.success)
-
 
59865
          {
-
 
59866
            _iter197.write(oprot);
-
 
59867
          }
-
 
59868
          oprot.writeListEnd();
-
 
59869
        }
-
 
59870
        oprot.writeFieldEnd();
-
 
59871
      } else if (this.isSetWex()) {
-
 
59872
        oprot.writeFieldBegin(WEX_FIELD_DESC);
-
 
59873
        this.wex.write(oprot);
-
 
59874
        oprot.writeFieldEnd();
-
 
59875
      }
-
 
59876
      oprot.writeFieldStop();
-
 
59877
      oprot.writeStructEnd();
-
 
59878
    }
-
 
59879
 
-
 
59880
    @Override
-
 
59881
    public String toString() {
-
 
59882
      StringBuilder sb = new StringBuilder("getInventoryItems_result(");
-
 
59883
      boolean first = true;
-
 
59884
 
-
 
59885
      sb.append("success:");
-
 
59886
      if (this.success == null) {
-
 
59887
        sb.append("null");
-
 
59888
      } else {
-
 
59889
        sb.append(this.success);
-
 
59890
      }
-
 
59891
      first = false;
-
 
59892
      if (!first) sb.append(", ");
-
 
59893
      sb.append("wex:");
-
 
59894
      if (this.wex == null) {
-
 
59895
        sb.append("null");
-
 
59896
      } else {
-
 
59897
        sb.append(this.wex);
-
 
59898
      }
-
 
59899
      first = false;
-
 
59900
      sb.append(")");
-
 
59901
      return sb.toString();
-
 
59902
    }
59070
 
59903
 
59071
    public void validate() throws org.apache.thrift.TException {
59904
    public void validate() throws org.apache.thrift.TException {
59072
      // check for required fields
59905
      // check for required fields
59073
    }
59906
    }
59074
 
59907