Subversion Repositories SmartDukaan

Rev

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

Rev 9253 Rev 9299
Line 480... Line 480...
480
 
480
 
481
    public long getCountForSnapdealItems() throws org.apache.thrift.TException;
481
    public long getCountForSnapdealItems() throws org.apache.thrift.TException;
482
 
482
 
483
    public long getSnapdealSearchResultCount(List<String> searchTerm) throws org.apache.thrift.TException;
483
    public long getSnapdealSearchResultCount(List<String> searchTerm) throws org.apache.thrift.TException;
484
 
484
 
-
 
485
    public long getPrefferedInsurerForItem(long itemId, InsurerType insurerType) throws org.apache.thrift.TException;
-
 
486
 
485
  }
487
  }
486
 
488
 
487
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
489
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
488
 
490
 
489
    public void addItem(Item item, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItem_call> resultHandler) throws org.apache.thrift.TException;
491
    public void addItem(Item item, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addItem_call> resultHandler) throws org.apache.thrift.TException;
Line 744... Line 746...
744
 
746
 
745
    public void getCountForSnapdealItems(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCountForSnapdealItems_call> resultHandler) throws org.apache.thrift.TException;
747
    public void getCountForSnapdealItems(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCountForSnapdealItems_call> resultHandler) throws org.apache.thrift.TException;
746
 
748
 
747
    public void getSnapdealSearchResultCount(List<String> searchTerm, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSnapdealSearchResultCount_call> resultHandler) throws org.apache.thrift.TException;
749
    public void getSnapdealSearchResultCount(List<String> searchTerm, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSnapdealSearchResultCount_call> resultHandler) throws org.apache.thrift.TException;
748
 
750
 
-
 
751
    public void getPrefferedInsurerForItem(long itemId, InsurerType insurerType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPrefferedInsurerForItem_call> resultHandler) throws org.apache.thrift.TException;
-
 
752
 
749
  }
753
  }
750
 
754
 
751
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
755
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
752
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
756
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
753
      public Factory() {}
757
      public Factory() {}
Line 3845... Line 3849...
3845
        return result.success;
3849
        return result.success;
3846
      }
3850
      }
3847
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSnapdealSearchResultCount failed: unknown result");
3851
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSnapdealSearchResultCount failed: unknown result");
3848
    }
3852
    }
3849
 
3853
 
-
 
3854
    public long getPrefferedInsurerForItem(long itemId, InsurerType insurerType) throws org.apache.thrift.TException
-
 
3855
    {
-
 
3856
      send_getPrefferedInsurerForItem(itemId, insurerType);
-
 
3857
      return recv_getPrefferedInsurerForItem();
-
 
3858
    }
-
 
3859
 
-
 
3860
    public void send_getPrefferedInsurerForItem(long itemId, InsurerType insurerType) throws org.apache.thrift.TException
-
 
3861
    {
-
 
3862
      getPrefferedInsurerForItem_args args = new getPrefferedInsurerForItem_args();
-
 
3863
      args.setItemId(itemId);
-
 
3864
      args.setInsurerType(insurerType);
-
 
3865
      sendBase("getPrefferedInsurerForItem", args);
-
 
3866
    }
-
 
3867
 
-
 
3868
    public long recv_getPrefferedInsurerForItem() throws org.apache.thrift.TException
-
 
3869
    {
-
 
3870
      getPrefferedInsurerForItem_result result = new getPrefferedInsurerForItem_result();
-
 
3871
      receiveBase(result, "getPrefferedInsurerForItem");
-
 
3872
      if (result.isSetSuccess()) {
-
 
3873
        return result.success;
-
 
3874
      }
-
 
3875
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPrefferedInsurerForItem failed: unknown result");
-
 
3876
    }
-
 
3877
 
3850
  }
3878
  }
3851
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
3879
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
3852
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
3880
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
3853
      private org.apache.thrift.async.TAsyncClientManager clientManager;
3881
      private org.apache.thrift.async.TAsyncClientManager clientManager;
3854
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
3882
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 8137... Line 8165...
8137
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
8165
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
8138
        return (new Client(prot)).recv_getSnapdealSearchResultCount();
8166
        return (new Client(prot)).recv_getSnapdealSearchResultCount();
8139
      }
8167
      }
8140
    }
8168
    }
8141
 
8169
 
-
 
8170
    public void getPrefferedInsurerForItem(long itemId, InsurerType insurerType, org.apache.thrift.async.AsyncMethodCallback<getPrefferedInsurerForItem_call> resultHandler) throws org.apache.thrift.TException {
-
 
8171
      checkReady();
-
 
8172
      getPrefferedInsurerForItem_call method_call = new getPrefferedInsurerForItem_call(itemId, insurerType, resultHandler, this, ___protocolFactory, ___transport);
-
 
8173
      this.___currentMethod = method_call;
-
 
8174
      ___manager.call(method_call);
-
 
8175
    }
-
 
8176
 
-
 
8177
    public static class getPrefferedInsurerForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
8178
      private long itemId;
-
 
8179
      private InsurerType insurerType;
-
 
8180
      public getPrefferedInsurerForItem_call(long itemId, InsurerType insurerType, org.apache.thrift.async.AsyncMethodCallback<getPrefferedInsurerForItem_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 {
-
 
8181
        super(client, protocolFactory, transport, resultHandler, false);
-
 
8182
        this.itemId = itemId;
-
 
8183
        this.insurerType = insurerType;
-
 
8184
      }
-
 
8185
 
-
 
8186
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
8187
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPrefferedInsurerForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
8188
        getPrefferedInsurerForItem_args args = new getPrefferedInsurerForItem_args();
-
 
8189
        args.setItemId(itemId);
-
 
8190
        args.setInsurerType(insurerType);
-
 
8191
        args.write(prot);
-
 
8192
        prot.writeMessageEnd();
-
 
8193
      }
-
 
8194
 
-
 
8195
      public long getResult() throws org.apache.thrift.TException {
-
 
8196
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
8197
          throw new IllegalStateException("Method call not finished!");
-
 
8198
        }
-
 
8199
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
8200
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
8201
        return (new Client(prot)).recv_getPrefferedInsurerForItem();
-
 
8202
      }
-
 
8203
    }
-
 
8204
 
8142
  }
8205
  }
8143
 
8206
 
8144
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
8207
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
8145
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
8208
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
8146
    public Processor(I iface) {
8209
    public Processor(I iface) {
Line 8280... Line 8343...
8280
      processMap.put("getAllSnapdealItems", new getAllSnapdealItems());
8343
      processMap.put("getAllSnapdealItems", new getAllSnapdealItems());
8281
      processMap.put("getSnapdealItems", new getSnapdealItems());
8344
      processMap.put("getSnapdealItems", new getSnapdealItems());
8282
      processMap.put("searchSnapdealItems", new searchSnapdealItems());
8345
      processMap.put("searchSnapdealItems", new searchSnapdealItems());
8283
      processMap.put("getCountForSnapdealItems", new getCountForSnapdealItems());
8346
      processMap.put("getCountForSnapdealItems", new getCountForSnapdealItems());
8284
      processMap.put("getSnapdealSearchResultCount", new getSnapdealSearchResultCount());
8347
      processMap.put("getSnapdealSearchResultCount", new getSnapdealSearchResultCount());
-
 
8348
      processMap.put("getPrefferedInsurerForItem", new getPrefferedInsurerForItem());
8285
      return processMap;
8349
      return processMap;
8286
    }
8350
    }
8287
 
8351
 
8288
    private static class addItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItem_args> {
8352
    private static class addItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addItem_args> {
8289
      public addItem() {
8353
      public addItem() {
Line 10555... Line 10619...
10555
        result.setSuccessIsSet(true);
10619
        result.setSuccessIsSet(true);
10556
        return result;
10620
        return result;
10557
      }
10621
      }
10558
    }
10622
    }
10559
 
10623
 
-
 
10624
    private static class getPrefferedInsurerForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPrefferedInsurerForItem_args> {
-
 
10625
      public getPrefferedInsurerForItem() {
-
 
10626
        super("getPrefferedInsurerForItem");
-
 
10627
      }
-
 
10628
 
-
 
10629
      protected getPrefferedInsurerForItem_args getEmptyArgsInstance() {
-
 
10630
        return new getPrefferedInsurerForItem_args();
-
 
10631
      }
-
 
10632
 
-
 
10633
      protected getPrefferedInsurerForItem_result getResult(I iface, getPrefferedInsurerForItem_args args) throws org.apache.thrift.TException {
-
 
10634
        getPrefferedInsurerForItem_result result = new getPrefferedInsurerForItem_result();
-
 
10635
        result.success = iface.getPrefferedInsurerForItem(args.itemId, args.insurerType);
-
 
10636
        result.setSuccessIsSet(true);
-
 
10637
        return result;
-
 
10638
      }
-
 
10639
    }
-
 
10640
 
10560
  }
10641
  }
10561
 
10642
 
10562
  public static class addItem_args implements org.apache.thrift.TBase<addItem_args, addItem_args._Fields>, java.io.Serializable, Cloneable   {
10643
  public static class addItem_args implements org.apache.thrift.TBase<addItem_args, addItem_args._Fields>, java.io.Serializable, Cloneable   {
10563
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItem_args");
10644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addItem_args");
10564
 
10645
 
Line 94000... Line 94081...
94000
      boolean first = true;
94081
      boolean first = true;
94001
 
94082
 
94002
      sb.append("success:");
94083
      sb.append("success:");
94003
      sb.append(this.success);
94084
      sb.append(this.success);
94004
      first = false;
94085
      first = false;
-
 
94086
      sb.append(")");
-
 
94087
      return sb.toString();
-
 
94088
    }
-
 
94089
 
-
 
94090
    public void validate() throws org.apache.thrift.TException {
-
 
94091
      // check for required fields
-
 
94092
    }
-
 
94093
 
-
 
94094
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
94095
      try {
-
 
94096
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
94097
      } catch (org.apache.thrift.TException te) {
-
 
94098
        throw new java.io.IOException(te);
-
 
94099
      }
-
 
94100
    }
-
 
94101
 
-
 
94102
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
94103
      try {
-
 
94104
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
94105
      } catch (org.apache.thrift.TException te) {
-
 
94106
        throw new java.io.IOException(te);
-
 
94107
      }
-
 
94108
    }
-
 
94109
 
-
 
94110
  }
-
 
94111
 
-
 
94112
  public static class getPrefferedInsurerForItem_args implements org.apache.thrift.TBase<getPrefferedInsurerForItem_args, getPrefferedInsurerForItem_args._Fields>, java.io.Serializable, Cloneable   {
-
 
94113
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrefferedInsurerForItem_args");
-
 
94114
 
-
 
94115
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
94116
    private static final org.apache.thrift.protocol.TField INSURER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("insurerType", org.apache.thrift.protocol.TType.I32, (short)2);
-
 
94117
 
-
 
94118
    private long itemId; // required
-
 
94119
    private InsurerType insurerType; // required
-
 
94120
 
-
 
94121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
94122
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
94123
      ITEM_ID((short)1, "itemId"),
-
 
94124
      /**
-
 
94125
       * 
-
 
94126
       * @see InsurerType
-
 
94127
       */
-
 
94128
      INSURER_TYPE((short)2, "insurerType");
-
 
94129
 
-
 
94130
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
94131
 
-
 
94132
      static {
-
 
94133
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
94134
          byName.put(field.getFieldName(), field);
-
 
94135
        }
-
 
94136
      }
-
 
94137
 
-
 
94138
      /**
-
 
94139
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
94140
       */
-
 
94141
      public static _Fields findByThriftId(int fieldId) {
-
 
94142
        switch(fieldId) {
-
 
94143
          case 1: // ITEM_ID
-
 
94144
            return ITEM_ID;
-
 
94145
          case 2: // INSURER_TYPE
-
 
94146
            return INSURER_TYPE;
-
 
94147
          default:
-
 
94148
            return null;
-
 
94149
        }
-
 
94150
      }
-
 
94151
 
-
 
94152
      /**
-
 
94153
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
94154
       * if it is not found.
-
 
94155
       */
-
 
94156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
94157
        _Fields fields = findByThriftId(fieldId);
-
 
94158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
94159
        return fields;
-
 
94160
      }
-
 
94161
 
-
 
94162
      /**
-
 
94163
       * Find the _Fields constant that matches name, or null if its not found.
-
 
94164
       */
-
 
94165
      public static _Fields findByName(String name) {
-
 
94166
        return byName.get(name);
-
 
94167
      }
-
 
94168
 
-
 
94169
      private final short _thriftId;
-
 
94170
      private final String _fieldName;
-
 
94171
 
-
 
94172
      _Fields(short thriftId, String fieldName) {
-
 
94173
        _thriftId = thriftId;
-
 
94174
        _fieldName = fieldName;
-
 
94175
      }
-
 
94176
 
-
 
94177
      public short getThriftFieldId() {
-
 
94178
        return _thriftId;
-
 
94179
      }
-
 
94180
 
-
 
94181
      public String getFieldName() {
-
 
94182
        return _fieldName;
-
 
94183
      }
-
 
94184
    }
-
 
94185
 
-
 
94186
    // isset id assignments
-
 
94187
    private static final int __ITEMID_ISSET_ID = 0;
-
 
94188
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
94189
 
-
 
94190
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
94191
    static {
-
 
94192
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
94193
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
94194
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
94195
      tmpMap.put(_Fields.INSURER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("insurerType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
94196
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InsurerType.class)));
-
 
94197
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
94198
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrefferedInsurerForItem_args.class, metaDataMap);
-
 
94199
    }
-
 
94200
 
-
 
94201
    public getPrefferedInsurerForItem_args() {
-
 
94202
    }
-
 
94203
 
-
 
94204
    public getPrefferedInsurerForItem_args(
-
 
94205
      long itemId,
-
 
94206
      InsurerType insurerType)
-
 
94207
    {
-
 
94208
      this();
-
 
94209
      this.itemId = itemId;
-
 
94210
      setItemIdIsSet(true);
-
 
94211
      this.insurerType = insurerType;
-
 
94212
    }
-
 
94213
 
-
 
94214
    /**
-
 
94215
     * Performs a deep copy on <i>other</i>.
-
 
94216
     */
-
 
94217
    public getPrefferedInsurerForItem_args(getPrefferedInsurerForItem_args other) {
-
 
94218
      __isset_bit_vector.clear();
-
 
94219
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
94220
      this.itemId = other.itemId;
-
 
94221
      if (other.isSetInsurerType()) {
-
 
94222
        this.insurerType = other.insurerType;
-
 
94223
      }
-
 
94224
    }
-
 
94225
 
-
 
94226
    public getPrefferedInsurerForItem_args deepCopy() {
-
 
94227
      return new getPrefferedInsurerForItem_args(this);
-
 
94228
    }
-
 
94229
 
-
 
94230
    @Override
-
 
94231
    public void clear() {
-
 
94232
      setItemIdIsSet(false);
-
 
94233
      this.itemId = 0;
-
 
94234
      this.insurerType = null;
-
 
94235
    }
-
 
94236
 
-
 
94237
    public long getItemId() {
-
 
94238
      return this.itemId;
-
 
94239
    }
-
 
94240
 
-
 
94241
    public void setItemId(long itemId) {
-
 
94242
      this.itemId = itemId;
-
 
94243
      setItemIdIsSet(true);
-
 
94244
    }
-
 
94245
 
-
 
94246
    public void unsetItemId() {
-
 
94247
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
94248
    }
-
 
94249
 
-
 
94250
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
-
 
94251
    public boolean isSetItemId() {
-
 
94252
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
94253
    }
-
 
94254
 
-
 
94255
    public void setItemIdIsSet(boolean value) {
-
 
94256
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
94257
    }
-
 
94258
 
-
 
94259
    /**
-
 
94260
     * 
-
 
94261
     * @see InsurerType
-
 
94262
     */
-
 
94263
    public InsurerType getInsurerType() {
-
 
94264
      return this.insurerType;
-
 
94265
    }
-
 
94266
 
-
 
94267
    /**
-
 
94268
     * 
-
 
94269
     * @see InsurerType
-
 
94270
     */
-
 
94271
    public void setInsurerType(InsurerType insurerType) {
-
 
94272
      this.insurerType = insurerType;
-
 
94273
    }
-
 
94274
 
-
 
94275
    public void unsetInsurerType() {
-
 
94276
      this.insurerType = null;
-
 
94277
    }
-
 
94278
 
-
 
94279
    /** Returns true if field insurerType is set (has been assigned a value) and false otherwise */
-
 
94280
    public boolean isSetInsurerType() {
-
 
94281
      return this.insurerType != null;
-
 
94282
    }
-
 
94283
 
-
 
94284
    public void setInsurerTypeIsSet(boolean value) {
-
 
94285
      if (!value) {
-
 
94286
        this.insurerType = null;
-
 
94287
      }
-
 
94288
    }
-
 
94289
 
-
 
94290
    public void setFieldValue(_Fields field, Object value) {
-
 
94291
      switch (field) {
-
 
94292
      case ITEM_ID:
-
 
94293
        if (value == null) {
-
 
94294
          unsetItemId();
-
 
94295
        } else {
-
 
94296
          setItemId((Long)value);
-
 
94297
        }
-
 
94298
        break;
-
 
94299
 
-
 
94300
      case INSURER_TYPE:
-
 
94301
        if (value == null) {
-
 
94302
          unsetInsurerType();
-
 
94303
        } else {
-
 
94304
          setInsurerType((InsurerType)value);
-
 
94305
        }
-
 
94306
        break;
-
 
94307
 
-
 
94308
      }
-
 
94309
    }
-
 
94310
 
-
 
94311
    public Object getFieldValue(_Fields field) {
-
 
94312
      switch (field) {
-
 
94313
      case ITEM_ID:
-
 
94314
        return Long.valueOf(getItemId());
-
 
94315
 
-
 
94316
      case INSURER_TYPE:
-
 
94317
        return getInsurerType();
-
 
94318
 
-
 
94319
      }
-
 
94320
      throw new IllegalStateException();
-
 
94321
    }
-
 
94322
 
-
 
94323
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
94324
    public boolean isSet(_Fields field) {
-
 
94325
      if (field == null) {
-
 
94326
        throw new IllegalArgumentException();
-
 
94327
      }
-
 
94328
 
-
 
94329
      switch (field) {
-
 
94330
      case ITEM_ID:
-
 
94331
        return isSetItemId();
-
 
94332
      case INSURER_TYPE:
-
 
94333
        return isSetInsurerType();
-
 
94334
      }
-
 
94335
      throw new IllegalStateException();
-
 
94336
    }
-
 
94337
 
-
 
94338
    @Override
-
 
94339
    public boolean equals(Object that) {
-
 
94340
      if (that == null)
-
 
94341
        return false;
-
 
94342
      if (that instanceof getPrefferedInsurerForItem_args)
-
 
94343
        return this.equals((getPrefferedInsurerForItem_args)that);
-
 
94344
      return false;
-
 
94345
    }
-
 
94346
 
-
 
94347
    public boolean equals(getPrefferedInsurerForItem_args that) {
-
 
94348
      if (that == null)
-
 
94349
        return false;
-
 
94350
 
-
 
94351
      boolean this_present_itemId = true;
-
 
94352
      boolean that_present_itemId = true;
-
 
94353
      if (this_present_itemId || that_present_itemId) {
-
 
94354
        if (!(this_present_itemId && that_present_itemId))
-
 
94355
          return false;
-
 
94356
        if (this.itemId != that.itemId)
-
 
94357
          return false;
-
 
94358
      }
-
 
94359
 
-
 
94360
      boolean this_present_insurerType = true && this.isSetInsurerType();
-
 
94361
      boolean that_present_insurerType = true && that.isSetInsurerType();
-
 
94362
      if (this_present_insurerType || that_present_insurerType) {
-
 
94363
        if (!(this_present_insurerType && that_present_insurerType))
-
 
94364
          return false;
-
 
94365
        if (!this.insurerType.equals(that.insurerType))
-
 
94366
          return false;
-
 
94367
      }
-
 
94368
 
-
 
94369
      return true;
-
 
94370
    }
-
 
94371
 
-
 
94372
    @Override
-
 
94373
    public int hashCode() {
-
 
94374
      return 0;
-
 
94375
    }
-
 
94376
 
-
 
94377
    public int compareTo(getPrefferedInsurerForItem_args other) {
-
 
94378
      if (!getClass().equals(other.getClass())) {
-
 
94379
        return getClass().getName().compareTo(other.getClass().getName());
-
 
94380
      }
-
 
94381
 
-
 
94382
      int lastComparison = 0;
-
 
94383
      getPrefferedInsurerForItem_args typedOther = (getPrefferedInsurerForItem_args)other;
-
 
94384
 
-
 
94385
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
-
 
94386
      if (lastComparison != 0) {
-
 
94387
        return lastComparison;
-
 
94388
      }
-
 
94389
      if (isSetItemId()) {
-
 
94390
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
-
 
94391
        if (lastComparison != 0) {
-
 
94392
          return lastComparison;
-
 
94393
        }
-
 
94394
      }
-
 
94395
      lastComparison = Boolean.valueOf(isSetInsurerType()).compareTo(typedOther.isSetInsurerType());
-
 
94396
      if (lastComparison != 0) {
-
 
94397
        return lastComparison;
-
 
94398
      }
-
 
94399
      if (isSetInsurerType()) {
-
 
94400
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.insurerType, typedOther.insurerType);
-
 
94401
        if (lastComparison != 0) {
-
 
94402
          return lastComparison;
-
 
94403
        }
-
 
94404
      }
-
 
94405
      return 0;
-
 
94406
    }
-
 
94407
 
-
 
94408
    public _Fields fieldForId(int fieldId) {
-
 
94409
      return _Fields.findByThriftId(fieldId);
-
 
94410
    }
-
 
94411
 
-
 
94412
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
94413
      org.apache.thrift.protocol.TField field;
-
 
94414
      iprot.readStructBegin();
-
 
94415
      while (true)
-
 
94416
      {
-
 
94417
        field = iprot.readFieldBegin();
-
 
94418
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
94419
          break;
-
 
94420
        }
-
 
94421
        switch (field.id) {
-
 
94422
          case 1: // ITEM_ID
-
 
94423
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
94424
              this.itemId = iprot.readI64();
-
 
94425
              setItemIdIsSet(true);
-
 
94426
            } else { 
-
 
94427
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
94428
            }
-
 
94429
            break;
-
 
94430
          case 2: // INSURER_TYPE
-
 
94431
            if (field.type == org.apache.thrift.protocol.TType.I32) {
-
 
94432
              this.insurerType = InsurerType.findByValue(iprot.readI32());
-
 
94433
            } else { 
-
 
94434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
94435
            }
-
 
94436
            break;
-
 
94437
          default:
-
 
94438
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
94439
        }
-
 
94440
        iprot.readFieldEnd();
-
 
94441
      }
-
 
94442
      iprot.readStructEnd();
-
 
94443
      validate();
-
 
94444
    }
-
 
94445
 
-
 
94446
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
94447
      validate();
-
 
94448
 
-
 
94449
      oprot.writeStructBegin(STRUCT_DESC);
-
 
94450
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
94451
      oprot.writeI64(this.itemId);
-
 
94452
      oprot.writeFieldEnd();
-
 
94453
      if (this.insurerType != null) {
-
 
94454
        oprot.writeFieldBegin(INSURER_TYPE_FIELD_DESC);
-
 
94455
        oprot.writeI32(this.insurerType.getValue());
-
 
94456
        oprot.writeFieldEnd();
-
 
94457
      }
-
 
94458
      oprot.writeFieldStop();
-
 
94459
      oprot.writeStructEnd();
-
 
94460
    }
-
 
94461
 
-
 
94462
    @Override
-
 
94463
    public String toString() {
-
 
94464
      StringBuilder sb = new StringBuilder("getPrefferedInsurerForItem_args(");
-
 
94465
      boolean first = true;
-
 
94466
 
-
 
94467
      sb.append("itemId:");
-
 
94468
      sb.append(this.itemId);
-
 
94469
      first = false;
-
 
94470
      if (!first) sb.append(", ");
-
 
94471
      sb.append("insurerType:");
-
 
94472
      if (this.insurerType == null) {
-
 
94473
        sb.append("null");
-
 
94474
      } else {
-
 
94475
        sb.append(this.insurerType);
-
 
94476
      }
-
 
94477
      first = false;
-
 
94478
      sb.append(")");
-
 
94479
      return sb.toString();
-
 
94480
    }
-
 
94481
 
-
 
94482
    public void validate() throws org.apache.thrift.TException {
-
 
94483
      // check for required fields
-
 
94484
    }
-
 
94485
 
-
 
94486
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
94487
      try {
-
 
94488
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
94489
      } catch (org.apache.thrift.TException te) {
-
 
94490
        throw new java.io.IOException(te);
-
 
94491
      }
-
 
94492
    }
-
 
94493
 
-
 
94494
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
94495
      try {
-
 
94496
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
94497
        __isset_bit_vector = new BitSet(1);
-
 
94498
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
94499
      } catch (org.apache.thrift.TException te) {
-
 
94500
        throw new java.io.IOException(te);
-
 
94501
      }
-
 
94502
    }
-
 
94503
 
-
 
94504
  }
-
 
94505
 
-
 
94506
  public static class getPrefferedInsurerForItem_result implements org.apache.thrift.TBase<getPrefferedInsurerForItem_result, getPrefferedInsurerForItem_result._Fields>, java.io.Serializable, Cloneable   {
-
 
94507
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPrefferedInsurerForItem_result");
-
 
94508
 
-
 
94509
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
-
 
94510
 
-
 
94511
    private long success; // required
-
 
94512
 
-
 
94513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
94514
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
94515
      SUCCESS((short)0, "success");
-
 
94516
 
-
 
94517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
94518
 
-
 
94519
      static {
-
 
94520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
94521
          byName.put(field.getFieldName(), field);
-
 
94522
        }
-
 
94523
      }
-
 
94524
 
-
 
94525
      /**
-
 
94526
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
94527
       */
-
 
94528
      public static _Fields findByThriftId(int fieldId) {
-
 
94529
        switch(fieldId) {
-
 
94530
          case 0: // SUCCESS
-
 
94531
            return SUCCESS;
-
 
94532
          default:
-
 
94533
            return null;
-
 
94534
        }
-
 
94535
      }
-
 
94536
 
-
 
94537
      /**
-
 
94538
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
94539
       * if it is not found.
-
 
94540
       */
-
 
94541
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
94542
        _Fields fields = findByThriftId(fieldId);
-
 
94543
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
94544
        return fields;
-
 
94545
      }
-
 
94546
 
-
 
94547
      /**
-
 
94548
       * Find the _Fields constant that matches name, or null if its not found.
-
 
94549
       */
-
 
94550
      public static _Fields findByName(String name) {
-
 
94551
        return byName.get(name);
-
 
94552
      }
-
 
94553
 
-
 
94554
      private final short _thriftId;
-
 
94555
      private final String _fieldName;
-
 
94556
 
-
 
94557
      _Fields(short thriftId, String fieldName) {
-
 
94558
        _thriftId = thriftId;
-
 
94559
        _fieldName = fieldName;
-
 
94560
      }
-
 
94561
 
-
 
94562
      public short getThriftFieldId() {
-
 
94563
        return _thriftId;
-
 
94564
      }
-
 
94565
 
-
 
94566
      public String getFieldName() {
-
 
94567
        return _fieldName;
-
 
94568
      }
-
 
94569
    }
-
 
94570
 
-
 
94571
    // isset id assignments
-
 
94572
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
94573
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
94574
 
-
 
94575
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
94576
    static {
-
 
94577
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
94578
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
94579
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
94580
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
94581
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPrefferedInsurerForItem_result.class, metaDataMap);
-
 
94582
    }
-
 
94583
 
-
 
94584
    public getPrefferedInsurerForItem_result() {
-
 
94585
    }
-
 
94586
 
-
 
94587
    public getPrefferedInsurerForItem_result(
-
 
94588
      long success)
-
 
94589
    {
-
 
94590
      this();
-
 
94591
      this.success = success;
-
 
94592
      setSuccessIsSet(true);
-
 
94593
    }
-
 
94594
 
-
 
94595
    /**
-
 
94596
     * Performs a deep copy on <i>other</i>.
-
 
94597
     */
-
 
94598
    public getPrefferedInsurerForItem_result(getPrefferedInsurerForItem_result other) {
-
 
94599
      __isset_bit_vector.clear();
-
 
94600
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
94601
      this.success = other.success;
-
 
94602
    }
-
 
94603
 
-
 
94604
    public getPrefferedInsurerForItem_result deepCopy() {
-
 
94605
      return new getPrefferedInsurerForItem_result(this);
-
 
94606
    }
-
 
94607
 
-
 
94608
    @Override
-
 
94609
    public void clear() {
-
 
94610
      setSuccessIsSet(false);
-
 
94611
      this.success = 0;
-
 
94612
    }
-
 
94613
 
-
 
94614
    public long getSuccess() {
-
 
94615
      return this.success;
-
 
94616
    }
-
 
94617
 
-
 
94618
    public void setSuccess(long success) {
-
 
94619
      this.success = success;
-
 
94620
      setSuccessIsSet(true);
-
 
94621
    }
-
 
94622
 
-
 
94623
    public void unsetSuccess() {
-
 
94624
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
94625
    }
-
 
94626
 
-
 
94627
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
94628
    public boolean isSetSuccess() {
-
 
94629
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
94630
    }
-
 
94631
 
-
 
94632
    public void setSuccessIsSet(boolean value) {
-
 
94633
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
94634
    }
-
 
94635
 
-
 
94636
    public void setFieldValue(_Fields field, Object value) {
-
 
94637
      switch (field) {
-
 
94638
      case SUCCESS:
-
 
94639
        if (value == null) {
-
 
94640
          unsetSuccess();
-
 
94641
        } else {
-
 
94642
          setSuccess((Long)value);
-
 
94643
        }
-
 
94644
        break;
-
 
94645
 
-
 
94646
      }
-
 
94647
    }
-
 
94648
 
-
 
94649
    public Object getFieldValue(_Fields field) {
-
 
94650
      switch (field) {
-
 
94651
      case SUCCESS:
-
 
94652
        return Long.valueOf(getSuccess());
-
 
94653
 
-
 
94654
      }
-
 
94655
      throw new IllegalStateException();
-
 
94656
    }
-
 
94657
 
-
 
94658
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
94659
    public boolean isSet(_Fields field) {
-
 
94660
      if (field == null) {
-
 
94661
        throw new IllegalArgumentException();
-
 
94662
      }
-
 
94663
 
-
 
94664
      switch (field) {
-
 
94665
      case SUCCESS:
-
 
94666
        return isSetSuccess();
-
 
94667
      }
-
 
94668
      throw new IllegalStateException();
-
 
94669
    }
-
 
94670
 
-
 
94671
    @Override
-
 
94672
    public boolean equals(Object that) {
-
 
94673
      if (that == null)
-
 
94674
        return false;
-
 
94675
      if (that instanceof getPrefferedInsurerForItem_result)
-
 
94676
        return this.equals((getPrefferedInsurerForItem_result)that);
-
 
94677
      return false;
-
 
94678
    }
-
 
94679
 
-
 
94680
    public boolean equals(getPrefferedInsurerForItem_result that) {
-
 
94681
      if (that == null)
-
 
94682
        return false;
-
 
94683
 
-
 
94684
      boolean this_present_success = true;
-
 
94685
      boolean that_present_success = true;
-
 
94686
      if (this_present_success || that_present_success) {
-
 
94687
        if (!(this_present_success && that_present_success))
-
 
94688
          return false;
-
 
94689
        if (this.success != that.success)
-
 
94690
          return false;
-
 
94691
      }
-
 
94692
 
-
 
94693
      return true;
-
 
94694
    }
-
 
94695
 
-
 
94696
    @Override
-
 
94697
    public int hashCode() {
-
 
94698
      return 0;
-
 
94699
    }
-
 
94700
 
-
 
94701
    public int compareTo(getPrefferedInsurerForItem_result other) {
-
 
94702
      if (!getClass().equals(other.getClass())) {
-
 
94703
        return getClass().getName().compareTo(other.getClass().getName());
-
 
94704
      }
-
 
94705
 
-
 
94706
      int lastComparison = 0;
-
 
94707
      getPrefferedInsurerForItem_result typedOther = (getPrefferedInsurerForItem_result)other;
-
 
94708
 
-
 
94709
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
94710
      if (lastComparison != 0) {
-
 
94711
        return lastComparison;
-
 
94712
      }
-
 
94713
      if (isSetSuccess()) {
-
 
94714
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
94715
        if (lastComparison != 0) {
-
 
94716
          return lastComparison;
-
 
94717
        }
-
 
94718
      }
-
 
94719
      return 0;
-
 
94720
    }
-
 
94721
 
-
 
94722
    public _Fields fieldForId(int fieldId) {
-
 
94723
      return _Fields.findByThriftId(fieldId);
-
 
94724
    }
-
 
94725
 
-
 
94726
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
94727
      org.apache.thrift.protocol.TField field;
-
 
94728
      iprot.readStructBegin();
-
 
94729
      while (true)
-
 
94730
      {
-
 
94731
        field = iprot.readFieldBegin();
-
 
94732
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
94733
          break;
-
 
94734
        }
-
 
94735
        switch (field.id) {
-
 
94736
          case 0: // SUCCESS
-
 
94737
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
94738
              this.success = iprot.readI64();
-
 
94739
              setSuccessIsSet(true);
-
 
94740
            } else { 
-
 
94741
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
94742
            }
-
 
94743
            break;
-
 
94744
          default:
-
 
94745
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
94746
        }
-
 
94747
        iprot.readFieldEnd();
-
 
94748
      }
-
 
94749
      iprot.readStructEnd();
-
 
94750
      validate();
-
 
94751
    }
-
 
94752
 
-
 
94753
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
94754
      oprot.writeStructBegin(STRUCT_DESC);
-
 
94755
 
-
 
94756
      if (this.isSetSuccess()) {
-
 
94757
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
94758
        oprot.writeI64(this.success);
-
 
94759
        oprot.writeFieldEnd();
-
 
94760
      }
-
 
94761
      oprot.writeFieldStop();
-
 
94762
      oprot.writeStructEnd();
-
 
94763
    }
-
 
94764
 
-
 
94765
    @Override
-
 
94766
    public String toString() {
-
 
94767
      StringBuilder sb = new StringBuilder("getPrefferedInsurerForItem_result(");
-
 
94768
      boolean first = true;
-
 
94769
 
-
 
94770
      sb.append("success:");
-
 
94771
      sb.append(this.success);
-
 
94772
      first = false;
94005
      sb.append(")");
94773
      sb.append(")");
94006
      return sb.toString();
94774
      return sb.toString();
94007
    }
94775
    }
94008
 
94776
 
94009
    public void validate() throws org.apache.thrift.TException {
94777
    public void validate() throws org.apache.thrift.TException {