Subversion Repositories SmartDukaan

Rev

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

Rev 6821 Rev 6838
Line 357... Line 357...
357
     */
357
     */
358
    public long getInsuranceAmount(long itemId, long insurerId, long quantity) throws org.apache.thrift.TException;
358
    public long getInsuranceAmount(long itemId, long insurerId, long quantity) throws org.apache.thrift.TException;
359
 
359
 
360
    public Insurer getInsurer(long insurerId) throws org.apache.thrift.TException;
360
    public Insurer getInsurer(long insurerId) throws org.apache.thrift.TException;
361
 
361
 
-
 
362
    public List<Insurer> getAllInsurers() throws org.apache.thrift.TException;
-
 
363
 
362
  }
364
  }
363
 
365
 
364
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
366
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
365
 
367
 
366
    public void addItem(Item item, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItem_call> resultHandler) throws org.apache.thrift.TException;
368
    public void addItem(Item item, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItem_call> resultHandler) throws org.apache.thrift.TException;
Line 505... Line 507...
505
 
507
 
506
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException;
508
    public void getInsuranceAmount(long itemId, long insurerId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsuranceAmount_call> resultHandler) throws org.apache.thrift.TException;
507
 
509
 
508
    public void getInsurer(long insurerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsurer_call> resultHandler) throws org.apache.thrift.TException;
510
    public void getInsurer(long insurerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInsurer_call> resultHandler) throws org.apache.thrift.TException;
509
 
511
 
-
 
512
    public void getAllInsurers(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllInsurers_call> resultHandler) throws org.apache.thrift.TException;
-
 
513
 
510
  }
514
  }
511
 
515
 
512
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
516
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
513
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
517
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
514
      public Factory() {}
518
      public Factory() {}
Line 2310... Line 2314...
2310
        return result.success;
2314
        return result.success;
2311
      }
2315
      }
2312
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInsurer failed: unknown result");
2316
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInsurer failed: unknown result");
2313
    }
2317
    }
2314
 
2318
 
-
 
2319
    public List<Insurer> getAllInsurers() throws org.apache.thrift.TException
-
 
2320
    {
-
 
2321
      send_getAllInsurers();
-
 
2322
      return recv_getAllInsurers();
-
 
2323
    }
-
 
2324
 
-
 
2325
    public void send_getAllInsurers() throws org.apache.thrift.TException
-
 
2326
    {
-
 
2327
      getAllInsurers_args args = new getAllInsurers_args();
-
 
2328
      sendBase("getAllInsurers", args);
-
 
2329
    }
-
 
2330
 
-
 
2331
    public List<Insurer> recv_getAllInsurers() throws org.apache.thrift.TException
-
 
2332
    {
-
 
2333
      getAllInsurers_result result = new getAllInsurers_result();
-
 
2334
      receiveBase(result, "getAllInsurers");
-
 
2335
      if (result.isSetSuccess()) {
-
 
2336
        return result.success;
-
 
2337
      }
-
 
2338
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllInsurers failed: unknown result");
-
 
2339
    }
-
 
2340
 
2315
  }
2341
  }
2316
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2342
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
2317
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2343
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
2318
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2344
      private org.apache.thrift.async.TAsyncClientManager clientManager;
2319
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
2345
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 4734... Line 4760...
4734
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4760
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4735
        return (new Client(prot)).recv_getInsurer();
4761
        return (new Client(prot)).recv_getInsurer();
4736
      }
4762
      }
4737
    }
4763
    }
4738
 
4764
 
-
 
4765
    public void getAllInsurers(org.apache.thrift.async.AsyncMethodCallback<getAllInsurers_call> resultHandler) throws org.apache.thrift.TException {
-
 
4766
      checkReady();
-
 
4767
      getAllInsurers_call method_call = new getAllInsurers_call(resultHandler, this, ___protocolFactory, ___transport);
-
 
4768
      this.___currentMethod = method_call;
-
 
4769
      ___manager.call(method_call);
-
 
4770
    }
-
 
4771
 
-
 
4772
    public static class getAllInsurers_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
4773
      public getAllInsurers_call(org.apache.thrift.async.AsyncMethodCallback<getAllInsurers_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 {
-
 
4774
        super(client, protocolFactory, transport, resultHandler, false);
-
 
4775
      }
-
 
4776
 
-
 
4777
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
4778
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllInsurers", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
4779
        getAllInsurers_args args = new getAllInsurers_args();
-
 
4780
        args.write(prot);
-
 
4781
        prot.writeMessageEnd();
-
 
4782
      }
-
 
4783
 
-
 
4784
      public List<Insurer> getResult() throws org.apache.thrift.TException {
-
 
4785
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
4786
          throw new IllegalStateException("Method call not finished!");
-
 
4787
        }
-
 
4788
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
4789
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
4790
        return (new Client(prot)).recv_getAllInsurers();
-
 
4791
      }
-
 
4792
    }
-
 
4793
 
4739
  }
4794
  }
4740
 
4795
 
4741
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4796
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
4742
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4797
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
4743
    public Processor(I iface) {
4798
    public Processor(I iface) {
Line 4819... Line 4874...
4819
      processMap.put("getVatAmountForItem", new getVatAmountForItem());
4874
      processMap.put("getVatAmountForItem", new getVatAmountForItem());
4820
      processMap.put("getAllIgnoredInventoryUpdateItemsList", new getAllIgnoredInventoryUpdateItemsList());
4875
      processMap.put("getAllIgnoredInventoryUpdateItemsList", new getAllIgnoredInventoryUpdateItemsList());
4821
      processMap.put("getAllAliveItems", new getAllAliveItems());
4876
      processMap.put("getAllAliveItems", new getAllAliveItems());
4822
      processMap.put("getInsuranceAmount", new getInsuranceAmount());
4877
      processMap.put("getInsuranceAmount", new getInsuranceAmount());
4823
      processMap.put("getInsurer", new getInsurer());
4878
      processMap.put("getInsurer", new getInsurer());
-
 
4879
      processMap.put("getAllInsurers", new getAllInsurers());
4824
      return processMap;
4880
      return processMap;
4825
    }
4881
    }
4826
 
4882
 
4827
    private static class addItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItem_args> {
4883
    private static class addItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItem_args> {
4828
      public addItem() {
4884
      public addItem() {
Line 6148... Line 6204...
6148
        result.success = iface.getInsurer(args.insurerId);
6204
        result.success = iface.getInsurer(args.insurerId);
6149
        return result;
6205
        return result;
6150
      }
6206
      }
6151
    }
6207
    }
6152
 
6208
 
-
 
6209
    private static class getAllInsurers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllInsurers_args> {
-
 
6210
      public getAllInsurers() {
-
 
6211
        super("getAllInsurers");
-
 
6212
      }
-
 
6213
 
-
 
6214
      protected getAllInsurers_args getEmptyArgsInstance() {
-
 
6215
        return new getAllInsurers_args();
-
 
6216
      }
-
 
6217
 
-
 
6218
      protected getAllInsurers_result getResult(I iface, getAllInsurers_args args) throws org.apache.thrift.TException {
-
 
6219
        getAllInsurers_result result = new getAllInsurers_result();
-
 
6220
        result.success = iface.getAllInsurers();
-
 
6221
        return result;
-
 
6222
      }
-
 
6223
    }
-
 
6224
 
6153
  }
6225
  }
6154
 
6226
 
6155
  public static class addItem_args implements org.apache.thrift.TBase<addItem_args, addItem_args._Fields>, java.io.Serializable, Cloneable   {
6227
  public static class addItem_args implements org.apache.thrift.TBase<addItem_args, addItem_args._Fields>, java.io.Serializable, Cloneable   {
6156
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItem_args");
6228
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItem_args");
6157
 
6229
 
Line 51007... Line 51079...
51007
      }
51079
      }
51008
    }
51080
    }
51009
 
51081
 
51010
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
51082
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
51011
      try {
51083
      try {
51012
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
51013
        __isset_bit_vector = new BitSet(1);
-
 
51014
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
51084
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
51015
      } catch (org.apache.thrift.TException te) {
51085
      } catch (org.apache.thrift.TException te) {
51016
        throw new java.io.IOException(te);
51086
        throw new java.io.IOException(te);
51017
      }
51087
      }
51018
    }
51088
    }
Line 55198... Line 55268...
55198
      boolean first = true;
55268
      boolean first = true;
55199
 
55269
 
55200
      sb.append("success:");
55270
      sb.append("success:");
55201
      if (this.success == null) {
55271
      if (this.success == null) {
55202
        sb.append("null");
55272
        sb.append("null");
-
 
55273
      } else {
-
 
55274
        sb.append(this.success);
-
 
55275
      }
-
 
55276
      first = false;
-
 
55277
      sb.append(")");
-
 
55278
      return sb.toString();
-
 
55279
    }
-
 
55280
 
-
 
55281
    public void validate() throws org.apache.thrift.TException {
-
 
55282
      // check for required fields
-
 
55283
    }
-
 
55284
 
-
 
55285
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
55286
      try {
-
 
55287
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
55288
      } catch (org.apache.thrift.TException te) {
-
 
55289
        throw new java.io.IOException(te);
-
 
55290
      }
-
 
55291
    }
-
 
55292
 
-
 
55293
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
55294
      try {
-
 
55295
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
55296
      } catch (org.apache.thrift.TException te) {
-
 
55297
        throw new java.io.IOException(te);
-
 
55298
      }
-
 
55299
    }
-
 
55300
 
-
 
55301
  }
-
 
55302
 
-
 
55303
  public static class getAllInsurers_args implements org.apache.thrift.TBase<getAllInsurers_args, getAllInsurers_args._Fields>, java.io.Serializable, Cloneable   {
-
 
55304
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllInsurers_args");
-
 
55305
 
-
 
55306
 
-
 
55307
 
-
 
55308
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
55309
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
55310
;
-
 
55311
 
-
 
55312
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
55313
 
-
 
55314
      static {
-
 
55315
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
55316
          byName.put(field.getFieldName(), field);
-
 
55317
        }
-
 
55318
      }
-
 
55319
 
-
 
55320
      /**
-
 
55321
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
55322
       */
-
 
55323
      public static _Fields findByThriftId(int fieldId) {
-
 
55324
        switch(fieldId) {
-
 
55325
          default:
-
 
55326
            return null;
-
 
55327
        }
-
 
55328
      }
-
 
55329
 
-
 
55330
      /**
-
 
55331
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
55332
       * if it is not found.
-
 
55333
       */
-
 
55334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
55335
        _Fields fields = findByThriftId(fieldId);
-
 
55336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
55337
        return fields;
-
 
55338
      }
-
 
55339
 
-
 
55340
      /**
-
 
55341
       * Find the _Fields constant that matches name, or null if its not found.
-
 
55342
       */
-
 
55343
      public static _Fields findByName(String name) {
-
 
55344
        return byName.get(name);
-
 
55345
      }
-
 
55346
 
-
 
55347
      private final short _thriftId;
-
 
55348
      private final String _fieldName;
-
 
55349
 
-
 
55350
      _Fields(short thriftId, String fieldName) {
-
 
55351
        _thriftId = thriftId;
-
 
55352
        _fieldName = fieldName;
-
 
55353
      }
-
 
55354
 
-
 
55355
      public short getThriftFieldId() {
-
 
55356
        return _thriftId;
-
 
55357
      }
-
 
55358
 
-
 
55359
      public String getFieldName() {
-
 
55360
        return _fieldName;
-
 
55361
      }
-
 
55362
    }
-
 
55363
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
55364
    static {
-
 
55365
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
55366
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
55367
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllInsurers_args.class, metaDataMap);
-
 
55368
    }
-
 
55369
 
-
 
55370
    public getAllInsurers_args() {
-
 
55371
    }
-
 
55372
 
-
 
55373
    /**
-
 
55374
     * Performs a deep copy on <i>other</i>.
-
 
55375
     */
-
 
55376
    public getAllInsurers_args(getAllInsurers_args other) {
-
 
55377
    }
-
 
55378
 
-
 
55379
    public getAllInsurers_args deepCopy() {
-
 
55380
      return new getAllInsurers_args(this);
-
 
55381
    }
-
 
55382
 
-
 
55383
    @Override
-
 
55384
    public void clear() {
-
 
55385
    }
-
 
55386
 
-
 
55387
    public void setFieldValue(_Fields field, Object value) {
-
 
55388
      switch (field) {
-
 
55389
      }
-
 
55390
    }
-
 
55391
 
-
 
55392
    public Object getFieldValue(_Fields field) {
-
 
55393
      switch (field) {
-
 
55394
      }
-
 
55395
      throw new IllegalStateException();
-
 
55396
    }
-
 
55397
 
-
 
55398
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
55399
    public boolean isSet(_Fields field) {
-
 
55400
      if (field == null) {
-
 
55401
        throw new IllegalArgumentException();
-
 
55402
      }
-
 
55403
 
-
 
55404
      switch (field) {
-
 
55405
      }
-
 
55406
      throw new IllegalStateException();
-
 
55407
    }
-
 
55408
 
-
 
55409
    @Override
-
 
55410
    public boolean equals(Object that) {
-
 
55411
      if (that == null)
-
 
55412
        return false;
-
 
55413
      if (that instanceof getAllInsurers_args)
-
 
55414
        return this.equals((getAllInsurers_args)that);
-
 
55415
      return false;
-
 
55416
    }
-
 
55417
 
-
 
55418
    public boolean equals(getAllInsurers_args that) {
-
 
55419
      if (that == null)
-
 
55420
        return false;
-
 
55421
 
-
 
55422
      return true;
-
 
55423
    }
-
 
55424
 
-
 
55425
    @Override
-
 
55426
    public int hashCode() {
-
 
55427
      return 0;
-
 
55428
    }
-
 
55429
 
-
 
55430
    public int compareTo(getAllInsurers_args other) {
-
 
55431
      if (!getClass().equals(other.getClass())) {
-
 
55432
        return getClass().getName().compareTo(other.getClass().getName());
-
 
55433
      }
-
 
55434
 
-
 
55435
      int lastComparison = 0;
-
 
55436
      getAllInsurers_args typedOther = (getAllInsurers_args)other;
-
 
55437
 
-
 
55438
      return 0;
-
 
55439
    }
-
 
55440
 
-
 
55441
    public _Fields fieldForId(int fieldId) {
-
 
55442
      return _Fields.findByThriftId(fieldId);
-
 
55443
    }
-
 
55444
 
-
 
55445
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
55446
      org.apache.thrift.protocol.TField field;
-
 
55447
      iprot.readStructBegin();
-
 
55448
      while (true)
-
 
55449
      {
-
 
55450
        field = iprot.readFieldBegin();
-
 
55451
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
55452
          break;
-
 
55453
        }
-
 
55454
        switch (field.id) {
-
 
55455
          default:
-
 
55456
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
55457
        }
-
 
55458
        iprot.readFieldEnd();
-
 
55459
      }
-
 
55460
      iprot.readStructEnd();
-
 
55461
      validate();
-
 
55462
    }
-
 
55463
 
-
 
55464
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
55465
      validate();
-
 
55466
 
-
 
55467
      oprot.writeStructBegin(STRUCT_DESC);
-
 
55468
      oprot.writeFieldStop();
-
 
55469
      oprot.writeStructEnd();
-
 
55470
    }
-
 
55471
 
-
 
55472
    @Override
-
 
55473
    public String toString() {
-
 
55474
      StringBuilder sb = new StringBuilder("getAllInsurers_args(");
-
 
55475
      boolean first = true;
-
 
55476
 
-
 
55477
      sb.append(")");
-
 
55478
      return sb.toString();
-
 
55479
    }
-
 
55480
 
-
 
55481
    public void validate() throws org.apache.thrift.TException {
-
 
55482
      // check for required fields
-
 
55483
    }
-
 
55484
 
-
 
55485
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
55486
      try {
-
 
55487
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
55488
      } catch (org.apache.thrift.TException te) {
-
 
55489
        throw new java.io.IOException(te);
-
 
55490
      }
-
 
55491
    }
-
 
55492
 
-
 
55493
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
55494
      try {
-
 
55495
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
55496
      } catch (org.apache.thrift.TException te) {
-
 
55497
        throw new java.io.IOException(te);
-
 
55498
      }
-
 
55499
    }
-
 
55500
 
-
 
55501
  }
-
 
55502
 
-
 
55503
  public static class getAllInsurers_result implements org.apache.thrift.TBase<getAllInsurers_result, getAllInsurers_result._Fields>, java.io.Serializable, Cloneable   {
-
 
55504
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllInsurers_result");
-
 
55505
 
-
 
55506
    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);
-
 
55507
 
-
 
55508
    private List<Insurer> success; // required
-
 
55509
 
-
 
55510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
55511
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
55512
      SUCCESS((short)0, "success");
-
 
55513
 
-
 
55514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
55515
 
-
 
55516
      static {
-
 
55517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
55518
          byName.put(field.getFieldName(), field);
-
 
55519
        }
-
 
55520
      }
-
 
55521
 
-
 
55522
      /**
-
 
55523
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
55524
       */
-
 
55525
      public static _Fields findByThriftId(int fieldId) {
-
 
55526
        switch(fieldId) {
-
 
55527
          case 0: // SUCCESS
-
 
55528
            return SUCCESS;
-
 
55529
          default:
-
 
55530
            return null;
-
 
55531
        }
-
 
55532
      }
-
 
55533
 
-
 
55534
      /**
-
 
55535
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
55536
       * if it is not found.
-
 
55537
       */
-
 
55538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
55539
        _Fields fields = findByThriftId(fieldId);
-
 
55540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
55541
        return fields;
-
 
55542
      }
-
 
55543
 
-
 
55544
      /**
-
 
55545
       * Find the _Fields constant that matches name, or null if its not found.
-
 
55546
       */
-
 
55547
      public static _Fields findByName(String name) {
-
 
55548
        return byName.get(name);
-
 
55549
      }
-
 
55550
 
-
 
55551
      private final short _thriftId;
-
 
55552
      private final String _fieldName;
-
 
55553
 
-
 
55554
      _Fields(short thriftId, String fieldName) {
-
 
55555
        _thriftId = thriftId;
-
 
55556
        _fieldName = fieldName;
-
 
55557
      }
-
 
55558
 
-
 
55559
      public short getThriftFieldId() {
-
 
55560
        return _thriftId;
-
 
55561
      }
-
 
55562
 
-
 
55563
      public String getFieldName() {
-
 
55564
        return _fieldName;
-
 
55565
      }
-
 
55566
    }
-
 
55567
 
-
 
55568
    // isset id assignments
-
 
55569
 
-
 
55570
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
55571
    static {
-
 
55572
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
55573
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
55574
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
55575
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Insurer.class))));
-
 
55576
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
55577
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllInsurers_result.class, metaDataMap);
-
 
55578
    }
-
 
55579
 
-
 
55580
    public getAllInsurers_result() {
-
 
55581
    }
-
 
55582
 
-
 
55583
    public getAllInsurers_result(
-
 
55584
      List<Insurer> success)
-
 
55585
    {
-
 
55586
      this();
-
 
55587
      this.success = success;
-
 
55588
    }
-
 
55589
 
-
 
55590
    /**
-
 
55591
     * Performs a deep copy on <i>other</i>.
-
 
55592
     */
-
 
55593
    public getAllInsurers_result(getAllInsurers_result other) {
-
 
55594
      if (other.isSetSuccess()) {
-
 
55595
        List<Insurer> __this__success = new ArrayList<Insurer>();
-
 
55596
        for (Insurer other_element : other.success) {
-
 
55597
          __this__success.add(new Insurer(other_element));
-
 
55598
        }
-
 
55599
        this.success = __this__success;
-
 
55600
      }
-
 
55601
    }
-
 
55602
 
-
 
55603
    public getAllInsurers_result deepCopy() {
-
 
55604
      return new getAllInsurers_result(this);
-
 
55605
    }
-
 
55606
 
-
 
55607
    @Override
-
 
55608
    public void clear() {
-
 
55609
      this.success = null;
-
 
55610
    }
-
 
55611
 
-
 
55612
    public int getSuccessSize() {
-
 
55613
      return (this.success == null) ? 0 : this.success.size();
-
 
55614
    }
-
 
55615
 
-
 
55616
    public java.util.Iterator<Insurer> getSuccessIterator() {
-
 
55617
      return (this.success == null) ? null : this.success.iterator();
-
 
55618
    }
-
 
55619
 
-
 
55620
    public void addToSuccess(Insurer elem) {
-
 
55621
      if (this.success == null) {
-
 
55622
        this.success = new ArrayList<Insurer>();
-
 
55623
      }
-
 
55624
      this.success.add(elem);
-
 
55625
    }
-
 
55626
 
-
 
55627
    public List<Insurer> getSuccess() {
-
 
55628
      return this.success;
-
 
55629
    }
-
 
55630
 
-
 
55631
    public void setSuccess(List<Insurer> success) {
-
 
55632
      this.success = success;
-
 
55633
    }
-
 
55634
 
-
 
55635
    public void unsetSuccess() {
-
 
55636
      this.success = null;
-
 
55637
    }
-
 
55638
 
-
 
55639
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
55640
    public boolean isSetSuccess() {
-
 
55641
      return this.success != null;
-
 
55642
    }
-
 
55643
 
-
 
55644
    public void setSuccessIsSet(boolean value) {
-
 
55645
      if (!value) {
-
 
55646
        this.success = null;
-
 
55647
      }
-
 
55648
    }
-
 
55649
 
-
 
55650
    public void setFieldValue(_Fields field, Object value) {
-
 
55651
      switch (field) {
-
 
55652
      case SUCCESS:
-
 
55653
        if (value == null) {
-
 
55654
          unsetSuccess();
-
 
55655
        } else {
-
 
55656
          setSuccess((List<Insurer>)value);
-
 
55657
        }
-
 
55658
        break;
-
 
55659
 
-
 
55660
      }
-
 
55661
    }
-
 
55662
 
-
 
55663
    public Object getFieldValue(_Fields field) {
-
 
55664
      switch (field) {
-
 
55665
      case SUCCESS:
-
 
55666
        return getSuccess();
-
 
55667
 
-
 
55668
      }
-
 
55669
      throw new IllegalStateException();
-
 
55670
    }
-
 
55671
 
-
 
55672
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
55673
    public boolean isSet(_Fields field) {
-
 
55674
      if (field == null) {
-
 
55675
        throw new IllegalArgumentException();
-
 
55676
      }
-
 
55677
 
-
 
55678
      switch (field) {
-
 
55679
      case SUCCESS:
-
 
55680
        return isSetSuccess();
-
 
55681
      }
-
 
55682
      throw new IllegalStateException();
-
 
55683
    }
-
 
55684
 
-
 
55685
    @Override
-
 
55686
    public boolean equals(Object that) {
-
 
55687
      if (that == null)
-
 
55688
        return false;
-
 
55689
      if (that instanceof getAllInsurers_result)
-
 
55690
        return this.equals((getAllInsurers_result)that);
-
 
55691
      return false;
-
 
55692
    }
-
 
55693
 
-
 
55694
    public boolean equals(getAllInsurers_result that) {
-
 
55695
      if (that == null)
-
 
55696
        return false;
-
 
55697
 
-
 
55698
      boolean this_present_success = true && this.isSetSuccess();
-
 
55699
      boolean that_present_success = true && that.isSetSuccess();
-
 
55700
      if (this_present_success || that_present_success) {
-
 
55701
        if (!(this_present_success && that_present_success))
-
 
55702
          return false;
-
 
55703
        if (!this.success.equals(that.success))
-
 
55704
          return false;
-
 
55705
      }
-
 
55706
 
-
 
55707
      return true;
-
 
55708
    }
-
 
55709
 
-
 
55710
    @Override
-
 
55711
    public int hashCode() {
-
 
55712
      return 0;
-
 
55713
    }
-
 
55714
 
-
 
55715
    public int compareTo(getAllInsurers_result other) {
-
 
55716
      if (!getClass().equals(other.getClass())) {
-
 
55717
        return getClass().getName().compareTo(other.getClass().getName());
-
 
55718
      }
-
 
55719
 
-
 
55720
      int lastComparison = 0;
-
 
55721
      getAllInsurers_result typedOther = (getAllInsurers_result)other;
-
 
55722
 
-
 
55723
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
55724
      if (lastComparison != 0) {
-
 
55725
        return lastComparison;
-
 
55726
      }
-
 
55727
      if (isSetSuccess()) {
-
 
55728
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
55729
        if (lastComparison != 0) {
-
 
55730
          return lastComparison;
-
 
55731
        }
-
 
55732
      }
-
 
55733
      return 0;
-
 
55734
    }
-
 
55735
 
-
 
55736
    public _Fields fieldForId(int fieldId) {
-
 
55737
      return _Fields.findByThriftId(fieldId);
-
 
55738
    }
-
 
55739
 
-
 
55740
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
55741
      org.apache.thrift.protocol.TField field;
-
 
55742
      iprot.readStructBegin();
-
 
55743
      while (true)
-
 
55744
      {
-
 
55745
        field = iprot.readFieldBegin();
-
 
55746
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
55747
          break;
-
 
55748
        }
-
 
55749
        switch (field.id) {
-
 
55750
          case 0: // SUCCESS
-
 
55751
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
55752
              {
-
 
55753
                org.apache.thrift.protocol.TList _list149 = iprot.readListBegin();
-
 
55754
                this.success = new ArrayList<Insurer>(_list149.size);
-
 
55755
                for (int _i150 = 0; _i150 < _list149.size; ++_i150)
-
 
55756
                {
-
 
55757
                  Insurer _elem151; // required
-
 
55758
                  _elem151 = new Insurer();
-
 
55759
                  _elem151.read(iprot);
-
 
55760
                  this.success.add(_elem151);
-
 
55761
                }
-
 
55762
                iprot.readListEnd();
-
 
55763
              }
-
 
55764
            } else { 
-
 
55765
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
55766
            }
-
 
55767
            break;
-
 
55768
          default:
-
 
55769
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
55770
        }
-
 
55771
        iprot.readFieldEnd();
-
 
55772
      }
-
 
55773
      iprot.readStructEnd();
-
 
55774
      validate();
-
 
55775
    }
-
 
55776
 
-
 
55777
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
55778
      oprot.writeStructBegin(STRUCT_DESC);
-
 
55779
 
-
 
55780
      if (this.isSetSuccess()) {
-
 
55781
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
55782
        {
-
 
55783
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
55784
          for (Insurer _iter152 : this.success)
-
 
55785
          {
-
 
55786
            _iter152.write(oprot);
-
 
55787
          }
-
 
55788
          oprot.writeListEnd();
-
 
55789
        }
-
 
55790
        oprot.writeFieldEnd();
-
 
55791
      }
-
 
55792
      oprot.writeFieldStop();
-
 
55793
      oprot.writeStructEnd();
-
 
55794
    }
-
 
55795
 
-
 
55796
    @Override
-
 
55797
    public String toString() {
-
 
55798
      StringBuilder sb = new StringBuilder("getAllInsurers_result(");
-
 
55799
      boolean first = true;
-
 
55800
 
-
 
55801
      sb.append("success:");
-
 
55802
      if (this.success == null) {
-
 
55803
        sb.append("null");
55203
      } else {
55804
      } else {
55204
        sb.append(this.success);
55805
        sb.append(this.success);
55205
      }
55806
      }
55206
      first = false;
55807
      first = false;
55207
      sb.append(")");
55808
      sb.append(")");