Subversion Repositories SmartDukaan

Rev

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

Rev 6322 Rev 6467
Line 151... Line 151...
151
     * 
151
     * 
152
     * @param serialNumber
152
     * @param serialNumber
153
     */
153
     */
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
155
 
155
 
-
 
156
    /**
-
 
157
     * Inserts outgoing scans for Returned Items and updates returnId in InventoryItem
-
 
158
     * 
-
 
159
     * @param saleReturnItems
-
 
160
     * @param vendorId
-
 
161
     */
-
 
162
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
-
 
163
 
156
  }
164
  }
157
 
165
 
158
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
166
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
159
 
167
 
160
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
168
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
Line 187... Line 195...
187
 
195
 
188
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
196
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
189
 
197
 
190
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
198
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
191
 
199
 
-
 
200
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
-
 
201
 
192
  }
202
  }
193
 
203
 
194
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
204
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
195
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
205
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
196
      public Factory() {}
206
      public Factory() {}
Line 613... Line 623...
613
        return result.success;
623
        return result.success;
614
      }
624
      }
615
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
625
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
616
    }
626
    }
617
 
627
 
-
 
628
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
-
 
629
    {
-
 
630
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
-
 
631
      recv_scanForPurchaseReturn();
-
 
632
    }
-
 
633
 
-
 
634
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
-
 
635
    {
-
 
636
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
-
 
637
      args.setSaleReturnItems(saleReturnItems);
-
 
638
      args.setVendorId(vendorId);
-
 
639
      sendBase("scanForPurchaseReturn", args);
-
 
640
    }
-
 
641
 
-
 
642
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
-
 
643
    {
-
 
644
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
-
 
645
      receiveBase(result, "scanForPurchaseReturn");
-
 
646
      if (result.ex != null) {
-
 
647
        throw result.ex;
-
 
648
      }
-
 
649
      return;
-
 
650
    }
-
 
651
 
618
  }
652
  }
619
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
653
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
620
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
654
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
621
      private org.apache.thrift.async.TAsyncClientManager clientManager;
655
      private org.apache.thrift.async.TAsyncClientManager clientManager;
622
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
656
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 1197... Line 1231...
1197
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1231
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1198
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1232
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1199
      }
1233
      }
1200
    }
1234
    }
1201
 
1235
 
-
 
1236
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
-
 
1237
      checkReady();
-
 
1238
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1239
      this.___currentMethod = method_call;
-
 
1240
      ___manager.call(method_call);
-
 
1241
    }
-
 
1242
 
-
 
1243
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1244
      private List<InventoryItem> saleReturnItems;
-
 
1245
      private long vendorId;
-
 
1246
      public scanForPurchaseReturn_call(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_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 {
-
 
1247
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1248
        this.saleReturnItems = saleReturnItems;
-
 
1249
        this.vendorId = vendorId;
-
 
1250
      }
-
 
1251
 
-
 
1252
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1253
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1254
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
-
 
1255
        args.setSaleReturnItems(saleReturnItems);
-
 
1256
        args.setVendorId(vendorId);
-
 
1257
        args.write(prot);
-
 
1258
        prot.writeMessageEnd();
-
 
1259
      }
-
 
1260
 
-
 
1261
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
-
 
1262
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1263
          throw new IllegalStateException("Method call not finished!");
-
 
1264
        }
-
 
1265
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1266
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1267
        (new Client(prot)).recv_scanForPurchaseReturn();
-
 
1268
      }
-
 
1269
    }
-
 
1270
 
1202
  }
1271
  }
1203
 
1272
 
1204
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1273
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1205
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1274
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1206
    public Processor(I iface) {
1275
    public Processor(I iface) {
Line 1226... Line 1295...
1226
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
1295
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
1227
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
1296
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
1228
      processMap.put("getInventoryAge", new getInventoryAge());
1297
      processMap.put("getInventoryAge", new getInventoryAge());
1229
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1298
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1230
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
1299
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
-
 
1300
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
1231
      return processMap;
1301
      return processMap;
1232
    }
1302
    }
1233
 
1303
 
1234
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1304
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1235
      public getInventoryItem() {
1305
      public getInventoryItem() {
Line 1517... Line 1587...
1517
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
1587
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
1518
        return result;
1588
        return result;
1519
      }
1589
      }
1520
    }
1590
    }
1521
 
1591
 
-
 
1592
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
-
 
1593
      public scanForPurchaseReturn() {
-
 
1594
        super("scanForPurchaseReturn");
-
 
1595
      }
-
 
1596
 
-
 
1597
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
-
 
1598
        return new scanForPurchaseReturn_args();
-
 
1599
      }
-
 
1600
 
-
 
1601
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
-
 
1602
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
-
 
1603
        try {
-
 
1604
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
-
 
1605
        } catch (WarehouseServiceException ex) {
-
 
1606
          result.ex = ex;
-
 
1607
        }
-
 
1608
        return result;
-
 
1609
      }
-
 
1610
    }
-
 
1611
 
1522
  }
1612
  }
1523
 
1613
 
1524
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1614
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1525
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1615
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
1526
 
1616
 
Line 13288... Line 13378...
13288
      }
13378
      }
13289
      first = false;
13379
      first = false;
13290
      sb.append(")");
13380
      sb.append(")");
13291
      return sb.toString();
13381
      return sb.toString();
13292
    }
13382
    }
-
 
13383
 
-
 
13384
    public void validate() throws org.apache.thrift.TException {
-
 
13385
      // check for required fields
-
 
13386
    }
-
 
13387
 
-
 
13388
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
13389
      try {
-
 
13390
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
13391
      } catch (org.apache.thrift.TException te) {
-
 
13392
        throw new java.io.IOException(te);
-
 
13393
      }
-
 
13394
    }
-
 
13395
 
-
 
13396
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
13397
      try {
-
 
13398
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
13399
      } catch (org.apache.thrift.TException te) {
-
 
13400
        throw new java.io.IOException(te);
-
 
13401
      }
-
 
13402
    }
-
 
13403
 
-
 
13404
  }
-
 
13405
 
-
 
13406
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
-
 
13407
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
-
 
13408
 
-
 
13409
    private static final org.apache.thrift.protocol.TField SALE_RETURN_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("saleReturnItems", org.apache.thrift.protocol.TType.LIST, (short)1);
-
 
13410
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
-
 
13411
 
-
 
13412
    private List<InventoryItem> saleReturnItems; // required
-
 
13413
    private long vendorId; // required
-
 
13414
 
-
 
13415
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13416
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
13417
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
-
 
13418
      VENDOR_ID((short)2, "vendorId");
-
 
13419
 
-
 
13420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13421
 
-
 
13422
      static {
-
 
13423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13424
          byName.put(field.getFieldName(), field);
-
 
13425
        }
-
 
13426
      }
-
 
13427
 
-
 
13428
      /**
-
 
13429
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13430
       */
-
 
13431
      public static _Fields findByThriftId(int fieldId) {
-
 
13432
        switch(fieldId) {
-
 
13433
          case 1: // SALE_RETURN_ITEMS
-
 
13434
            return SALE_RETURN_ITEMS;
-
 
13435
          case 2: // VENDOR_ID
-
 
13436
            return VENDOR_ID;
-
 
13437
          default:
-
 
13438
            return null;
-
 
13439
        }
-
 
13440
      }
-
 
13441
 
-
 
13442
      /**
-
 
13443
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13444
       * if it is not found.
-
 
13445
       */
-
 
13446
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13447
        _Fields fields = findByThriftId(fieldId);
-
 
13448
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13449
        return fields;
-
 
13450
      }
-
 
13451
 
-
 
13452
      /**
-
 
13453
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13454
       */
-
 
13455
      public static _Fields findByName(String name) {
-
 
13456
        return byName.get(name);
-
 
13457
      }
-
 
13458
 
-
 
13459
      private final short _thriftId;
-
 
13460
      private final String _fieldName;
-
 
13461
 
-
 
13462
      _Fields(short thriftId, String fieldName) {
-
 
13463
        _thriftId = thriftId;
-
 
13464
        _fieldName = fieldName;
-
 
13465
      }
-
 
13466
 
-
 
13467
      public short getThriftFieldId() {
-
 
13468
        return _thriftId;
-
 
13469
      }
-
 
13470
 
-
 
13471
      public String getFieldName() {
-
 
13472
        return _fieldName;
-
 
13473
      }
-
 
13474
    }
-
 
13475
 
-
 
13476
    // isset id assignments
-
 
13477
    private static final int __VENDORID_ISSET_ID = 0;
-
 
13478
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
13479
 
-
 
13480
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
13481
    static {
-
 
13482
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
13483
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
13484
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
13485
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
-
 
13486
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
13487
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
13488
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
13489
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
-
 
13490
    }
-
 
13491
 
-
 
13492
    public scanForPurchaseReturn_args() {
-
 
13493
    }
-
 
13494
 
-
 
13495
    public scanForPurchaseReturn_args(
-
 
13496
      List<InventoryItem> saleReturnItems,
-
 
13497
      long vendorId)
-
 
13498
    {
-
 
13499
      this();
-
 
13500
      this.saleReturnItems = saleReturnItems;
-
 
13501
      this.vendorId = vendorId;
-
 
13502
      setVendorIdIsSet(true);
-
 
13503
    }
-
 
13504
 
-
 
13505
    /**
-
 
13506
     * Performs a deep copy on <i>other</i>.
-
 
13507
     */
-
 
13508
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
-
 
13509
      __isset_bit_vector.clear();
-
 
13510
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
13511
      if (other.isSetSaleReturnItems()) {
-
 
13512
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
-
 
13513
        for (InventoryItem other_element : other.saleReturnItems) {
-
 
13514
          __this__saleReturnItems.add(new InventoryItem(other_element));
-
 
13515
        }
-
 
13516
        this.saleReturnItems = __this__saleReturnItems;
-
 
13517
      }
-
 
13518
      this.vendorId = other.vendorId;
-
 
13519
    }
-
 
13520
 
-
 
13521
    public scanForPurchaseReturn_args deepCopy() {
-
 
13522
      return new scanForPurchaseReturn_args(this);
-
 
13523
    }
-
 
13524
 
-
 
13525
    @Override
-
 
13526
    public void clear() {
-
 
13527
      this.saleReturnItems = null;
-
 
13528
      setVendorIdIsSet(false);
-
 
13529
      this.vendorId = 0;
-
 
13530
    }
-
 
13531
 
-
 
13532
    public int getSaleReturnItemsSize() {
-
 
13533
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
-
 
13534
    }
-
 
13535
 
-
 
13536
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
-
 
13537
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
-
 
13538
    }
-
 
13539
 
-
 
13540
    public void addToSaleReturnItems(InventoryItem elem) {
-
 
13541
      if (this.saleReturnItems == null) {
-
 
13542
        this.saleReturnItems = new ArrayList<InventoryItem>();
-
 
13543
      }
-
 
13544
      this.saleReturnItems.add(elem);
-
 
13545
    }
-
 
13546
 
-
 
13547
    public List<InventoryItem> getSaleReturnItems() {
-
 
13548
      return this.saleReturnItems;
-
 
13549
    }
-
 
13550
 
-
 
13551
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
-
 
13552
      this.saleReturnItems = saleReturnItems;
-
 
13553
    }
-
 
13554
 
-
 
13555
    public void unsetSaleReturnItems() {
-
 
13556
      this.saleReturnItems = null;
-
 
13557
    }
-
 
13558
 
-
 
13559
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
-
 
13560
    public boolean isSetSaleReturnItems() {
-
 
13561
      return this.saleReturnItems != null;
-
 
13562
    }
-
 
13563
 
-
 
13564
    public void setSaleReturnItemsIsSet(boolean value) {
-
 
13565
      if (!value) {
-
 
13566
        this.saleReturnItems = null;
-
 
13567
      }
-
 
13568
    }
-
 
13569
 
-
 
13570
    public long getVendorId() {
-
 
13571
      return this.vendorId;
-
 
13572
    }
-
 
13573
 
-
 
13574
    public void setVendorId(long vendorId) {
-
 
13575
      this.vendorId = vendorId;
-
 
13576
      setVendorIdIsSet(true);
-
 
13577
    }
-
 
13578
 
-
 
13579
    public void unsetVendorId() {
-
 
13580
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
-
 
13581
    }
-
 
13582
 
-
 
13583
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
-
 
13584
    public boolean isSetVendorId() {
-
 
13585
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
-
 
13586
    }
-
 
13587
 
-
 
13588
    public void setVendorIdIsSet(boolean value) {
-
 
13589
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
-
 
13590
    }
-
 
13591
 
-
 
13592
    public void setFieldValue(_Fields field, Object value) {
-
 
13593
      switch (field) {
-
 
13594
      case SALE_RETURN_ITEMS:
-
 
13595
        if (value == null) {
-
 
13596
          unsetSaleReturnItems();
-
 
13597
        } else {
-
 
13598
          setSaleReturnItems((List<InventoryItem>)value);
-
 
13599
        }
-
 
13600
        break;
-
 
13601
 
-
 
13602
      case VENDOR_ID:
-
 
13603
        if (value == null) {
-
 
13604
          unsetVendorId();
-
 
13605
        } else {
-
 
13606
          setVendorId((Long)value);
-
 
13607
        }
-
 
13608
        break;
-
 
13609
 
-
 
13610
      }
-
 
13611
    }
-
 
13612
 
-
 
13613
    public Object getFieldValue(_Fields field) {
-
 
13614
      switch (field) {
-
 
13615
      case SALE_RETURN_ITEMS:
-
 
13616
        return getSaleReturnItems();
-
 
13617
 
-
 
13618
      case VENDOR_ID:
-
 
13619
        return Long.valueOf(getVendorId());
-
 
13620
 
-
 
13621
      }
-
 
13622
      throw new IllegalStateException();
-
 
13623
    }
-
 
13624
 
-
 
13625
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
13626
    public boolean isSet(_Fields field) {
-
 
13627
      if (field == null) {
-
 
13628
        throw new IllegalArgumentException();
-
 
13629
      }
-
 
13630
 
-
 
13631
      switch (field) {
-
 
13632
      case SALE_RETURN_ITEMS:
-
 
13633
        return isSetSaleReturnItems();
-
 
13634
      case VENDOR_ID:
-
 
13635
        return isSetVendorId();
-
 
13636
      }
-
 
13637
      throw new IllegalStateException();
-
 
13638
    }
-
 
13639
 
-
 
13640
    @Override
-
 
13641
    public boolean equals(Object that) {
-
 
13642
      if (that == null)
-
 
13643
        return false;
-
 
13644
      if (that instanceof scanForPurchaseReturn_args)
-
 
13645
        return this.equals((scanForPurchaseReturn_args)that);
-
 
13646
      return false;
-
 
13647
    }
-
 
13648
 
-
 
13649
    public boolean equals(scanForPurchaseReturn_args that) {
-
 
13650
      if (that == null)
-
 
13651
        return false;
-
 
13652
 
-
 
13653
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
-
 
13654
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
-
 
13655
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
-
 
13656
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
-
 
13657
          return false;
-
 
13658
        if (!this.saleReturnItems.equals(that.saleReturnItems))
-
 
13659
          return false;
-
 
13660
      }
-
 
13661
 
-
 
13662
      boolean this_present_vendorId = true;
-
 
13663
      boolean that_present_vendorId = true;
-
 
13664
      if (this_present_vendorId || that_present_vendorId) {
-
 
13665
        if (!(this_present_vendorId && that_present_vendorId))
-
 
13666
          return false;
-
 
13667
        if (this.vendorId != that.vendorId)
-
 
13668
          return false;
-
 
13669
      }
-
 
13670
 
-
 
13671
      return true;
-
 
13672
    }
-
 
13673
 
-
 
13674
    @Override
-
 
13675
    public int hashCode() {
-
 
13676
      return 0;
-
 
13677
    }
-
 
13678
 
-
 
13679
    public int compareTo(scanForPurchaseReturn_args other) {
-
 
13680
      if (!getClass().equals(other.getClass())) {
-
 
13681
        return getClass().getName().compareTo(other.getClass().getName());
-
 
13682
      }
-
 
13683
 
-
 
13684
      int lastComparison = 0;
-
 
13685
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
-
 
13686
 
-
 
13687
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
-
 
13688
      if (lastComparison != 0) {
-
 
13689
        return lastComparison;
-
 
13690
      }
-
 
13691
      if (isSetSaleReturnItems()) {
-
 
13692
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
-
 
13693
        if (lastComparison != 0) {
-
 
13694
          return lastComparison;
-
 
13695
        }
-
 
13696
      }
-
 
13697
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
-
 
13698
      if (lastComparison != 0) {
-
 
13699
        return lastComparison;
-
 
13700
      }
-
 
13701
      if (isSetVendorId()) {
-
 
13702
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
-
 
13703
        if (lastComparison != 0) {
-
 
13704
          return lastComparison;
-
 
13705
        }
-
 
13706
      }
-
 
13707
      return 0;
-
 
13708
    }
-
 
13709
 
-
 
13710
    public _Fields fieldForId(int fieldId) {
-
 
13711
      return _Fields.findByThriftId(fieldId);
-
 
13712
    }
-
 
13713
 
-
 
13714
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
13715
      org.apache.thrift.protocol.TField field;
-
 
13716
      iprot.readStructBegin();
-
 
13717
      while (true)
-
 
13718
      {
-
 
13719
        field = iprot.readFieldBegin();
-
 
13720
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
13721
          break;
-
 
13722
        }
-
 
13723
        switch (field.id) {
-
 
13724
          case 1: // SALE_RETURN_ITEMS
-
 
13725
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
13726
              {
-
 
13727
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
-
 
13728
                this.saleReturnItems = new ArrayList<InventoryItem>(_list32.size);
-
 
13729
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
-
 
13730
                {
-
 
13731
                  InventoryItem _elem34; // required
-
 
13732
                  _elem34 = new InventoryItem();
-
 
13733
                  _elem34.read(iprot);
-
 
13734
                  this.saleReturnItems.add(_elem34);
-
 
13735
                }
-
 
13736
                iprot.readListEnd();
-
 
13737
              }
-
 
13738
            } else { 
-
 
13739
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
13740
            }
-
 
13741
            break;
-
 
13742
          case 2: // VENDOR_ID
-
 
13743
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
13744
              this.vendorId = iprot.readI64();
-
 
13745
              setVendorIdIsSet(true);
-
 
13746
            } else { 
-
 
13747
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
13748
            }
-
 
13749
            break;
-
 
13750
          default:
-
 
13751
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
13752
        }
-
 
13753
        iprot.readFieldEnd();
-
 
13754
      }
-
 
13755
      iprot.readStructEnd();
-
 
13756
      validate();
-
 
13757
    }
-
 
13758
 
-
 
13759
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
13760
      validate();
-
 
13761
 
-
 
13762
      oprot.writeStructBegin(STRUCT_DESC);
-
 
13763
      if (this.saleReturnItems != null) {
-
 
13764
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
-
 
13765
        {
-
 
13766
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
-
 
13767
          for (InventoryItem _iter35 : this.saleReturnItems)
-
 
13768
          {
-
 
13769
            _iter35.write(oprot);
-
 
13770
          }
-
 
13771
          oprot.writeListEnd();
-
 
13772
        }
-
 
13773
        oprot.writeFieldEnd();
-
 
13774
      }
-
 
13775
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
-
 
13776
      oprot.writeI64(this.vendorId);
-
 
13777
      oprot.writeFieldEnd();
-
 
13778
      oprot.writeFieldStop();
-
 
13779
      oprot.writeStructEnd();
-
 
13780
    }
-
 
13781
 
-
 
13782
    @Override
-
 
13783
    public String toString() {
-
 
13784
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
-
 
13785
      boolean first = true;
-
 
13786
 
-
 
13787
      sb.append("saleReturnItems:");
-
 
13788
      if (this.saleReturnItems == null) {
-
 
13789
        sb.append("null");
-
 
13790
      } else {
-
 
13791
        sb.append(this.saleReturnItems);
-
 
13792
      }
-
 
13793
      first = false;
-
 
13794
      if (!first) sb.append(", ");
-
 
13795
      sb.append("vendorId:");
-
 
13796
      sb.append(this.vendorId);
-
 
13797
      first = false;
-
 
13798
      sb.append(")");
-
 
13799
      return sb.toString();
-
 
13800
    }
-
 
13801
 
-
 
13802
    public void validate() throws org.apache.thrift.TException {
-
 
13803
      // check for required fields
-
 
13804
    }
-
 
13805
 
-
 
13806
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
13807
      try {
-
 
13808
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
13809
      } catch (org.apache.thrift.TException te) {
-
 
13810
        throw new java.io.IOException(te);
-
 
13811
      }
-
 
13812
    }
-
 
13813
 
-
 
13814
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
13815
      try {
-
 
13816
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
13817
      } catch (org.apache.thrift.TException te) {
-
 
13818
        throw new java.io.IOException(te);
-
 
13819
      }
-
 
13820
    }
-
 
13821
 
-
 
13822
  }
-
 
13823
 
-
 
13824
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
-
 
13825
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
-
 
13826
 
-
 
13827
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
13828
 
-
 
13829
    private WarehouseServiceException ex; // required
-
 
13830
 
-
 
13831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
13832
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
13833
      EX((short)1, "ex");
-
 
13834
 
-
 
13835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
13836
 
-
 
13837
      static {
-
 
13838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
13839
          byName.put(field.getFieldName(), field);
-
 
13840
        }
-
 
13841
      }
-
 
13842
 
-
 
13843
      /**
-
 
13844
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
13845
       */
-
 
13846
      public static _Fields findByThriftId(int fieldId) {
-
 
13847
        switch(fieldId) {
-
 
13848
          case 1: // EX
-
 
13849
            return EX;
-
 
13850
          default:
-
 
13851
            return null;
-
 
13852
        }
-
 
13853
      }
-
 
13854
 
-
 
13855
      /**
-
 
13856
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
13857
       * if it is not found.
-
 
13858
       */
-
 
13859
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
13860
        _Fields fields = findByThriftId(fieldId);
-
 
13861
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
13862
        return fields;
-
 
13863
      }
-
 
13864
 
-
 
13865
      /**
-
 
13866
       * Find the _Fields constant that matches name, or null if its not found.
-
 
13867
       */
-
 
13868
      public static _Fields findByName(String name) {
-
 
13869
        return byName.get(name);
-
 
13870
      }
-
 
13871
 
-
 
13872
      private final short _thriftId;
-
 
13873
      private final String _fieldName;
-
 
13874
 
-
 
13875
      _Fields(short thriftId, String fieldName) {
-
 
13876
        _thriftId = thriftId;
-
 
13877
        _fieldName = fieldName;
-
 
13878
      }
-
 
13879
 
-
 
13880
      public short getThriftFieldId() {
-
 
13881
        return _thriftId;
-
 
13882
      }
-
 
13883
 
-
 
13884
      public String getFieldName() {
-
 
13885
        return _fieldName;
-
 
13886
      }
-
 
13887
    }
-
 
13888
 
-
 
13889
    // isset id assignments
-
 
13890
 
-
 
13891
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
13892
    static {
-
 
13893
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
13894
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
13895
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
13896
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
13897
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
-
 
13898
    }
-
 
13899
 
-
 
13900
    public scanForPurchaseReturn_result() {
-
 
13901
    }
-
 
13902
 
-
 
13903
    public scanForPurchaseReturn_result(
-
 
13904
      WarehouseServiceException ex)
-
 
13905
    {
-
 
13906
      this();
-
 
13907
      this.ex = ex;
-
 
13908
    }
-
 
13909
 
-
 
13910
    /**
-
 
13911
     * Performs a deep copy on <i>other</i>.
-
 
13912
     */
-
 
13913
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
-
 
13914
      if (other.isSetEx()) {
-
 
13915
        this.ex = new WarehouseServiceException(other.ex);
-
 
13916
      }
-
 
13917
    }
-
 
13918
 
-
 
13919
    public scanForPurchaseReturn_result deepCopy() {
-
 
13920
      return new scanForPurchaseReturn_result(this);
-
 
13921
    }
-
 
13922
 
-
 
13923
    @Override
-
 
13924
    public void clear() {
-
 
13925
      this.ex = null;
-
 
13926
    }
-
 
13927
 
-
 
13928
    public WarehouseServiceException getEx() {
-
 
13929
      return this.ex;
-
 
13930
    }
-
 
13931
 
-
 
13932
    public void setEx(WarehouseServiceException ex) {
-
 
13933
      this.ex = ex;
-
 
13934
    }
-
 
13935
 
-
 
13936
    public void unsetEx() {
-
 
13937
      this.ex = null;
-
 
13938
    }
-
 
13939
 
-
 
13940
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
-
 
13941
    public boolean isSetEx() {
-
 
13942
      return this.ex != null;
-
 
13943
    }
-
 
13944
 
-
 
13945
    public void setExIsSet(boolean value) {
-
 
13946
      if (!value) {
-
 
13947
        this.ex = null;
-
 
13948
      }
-
 
13949
    }
-
 
13950
 
-
 
13951
    public void setFieldValue(_Fields field, Object value) {
-
 
13952
      switch (field) {
-
 
13953
      case EX:
-
 
13954
        if (value == null) {
-
 
13955
          unsetEx();
-
 
13956
        } else {
-
 
13957
          setEx((WarehouseServiceException)value);
-
 
13958
        }
-
 
13959
        break;
-
 
13960
 
-
 
13961
      }
-
 
13962
    }
-
 
13963
 
-
 
13964
    public Object getFieldValue(_Fields field) {
-
 
13965
      switch (field) {
-
 
13966
      case EX:
-
 
13967
        return getEx();
-
 
13968
 
-
 
13969
      }
-
 
13970
      throw new IllegalStateException();
-
 
13971
    }
-
 
13972
 
-
 
13973
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
13974
    public boolean isSet(_Fields field) {
-
 
13975
      if (field == null) {
-
 
13976
        throw new IllegalArgumentException();
-
 
13977
      }
-
 
13978
 
-
 
13979
      switch (field) {
-
 
13980
      case EX:
-
 
13981
        return isSetEx();
-
 
13982
      }
-
 
13983
      throw new IllegalStateException();
-
 
13984
    }
-
 
13985
 
-
 
13986
    @Override
-
 
13987
    public boolean equals(Object that) {
-
 
13988
      if (that == null)
-
 
13989
        return false;
-
 
13990
      if (that instanceof scanForPurchaseReturn_result)
-
 
13991
        return this.equals((scanForPurchaseReturn_result)that);
-
 
13992
      return false;
-
 
13993
    }
-
 
13994
 
-
 
13995
    public boolean equals(scanForPurchaseReturn_result that) {
-
 
13996
      if (that == null)
-
 
13997
        return false;
-
 
13998
 
-
 
13999
      boolean this_present_ex = true && this.isSetEx();
-
 
14000
      boolean that_present_ex = true && that.isSetEx();
-
 
14001
      if (this_present_ex || that_present_ex) {
-
 
14002
        if (!(this_present_ex && that_present_ex))
-
 
14003
          return false;
-
 
14004
        if (!this.ex.equals(that.ex))
-
 
14005
          return false;
-
 
14006
      }
-
 
14007
 
-
 
14008
      return true;
-
 
14009
    }
-
 
14010
 
-
 
14011
    @Override
-
 
14012
    public int hashCode() {
-
 
14013
      return 0;
-
 
14014
    }
-
 
14015
 
-
 
14016
    public int compareTo(scanForPurchaseReturn_result other) {
-
 
14017
      if (!getClass().equals(other.getClass())) {
-
 
14018
        return getClass().getName().compareTo(other.getClass().getName());
-
 
14019
      }
-
 
14020
 
-
 
14021
      int lastComparison = 0;
-
 
14022
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
-
 
14023
 
-
 
14024
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
-
 
14025
      if (lastComparison != 0) {
-
 
14026
        return lastComparison;
-
 
14027
      }
-
 
14028
      if (isSetEx()) {
-
 
14029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
-
 
14030
        if (lastComparison != 0) {
-
 
14031
          return lastComparison;
-
 
14032
        }
-
 
14033
      }
-
 
14034
      return 0;
-
 
14035
    }
-
 
14036
 
-
 
14037
    public _Fields fieldForId(int fieldId) {
-
 
14038
      return _Fields.findByThriftId(fieldId);
-
 
14039
    }
-
 
14040
 
-
 
14041
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
14042
      org.apache.thrift.protocol.TField field;
-
 
14043
      iprot.readStructBegin();
-
 
14044
      while (true)
-
 
14045
      {
-
 
14046
        field = iprot.readFieldBegin();
-
 
14047
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
14048
          break;
-
 
14049
        }
-
 
14050
        switch (field.id) {
-
 
14051
          case 1: // EX
-
 
14052
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
14053
              this.ex = new WarehouseServiceException();
-
 
14054
              this.ex.read(iprot);
-
 
14055
            } else { 
-
 
14056
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
14057
            }
-
 
14058
            break;
-
 
14059
          default:
-
 
14060
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
14061
        }
-
 
14062
        iprot.readFieldEnd();
-
 
14063
      }
-
 
14064
      iprot.readStructEnd();
-
 
14065
      validate();
-
 
14066
    }
-
 
14067
 
-
 
14068
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
14069
      oprot.writeStructBegin(STRUCT_DESC);
-
 
14070
 
-
 
14071
      if (this.isSetEx()) {
-
 
14072
        oprot.writeFieldBegin(EX_FIELD_DESC);
-
 
14073
        this.ex.write(oprot);
-
 
14074
        oprot.writeFieldEnd();
-
 
14075
      }
-
 
14076
      oprot.writeFieldStop();
-
 
14077
      oprot.writeStructEnd();
-
 
14078
    }
-
 
14079
 
-
 
14080
    @Override
-
 
14081
    public String toString() {
-
 
14082
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
-
 
14083
      boolean first = true;
-
 
14084
 
-
 
14085
      sb.append("ex:");
-
 
14086
      if (this.ex == null) {
-
 
14087
        sb.append("null");
-
 
14088
      } else {
-
 
14089
        sb.append(this.ex);
-
 
14090
      }
-
 
14091
      first = false;
-
 
14092
      sb.append(")");
-
 
14093
      return sb.toString();
-
 
14094
    }
13293
 
14095
 
13294
    public void validate() throws org.apache.thrift.TException {
14096
    public void validate() throws org.apache.thrift.TException {
13295
      // check for required fields
14097
      // check for required fields
13296
    }
14098
    }
13297
 
14099