Subversion Repositories SmartDukaan

Rev

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

Rev 6805 Rev 6821
Line 344... Line 344...
344
 
344
 
345
    public double getVatAmountForItem(long itemId, double price) throws org.apache.thrift.TException;
345
    public double getVatAmountForItem(long itemId, double price) throws org.apache.thrift.TException;
346
 
346
 
347
    public List<Item> getAllIgnoredInventoryUpdateItemsList(int offset, int limit) throws org.apache.thrift.TException;
347
    public List<Item> getAllIgnoredInventoryUpdateItemsList(int offset, int limit) throws org.apache.thrift.TException;
348
 
348
 
-
 
349
    public List<Item> getAllAliveItems() throws org.apache.thrift.TException;
-
 
350
 
349
    /**
351
    /**
350
     * This method returns the insurance amount needed to insure the given item for a given quantity.
352
     * This method returns the insurance amount needed to insure the given item for a given quantity.
351
     * 
353
     * 
352
     * @param itemId
354
     * @param itemId
353
     * @param insurerId
355
     * @param insurerId
Line 497... Line 499...
497
 
499
 
498
    public void getVatAmountForItem(long itemId, double price, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVatAmountForItem_call> resultHandler) throws org.apache.thrift.TException;
500
    public void getVatAmountForItem(long itemId, double price, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVatAmountForItem_call> resultHandler) throws org.apache.thrift.TException;
499
 
501
 
500
    public void getAllIgnoredInventoryUpdateItemsList(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllIgnoredInventoryUpdateItemsList_call> resultHandler) throws org.apache.thrift.TException;
502
    public void getAllIgnoredInventoryUpdateItemsList(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllIgnoredInventoryUpdateItemsList_call> resultHandler) throws org.apache.thrift.TException;
501
 
503
 
-
 
504
    public void getAllAliveItems(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAliveItems_call> resultHandler) throws org.apache.thrift.TException;
-
 
505
 
502
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException;
506
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException;
503
 
507
 
504
    public void getInsurer(long insurerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsurer_call> resultHandler) throws org.apache.thrift.TException;
508
    public void getInsurer(long insurerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsurer_call> resultHandler) throws org.apache.thrift.TException;
505
 
509
 
506
  }
510
  }
Line 2236... Line 2240...
2236
        return result.success;
2240
        return result.success;
2237
      }
2241
      }
2238
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllIgnoredInventoryUpdateItemsList failed: unknown result");
2242
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllIgnoredInventoryUpdateItemsList failed: unknown result");
2239
    }
2243
    }
2240
 
2244
 
-
 
2245
    public List<Item> getAllAliveItems() throws org.apache.thrift.TException
-
 
2246
    {
-
 
2247
      send_getAllAliveItems();
-
 
2248
      return recv_getAllAliveItems();
-
 
2249
    }
-
 
2250
 
-
 
2251
    public void send_getAllAliveItems() throws org.apache.thrift.TException
-
 
2252
    {
-
 
2253
      getAllAliveItems_args args = new getAllAliveItems_args();
-
 
2254
      sendBase("getAllAliveItems", args);
-
 
2255
    }
-
 
2256
 
-
 
2257
    public List<Item> recv_getAllAliveItems() throws org.apache.thrift.TException
-
 
2258
    {
-
 
2259
      getAllAliveItems_result result = new getAllAliveItems_result();
-
 
2260
      receiveBase(result, "getAllAliveItems");
-
 
2261
      if (result.isSetSuccess()) {
-
 
2262
        return result.success;
-
 
2263
      }
-
 
2264
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAliveItems failed: unknown result");
-
 
2265
    }
-
 
2266
 
2241
    public long getInsuranceAmount(long itemId, long insurerId, long quantity) throws org.apache.thrift.TException
2267
    public long getInsuranceAmount(long itemId, long insurerId, long quantity) throws org.apache.thrift.TException
2242
    {
2268
    {
2243
      send_getInsuranceAmount(itemId, insurerId, quantity);
2269
      send_getInsuranceAmount(itemId, insurerId, quantity);
2244
      return recv_getInsuranceAmount();
2270
      return recv_getInsuranceAmount();
2245
    }
2271
    }
Line 4609... Line 4635...
4609
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4635
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4610
        return (new Client(prot)).recv_getAllIgnoredInventoryUpdateItemsList();
4636
        return (new Client(prot)).recv_getAllIgnoredInventoryUpdateItemsList();
4611
      }
4637
      }
4612
    }
4638
    }
4613
 
4639
 
-
 
4640
    public void getAllAliveItems(org.apache.thrift.async.AsyncMethodCallback<getAllAliveItems_call> resultHandler) throws org.apache.thrift.TException {
-
 
4641
      checkReady();
-
 
4642
      getAllAliveItems_call method_call = new getAllAliveItems_call(resultHandler, this, ___protocolFactory, ___transport);
-
 
4643
      this.___currentMethod = method_call;
-
 
4644
      ___manager.call(method_call);
-
 
4645
    }
-
 
4646
 
-
 
4647
    public static class getAllAliveItems_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
4648
      public getAllAliveItems_call(org.apache.thrift.async.AsyncMethodCallback<getAllAliveItems_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 {
-
 
4649
        super(client, protocolFactory, transport, resultHandler, false);
-
 
4650
      }
-
 
4651
 
-
 
4652
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
4653
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAliveItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
4654
        getAllAliveItems_args args = new getAllAliveItems_args();
-
 
4655
        args.write(prot);
-
 
4656
        prot.writeMessageEnd();
-
 
4657
      }
-
 
4658
 
-
 
4659
      public List<Item> getResult() throws org.apache.thrift.TException {
-
 
4660
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
4661
          throw new IllegalStateException("Method call not finished!");
-
 
4662
        }
-
 
4663
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
4664
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
4665
        return (new Client(prot)).recv_getAllAliveItems();
-
 
4666
      }
-
 
4667
    }
-
 
4668
 
4614
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException {
4669
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException {
4615
      checkReady();
4670
      checkReady();
4616
      getInsuranceAmount_call method_call = new getInsuranceAmount_call(itemId, insurerId, quantity, resultHandler, this, ___protocolFactory, ___transport);
4671
      getInsuranceAmount_call method_call = new getInsuranceAmount_call(itemId, insurerId, quantity, resultHandler, this, ___protocolFactory, ___transport);
4617
      this.___currentMethod = method_call;
4672
      this.___currentMethod = method_call;
4618
      ___manager.call(method_call);
4673
      ___manager.call(method_call);
Line 4761... Line 4816...
4761
      processMap.put("getAllItemVouchers", new getAllItemVouchers());
4816
      processMap.put("getAllItemVouchers", new getAllItemVouchers());
4762
      processMap.put("isValidCatalogItemId", new isValidCatalogItemId());
4817
      processMap.put("isValidCatalogItemId", new isValidCatalogItemId());
4763
      processMap.put("getVatPercentageForItem", new getVatPercentageForItem());
4818
      processMap.put("getVatPercentageForItem", new getVatPercentageForItem());
4764
      processMap.put("getVatAmountForItem", new getVatAmountForItem());
4819
      processMap.put("getVatAmountForItem", new getVatAmountForItem());
4765
      processMap.put("getAllIgnoredInventoryUpdateItemsList", new getAllIgnoredInventoryUpdateItemsList());
4820
      processMap.put("getAllIgnoredInventoryUpdateItemsList", new getAllIgnoredInventoryUpdateItemsList());
-
 
4821
      processMap.put("getAllAliveItems", new getAllAliveItems());
4766
      processMap.put("getInsuranceAmount", new getInsuranceAmount());
4822
      processMap.put("getInsuranceAmount", new getInsuranceAmount());
4767
      processMap.put("getInsurer", new getInsurer());
4823
      processMap.put("getInsurer", new getInsurer());
4768
      return processMap;
4824
      return processMap;
4769
    }
4825
    }
4770
 
4826
 
Line 6043... Line 6099...
6043
        result.success = iface.getAllIgnoredInventoryUpdateItemsList(args.offset, args.limit);
6099
        result.success = iface.getAllIgnoredInventoryUpdateItemsList(args.offset, args.limit);
6044
        return result;
6100
        return result;
6045
      }
6101
      }
6046
    }
6102
    }
6047
 
6103
 
-
 
6104
    private static class getAllAliveItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAliveItems_args> {
-
 
6105
      public getAllAliveItems() {
-
 
6106
        super("getAllAliveItems");
-
 
6107
      }
-
 
6108
 
-
 
6109
      protected getAllAliveItems_args getEmptyArgsInstance() {
-
 
6110
        return new getAllAliveItems_args();
-
 
6111
      }
-
 
6112
 
-
 
6113
      protected getAllAliveItems_result getResult(I iface, getAllAliveItems_args args) throws org.apache.thrift.TException {
-
 
6114
        getAllAliveItems_result result = new getAllAliveItems_result();
-
 
6115
        result.success = iface.getAllAliveItems();
-
 
6116
        return result;
-
 
6117
      }
-
 
6118
    }
-
 
6119
 
6048
    private static class getInsuranceAmount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInsuranceAmount_args> {
6120
    private static class getInsuranceAmount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInsuranceAmount_args> {
6049
      public getInsuranceAmount() {
6121
      public getInsuranceAmount() {
6050
        super("getInsuranceAmount");
6122
        super("getInsuranceAmount");
6051
      }
6123
      }
6052
 
6124
 
Line 53256... Line 53328...
53256
      boolean first = true;
53328
      boolean first = true;
53257
 
53329
 
53258
      sb.append("success:");
53330
      sb.append("success:");
53259
      if (this.success == null) {
53331
      if (this.success == null) {
53260
        sb.append("null");
53332
        sb.append("null");
-
 
53333
      } else {
-
 
53334
        sb.append(this.success);
-
 
53335
      }
-
 
53336
      first = false;
-
 
53337
      sb.append(")");
-
 
53338
      return sb.toString();
-
 
53339
    }
-
 
53340
 
-
 
53341
    public void validate() throws org.apache.thrift.TException {
-
 
53342
      // check for required fields
-
 
53343
    }
-
 
53344
 
-
 
53345
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
53346
      try {
-
 
53347
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
53348
      } catch (org.apache.thrift.TException te) {
-
 
53349
        throw new java.io.IOException(te);
-
 
53350
      }
-
 
53351
    }
-
 
53352
 
-
 
53353
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
53354
      try {
-
 
53355
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
53356
      } catch (org.apache.thrift.TException te) {
-
 
53357
        throw new java.io.IOException(te);
-
 
53358
      }
-
 
53359
    }
-
 
53360
 
-
 
53361
  }
-
 
53362
 
-
 
53363
  public static class getAllAliveItems_args implements org.apache.thrift.TBase<getAllAliveItems_args, getAllAliveItems_args._Fields>, java.io.Serializable, Cloneable   {
-
 
53364
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAliveItems_args");
-
 
53365
 
-
 
53366
 
-
 
53367
 
-
 
53368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
53369
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
53370
;
-
 
53371
 
-
 
53372
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
53373
 
-
 
53374
      static {
-
 
53375
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
53376
          byName.put(field.getFieldName(), field);
-
 
53377
        }
-
 
53378
      }
-
 
53379
 
-
 
53380
      /**
-
 
53381
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
53382
       */
-
 
53383
      public static _Fields findByThriftId(int fieldId) {
-
 
53384
        switch(fieldId) {
-
 
53385
          default:
-
 
53386
            return null;
-
 
53387
        }
-
 
53388
      }
-
 
53389
 
-
 
53390
      /**
-
 
53391
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
53392
       * if it is not found.
-
 
53393
       */
-
 
53394
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
53395
        _Fields fields = findByThriftId(fieldId);
-
 
53396
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
53397
        return fields;
-
 
53398
      }
-
 
53399
 
-
 
53400
      /**
-
 
53401
       * Find the _Fields constant that matches name, or null if its not found.
-
 
53402
       */
-
 
53403
      public static _Fields findByName(String name) {
-
 
53404
        return byName.get(name);
-
 
53405
      }
-
 
53406
 
-
 
53407
      private final short _thriftId;
-
 
53408
      private final String _fieldName;
-
 
53409
 
-
 
53410
      _Fields(short thriftId, String fieldName) {
-
 
53411
        _thriftId = thriftId;
-
 
53412
        _fieldName = fieldName;
-
 
53413
      }
-
 
53414
 
-
 
53415
      public short getThriftFieldId() {
-
 
53416
        return _thriftId;
-
 
53417
      }
-
 
53418
 
-
 
53419
      public String getFieldName() {
-
 
53420
        return _fieldName;
-
 
53421
      }
-
 
53422
    }
-
 
53423
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
53424
    static {
-
 
53425
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
53426
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
53427
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAliveItems_args.class, metaDataMap);
-
 
53428
    }
-
 
53429
 
-
 
53430
    public getAllAliveItems_args() {
-
 
53431
    }
-
 
53432
 
-
 
53433
    /**
-
 
53434
     * Performs a deep copy on <i>other</i>.
-
 
53435
     */
-
 
53436
    public getAllAliveItems_args(getAllAliveItems_args other) {
-
 
53437
    }
-
 
53438
 
-
 
53439
    public getAllAliveItems_args deepCopy() {
-
 
53440
      return new getAllAliveItems_args(this);
-
 
53441
    }
-
 
53442
 
-
 
53443
    @Override
-
 
53444
    public void clear() {
-
 
53445
    }
-
 
53446
 
-
 
53447
    public void setFieldValue(_Fields field, Object value) {
-
 
53448
      switch (field) {
-
 
53449
      }
-
 
53450
    }
-
 
53451
 
-
 
53452
    public Object getFieldValue(_Fields field) {
-
 
53453
      switch (field) {
-
 
53454
      }
-
 
53455
      throw new IllegalStateException();
-
 
53456
    }
-
 
53457
 
-
 
53458
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
53459
    public boolean isSet(_Fields field) {
-
 
53460
      if (field == null) {
-
 
53461
        throw new IllegalArgumentException();
-
 
53462
      }
-
 
53463
 
-
 
53464
      switch (field) {
-
 
53465
      }
-
 
53466
      throw new IllegalStateException();
-
 
53467
    }
-
 
53468
 
-
 
53469
    @Override
-
 
53470
    public boolean equals(Object that) {
-
 
53471
      if (that == null)
-
 
53472
        return false;
-
 
53473
      if (that instanceof getAllAliveItems_args)
-
 
53474
        return this.equals((getAllAliveItems_args)that);
-
 
53475
      return false;
-
 
53476
    }
-
 
53477
 
-
 
53478
    public boolean equals(getAllAliveItems_args that) {
-
 
53479
      if (that == null)
-
 
53480
        return false;
-
 
53481
 
-
 
53482
      return true;
-
 
53483
    }
-
 
53484
 
-
 
53485
    @Override
-
 
53486
    public int hashCode() {
-
 
53487
      return 0;
-
 
53488
    }
-
 
53489
 
-
 
53490
    public int compareTo(getAllAliveItems_args other) {
-
 
53491
      if (!getClass().equals(other.getClass())) {
-
 
53492
        return getClass().getName().compareTo(other.getClass().getName());
-
 
53493
      }
-
 
53494
 
-
 
53495
      int lastComparison = 0;
-
 
53496
      getAllAliveItems_args typedOther = (getAllAliveItems_args)other;
-
 
53497
 
-
 
53498
      return 0;
-
 
53499
    }
-
 
53500
 
-
 
53501
    public _Fields fieldForId(int fieldId) {
-
 
53502
      return _Fields.findByThriftId(fieldId);
-
 
53503
    }
-
 
53504
 
-
 
53505
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
53506
      org.apache.thrift.protocol.TField field;
-
 
53507
      iprot.readStructBegin();
-
 
53508
      while (true)
-
 
53509
      {
-
 
53510
        field = iprot.readFieldBegin();
-
 
53511
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
53512
          break;
-
 
53513
        }
-
 
53514
        switch (field.id) {
-
 
53515
          default:
-
 
53516
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53517
        }
-
 
53518
        iprot.readFieldEnd();
-
 
53519
      }
-
 
53520
      iprot.readStructEnd();
-
 
53521
      validate();
-
 
53522
    }
-
 
53523
 
-
 
53524
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
53525
      validate();
-
 
53526
 
-
 
53527
      oprot.writeStructBegin(STRUCT_DESC);
-
 
53528
      oprot.writeFieldStop();
-
 
53529
      oprot.writeStructEnd();
-
 
53530
    }
-
 
53531
 
-
 
53532
    @Override
-
 
53533
    public String toString() {
-
 
53534
      StringBuilder sb = new StringBuilder("getAllAliveItems_args(");
-
 
53535
      boolean first = true;
-
 
53536
 
-
 
53537
      sb.append(")");
-
 
53538
      return sb.toString();
-
 
53539
    }
-
 
53540
 
-
 
53541
    public void validate() throws org.apache.thrift.TException {
-
 
53542
      // check for required fields
-
 
53543
    }
-
 
53544
 
-
 
53545
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
53546
      try {
-
 
53547
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
53548
      } catch (org.apache.thrift.TException te) {
-
 
53549
        throw new java.io.IOException(te);
-
 
53550
      }
-
 
53551
    }
-
 
53552
 
-
 
53553
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
53554
      try {
-
 
53555
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
53556
      } catch (org.apache.thrift.TException te) {
-
 
53557
        throw new java.io.IOException(te);
-
 
53558
      }
-
 
53559
    }
-
 
53560
 
-
 
53561
  }
-
 
53562
 
-
 
53563
  public static class getAllAliveItems_result implements org.apache.thrift.TBase<getAllAliveItems_result, getAllAliveItems_result._Fields>, java.io.Serializable, Cloneable   {
-
 
53564
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAliveItems_result");
-
 
53565
 
-
 
53566
    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);
-
 
53567
 
-
 
53568
    private List<Item> success; // required
-
 
53569
 
-
 
53570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
53571
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
53572
      SUCCESS((short)0, "success");
-
 
53573
 
-
 
53574
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
53575
 
-
 
53576
      static {
-
 
53577
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
53578
          byName.put(field.getFieldName(), field);
-
 
53579
        }
-
 
53580
      }
-
 
53581
 
-
 
53582
      /**
-
 
53583
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
53584
       */
-
 
53585
      public static _Fields findByThriftId(int fieldId) {
-
 
53586
        switch(fieldId) {
-
 
53587
          case 0: // SUCCESS
-
 
53588
            return SUCCESS;
-
 
53589
          default:
-
 
53590
            return null;
-
 
53591
        }
-
 
53592
      }
-
 
53593
 
-
 
53594
      /**
-
 
53595
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
53596
       * if it is not found.
-
 
53597
       */
-
 
53598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
53599
        _Fields fields = findByThriftId(fieldId);
-
 
53600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
53601
        return fields;
-
 
53602
      }
-
 
53603
 
-
 
53604
      /**
-
 
53605
       * Find the _Fields constant that matches name, or null if its not found.
-
 
53606
       */
-
 
53607
      public static _Fields findByName(String name) {
-
 
53608
        return byName.get(name);
-
 
53609
      }
-
 
53610
 
-
 
53611
      private final short _thriftId;
-
 
53612
      private final String _fieldName;
-
 
53613
 
-
 
53614
      _Fields(short thriftId, String fieldName) {
-
 
53615
        _thriftId = thriftId;
-
 
53616
        _fieldName = fieldName;
-
 
53617
      }
-
 
53618
 
-
 
53619
      public short getThriftFieldId() {
-
 
53620
        return _thriftId;
-
 
53621
      }
-
 
53622
 
-
 
53623
      public String getFieldName() {
-
 
53624
        return _fieldName;
-
 
53625
      }
-
 
53626
    }
-
 
53627
 
-
 
53628
    // isset id assignments
-
 
53629
 
-
 
53630
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
53631
    static {
-
 
53632
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
53633
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
53634
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
53635
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Item.class))));
-
 
53636
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
53637
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAliveItems_result.class, metaDataMap);
-
 
53638
    }
-
 
53639
 
-
 
53640
    public getAllAliveItems_result() {
-
 
53641
    }
-
 
53642
 
-
 
53643
    public getAllAliveItems_result(
-
 
53644
      List<Item> success)
-
 
53645
    {
-
 
53646
      this();
-
 
53647
      this.success = success;
-
 
53648
    }
-
 
53649
 
-
 
53650
    /**
-
 
53651
     * Performs a deep copy on <i>other</i>.
-
 
53652
     */
-
 
53653
    public getAllAliveItems_result(getAllAliveItems_result other) {
-
 
53654
      if (other.isSetSuccess()) {
-
 
53655
        List<Item> __this__success = new ArrayList<Item>();
-
 
53656
        for (Item other_element : other.success) {
-
 
53657
          __this__success.add(new Item(other_element));
-
 
53658
        }
-
 
53659
        this.success = __this__success;
-
 
53660
      }
-
 
53661
    }
-
 
53662
 
-
 
53663
    public getAllAliveItems_result deepCopy() {
-
 
53664
      return new getAllAliveItems_result(this);
-
 
53665
    }
-
 
53666
 
-
 
53667
    @Override
-
 
53668
    public void clear() {
-
 
53669
      this.success = null;
-
 
53670
    }
-
 
53671
 
-
 
53672
    public int getSuccessSize() {
-
 
53673
      return (this.success == null) ? 0 : this.success.size();
-
 
53674
    }
-
 
53675
 
-
 
53676
    public java.util.Iterator<Item> getSuccessIterator() {
-
 
53677
      return (this.success == null) ? null : this.success.iterator();
-
 
53678
    }
-
 
53679
 
-
 
53680
    public void addToSuccess(Item elem) {
-
 
53681
      if (this.success == null) {
-
 
53682
        this.success = new ArrayList<Item>();
-
 
53683
      }
-
 
53684
      this.success.add(elem);
-
 
53685
    }
-
 
53686
 
-
 
53687
    public List<Item> getSuccess() {
-
 
53688
      return this.success;
-
 
53689
    }
-
 
53690
 
-
 
53691
    public void setSuccess(List<Item> success) {
-
 
53692
      this.success = success;
-
 
53693
    }
-
 
53694
 
-
 
53695
    public void unsetSuccess() {
-
 
53696
      this.success = null;
-
 
53697
    }
-
 
53698
 
-
 
53699
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
53700
    public boolean isSetSuccess() {
-
 
53701
      return this.success != null;
-
 
53702
    }
-
 
53703
 
-
 
53704
    public void setSuccessIsSet(boolean value) {
-
 
53705
      if (!value) {
-
 
53706
        this.success = null;
-
 
53707
      }
-
 
53708
    }
-
 
53709
 
-
 
53710
    public void setFieldValue(_Fields field, Object value) {
-
 
53711
      switch (field) {
-
 
53712
      case SUCCESS:
-
 
53713
        if (value == null) {
-
 
53714
          unsetSuccess();
-
 
53715
        } else {
-
 
53716
          setSuccess((List<Item>)value);
-
 
53717
        }
-
 
53718
        break;
-
 
53719
 
-
 
53720
      }
-
 
53721
    }
-
 
53722
 
-
 
53723
    public Object getFieldValue(_Fields field) {
-
 
53724
      switch (field) {
-
 
53725
      case SUCCESS:
-
 
53726
        return getSuccess();
-
 
53727
 
-
 
53728
      }
-
 
53729
      throw new IllegalStateException();
-
 
53730
    }
-
 
53731
 
-
 
53732
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
53733
    public boolean isSet(_Fields field) {
-
 
53734
      if (field == null) {
-
 
53735
        throw new IllegalArgumentException();
-
 
53736
      }
-
 
53737
 
-
 
53738
      switch (field) {
-
 
53739
      case SUCCESS:
-
 
53740
        return isSetSuccess();
-
 
53741
      }
-
 
53742
      throw new IllegalStateException();
-
 
53743
    }
-
 
53744
 
-
 
53745
    @Override
-
 
53746
    public boolean equals(Object that) {
-
 
53747
      if (that == null)
-
 
53748
        return false;
-
 
53749
      if (that instanceof getAllAliveItems_result)
-
 
53750
        return this.equals((getAllAliveItems_result)that);
-
 
53751
      return false;
-
 
53752
    }
-
 
53753
 
-
 
53754
    public boolean equals(getAllAliveItems_result that) {
-
 
53755
      if (that == null)
-
 
53756
        return false;
-
 
53757
 
-
 
53758
      boolean this_present_success = true && this.isSetSuccess();
-
 
53759
      boolean that_present_success = true && that.isSetSuccess();
-
 
53760
      if (this_present_success || that_present_success) {
-
 
53761
        if (!(this_present_success && that_present_success))
-
 
53762
          return false;
-
 
53763
        if (!this.success.equals(that.success))
-
 
53764
          return false;
-
 
53765
      }
-
 
53766
 
-
 
53767
      return true;
-
 
53768
    }
-
 
53769
 
-
 
53770
    @Override
-
 
53771
    public int hashCode() {
-
 
53772
      return 0;
-
 
53773
    }
-
 
53774
 
-
 
53775
    public int compareTo(getAllAliveItems_result other) {
-
 
53776
      if (!getClass().equals(other.getClass())) {
-
 
53777
        return getClass().getName().compareTo(other.getClass().getName());
-
 
53778
      }
-
 
53779
 
-
 
53780
      int lastComparison = 0;
-
 
53781
      getAllAliveItems_result typedOther = (getAllAliveItems_result)other;
-
 
53782
 
-
 
53783
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
53784
      if (lastComparison != 0) {
-
 
53785
        return lastComparison;
-
 
53786
      }
-
 
53787
      if (isSetSuccess()) {
-
 
53788
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
53789
        if (lastComparison != 0) {
-
 
53790
          return lastComparison;
-
 
53791
        }
-
 
53792
      }
-
 
53793
      return 0;
-
 
53794
    }
-
 
53795
 
-
 
53796
    public _Fields fieldForId(int fieldId) {
-
 
53797
      return _Fields.findByThriftId(fieldId);
-
 
53798
    }
-
 
53799
 
-
 
53800
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
53801
      org.apache.thrift.protocol.TField field;
-
 
53802
      iprot.readStructBegin();
-
 
53803
      while (true)
-
 
53804
      {
-
 
53805
        field = iprot.readFieldBegin();
-
 
53806
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
53807
          break;
-
 
53808
        }
-
 
53809
        switch (field.id) {
-
 
53810
          case 0: // SUCCESS
-
 
53811
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
53812
              {
-
 
53813
                org.apache.thrift.protocol.TList _list145 = iprot.readListBegin();
-
 
53814
                this.success = new ArrayList<Item>(_list145.size);
-
 
53815
                for (int _i146 = 0; _i146 < _list145.size; ++_i146)
-
 
53816
                {
-
 
53817
                  Item _elem147; // required
-
 
53818
                  _elem147 = new Item();
-
 
53819
                  _elem147.read(iprot);
-
 
53820
                  this.success.add(_elem147);
-
 
53821
                }
-
 
53822
                iprot.readListEnd();
-
 
53823
              }
-
 
53824
            } else { 
-
 
53825
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53826
            }
-
 
53827
            break;
-
 
53828
          default:
-
 
53829
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
53830
        }
-
 
53831
        iprot.readFieldEnd();
-
 
53832
      }
-
 
53833
      iprot.readStructEnd();
-
 
53834
      validate();
-
 
53835
    }
-
 
53836
 
-
 
53837
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
53838
      oprot.writeStructBegin(STRUCT_DESC);
-
 
53839
 
-
 
53840
      if (this.isSetSuccess()) {
-
 
53841
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
53842
        {
-
 
53843
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
53844
          for (Item _iter148 : this.success)
-
 
53845
          {
-
 
53846
            _iter148.write(oprot);
-
 
53847
          }
-
 
53848
          oprot.writeListEnd();
-
 
53849
        }
-
 
53850
        oprot.writeFieldEnd();
-
 
53851
      }
-
 
53852
      oprot.writeFieldStop();
-
 
53853
      oprot.writeStructEnd();
-
 
53854
    }
-
 
53855
 
-
 
53856
    @Override
-
 
53857
    public String toString() {
-
 
53858
      StringBuilder sb = new StringBuilder("getAllAliveItems_result(");
-
 
53859
      boolean first = true;
-
 
53860
 
-
 
53861
      sb.append("success:");
-
 
53862
      if (this.success == null) {
-
 
53863
        sb.append("null");
53261
      } else {
53864
      } else {
53262
        sb.append(this.success);
53865
        sb.append(this.success);
53263
      }
53866
      }
53264
      first = false;
53867
      first = false;
53265
      sb.append(")");
53868
      sb.append(")");