Subversion Repositories SmartDukaan

Rev

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

Rev 4189 Rev 4494
Line 60... Line 60...
60
     */
60
     */
61
    public String getRuleDocString(String ruleName) throws org.apache.thrift.TException;
61
    public String getRuleDocString(String ruleName) throws org.apache.thrift.TException;
62
 
62
 
63
    public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException;
63
    public List<ItemCouponDiscount> getItemDiscountMap(List<Long> itemIds) throws PromotionException, org.apache.thrift.TException;
64
 
64
 
-
 
65
    public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException;
-
 
66
 
65
  }
67
  }
66
 
68
 
67
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
69
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
68
 
70
 
69
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPromotion_call> resultHandler) throws org.apache.thrift.TException;
71
    public void createPromotion(String name, String ruleExecutionSrc, long startOn, long endOn, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPromotion_call> resultHandler) throws org.apache.thrift.TException;
Line 86... Line 88...
86
 
88
 
87
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
89
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
88
 
90
 
89
    public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException;
91
    public void getItemDiscountMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemDiscountMap_call> resultHandler) throws org.apache.thrift.TException;
90
 
92
 
-
 
93
    public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException;
-
 
94
 
91
  }
95
  }
92
 
96
 
93
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
97
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
94
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
98
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
95
      public Factory() {}
99
      public Factory() {}
Line 388... Line 392...
388
        throw result.pex;
392
        throw result.pex;
389
      }
393
      }
390
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemDiscountMap failed: unknown result");
394
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemDiscountMap failed: unknown result");
391
    }
395
    }
392
 
396
 
-
 
397
    public Map<String,Double> getDiscountsForEntity(long entityId) throws org.apache.thrift.TException
-
 
398
    {
-
 
399
      send_getDiscountsForEntity(entityId);
-
 
400
      return recv_getDiscountsForEntity();
-
 
401
    }
-
 
402
 
-
 
403
    public void send_getDiscountsForEntity(long entityId) throws org.apache.thrift.TException
-
 
404
    {
-
 
405
      getDiscountsForEntity_args args = new getDiscountsForEntity_args();
-
 
406
      args.setEntityId(entityId);
-
 
407
      sendBase("getDiscountsForEntity", args);
-
 
408
    }
-
 
409
 
-
 
410
    public Map<String,Double> recv_getDiscountsForEntity() throws org.apache.thrift.TException
-
 
411
    {
-
 
412
      getDiscountsForEntity_result result = new getDiscountsForEntity_result();
-
 
413
      receiveBase(result, "getDiscountsForEntity");
-
 
414
      if (result.isSetSuccess()) {
-
 
415
        return result.success;
-
 
416
      }
-
 
417
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
-
 
418
    }
-
 
419
 
393
  }
420
  }
394
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
421
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
395
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
422
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
396
      private org.apache.thrift.async.TAsyncClientManager clientManager;
423
      private org.apache.thrift.async.TAsyncClientManager clientManager;
397
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
424
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
Line 776... Line 803...
776
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
803
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
777
        return (new Client(prot)).recv_getItemDiscountMap();
804
        return (new Client(prot)).recv_getItemDiscountMap();
778
      }
805
      }
779
    }
806
    }
780
 
807
 
-
 
808
    public void getDiscountsForEntity(long entityId, org.apache.thrift.async.AsyncMethodCallback<getDiscountsForEntity_call> resultHandler) throws org.apache.thrift.TException {
-
 
809
      checkReady();
-
 
810
      getDiscountsForEntity_call method_call = new getDiscountsForEntity_call(entityId, resultHandler, this, ___protocolFactory, ___transport);
-
 
811
      this.___currentMethod = method_call;
-
 
812
      ___manager.call(method_call);
-
 
813
    }
-
 
814
 
-
 
815
    public static class getDiscountsForEntity_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
816
      private long entityId;
-
 
817
      public getDiscountsForEntity_call(long entityId, org.apache.thrift.async.AsyncMethodCallback<getDiscountsForEntity_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 {
-
 
818
        super(client, protocolFactory, transport, resultHandler, false);
-
 
819
        this.entityId = entityId;
-
 
820
      }
-
 
821
 
-
 
822
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
823
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDiscountsForEntity", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
824
        getDiscountsForEntity_args args = new getDiscountsForEntity_args();
-
 
825
        args.setEntityId(entityId);
-
 
826
        args.write(prot);
-
 
827
        prot.writeMessageEnd();
-
 
828
      }
-
 
829
 
-
 
830
      public Map<String,Double> getResult() throws org.apache.thrift.TException {
-
 
831
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
832
          throw new IllegalStateException("Method call not finished!");
-
 
833
        }
-
 
834
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
835
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
836
        return (new Client(prot)).recv_getDiscountsForEntity();
-
 
837
      }
-
 
838
    }
-
 
839
 
781
  }
840
  }
782
 
841
 
783
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
842
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
784
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
843
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
785
    public Processor(I iface) {
844
    public Processor(I iface) {
Line 800... Line 859...
800
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
859
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
801
      processMap.put("getActiveCoupons", new getActiveCoupons());
860
      processMap.put("getActiveCoupons", new getActiveCoupons());
802
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
861
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
803
      processMap.put("getRuleDocString", new getRuleDocString());
862
      processMap.put("getRuleDocString", new getRuleDocString());
804
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
863
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
-
 
864
      processMap.put("getDiscountsForEntity", new getDiscountsForEntity());
805
      return processMap;
865
      return processMap;
806
    }
866
    }
807
 
867
 
808
    private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
868
    private static class createPromotion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPromotion_args> {
809
      public createPromotion() {
869
      public createPromotion() {
Line 1021... Line 1081...
1021
        }
1081
        }
1022
        return result;
1082
        return result;
1023
      }
1083
      }
1024
    }
1084
    }
1025
 
1085
 
-
 
1086
    private static class getDiscountsForEntity<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getDiscountsForEntity_args> {
-
 
1087
      public getDiscountsForEntity() {
-
 
1088
        super("getDiscountsForEntity");
-
 
1089
      }
-
 
1090
 
-
 
1091
      protected getDiscountsForEntity_args getEmptyArgsInstance() {
-
 
1092
        return new getDiscountsForEntity_args();
-
 
1093
      }
-
 
1094
 
-
 
1095
      protected getDiscountsForEntity_result getResult(I iface, getDiscountsForEntity_args args) throws org.apache.thrift.TException {
-
 
1096
        getDiscountsForEntity_result result = new getDiscountsForEntity_result();
-
 
1097
        result.success = iface.getDiscountsForEntity(args.entityId);
-
 
1098
        return result;
-
 
1099
      }
-
 
1100
    }
-
 
1101
 
1026
  }
1102
  }
1027
 
1103
 
1028
  public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable   {
1104
  public static class createPromotion_args implements org.apache.thrift.TBase<createPromotion_args, createPromotion_args._Fields>, java.io.Serializable, Cloneable   {
1029
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
1105
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPromotion_args");
1030
 
1106
 
Line 8735... Line 8811...
8735
      }
8811
      }
8736
      first = false;
8812
      first = false;
8737
      sb.append(")");
8813
      sb.append(")");
8738
      return sb.toString();
8814
      return sb.toString();
8739
    }
8815
    }
-
 
8816
 
-
 
8817
    public void validate() throws org.apache.thrift.TException {
-
 
8818
      // check for required fields
-
 
8819
    }
-
 
8820
 
-
 
8821
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
8822
      try {
-
 
8823
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
8824
      } catch (org.apache.thrift.TException te) {
-
 
8825
        throw new java.io.IOException(te);
-
 
8826
      }
-
 
8827
    }
-
 
8828
 
-
 
8829
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
8830
      try {
-
 
8831
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
8832
      } catch (org.apache.thrift.TException te) {
-
 
8833
        throw new java.io.IOException(te);
-
 
8834
      }
-
 
8835
    }
-
 
8836
 
-
 
8837
  }
-
 
8838
 
-
 
8839
  public static class getDiscountsForEntity_args implements org.apache.thrift.TBase<getDiscountsForEntity_args, getDiscountsForEntity_args._Fields>, java.io.Serializable, Cloneable   {
-
 
8840
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDiscountsForEntity_args");
-
 
8841
 
-
 
8842
    private static final org.apache.thrift.protocol.TField ENTITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("entityId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
8843
 
-
 
8844
    private long entityId; // required
-
 
8845
 
-
 
8846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
8847
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
8848
      ENTITY_ID((short)1, "entityId");
-
 
8849
 
-
 
8850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
8851
 
-
 
8852
      static {
-
 
8853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
8854
          byName.put(field.getFieldName(), field);
-
 
8855
        }
-
 
8856
      }
-
 
8857
 
-
 
8858
      /**
-
 
8859
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
8860
       */
-
 
8861
      public static _Fields findByThriftId(int fieldId) {
-
 
8862
        switch(fieldId) {
-
 
8863
          case 1: // ENTITY_ID
-
 
8864
            return ENTITY_ID;
-
 
8865
          default:
-
 
8866
            return null;
-
 
8867
        }
-
 
8868
      }
-
 
8869
 
-
 
8870
      /**
-
 
8871
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
8872
       * if it is not found.
-
 
8873
       */
-
 
8874
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
8875
        _Fields fields = findByThriftId(fieldId);
-
 
8876
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
8877
        return fields;
-
 
8878
      }
-
 
8879
 
-
 
8880
      /**
-
 
8881
       * Find the _Fields constant that matches name, or null if its not found.
-
 
8882
       */
-
 
8883
      public static _Fields findByName(String name) {
-
 
8884
        return byName.get(name);
-
 
8885
      }
-
 
8886
 
-
 
8887
      private final short _thriftId;
-
 
8888
      private final String _fieldName;
-
 
8889
 
-
 
8890
      _Fields(short thriftId, String fieldName) {
-
 
8891
        _thriftId = thriftId;
-
 
8892
        _fieldName = fieldName;
-
 
8893
      }
-
 
8894
 
-
 
8895
      public short getThriftFieldId() {
-
 
8896
        return _thriftId;
-
 
8897
      }
-
 
8898
 
-
 
8899
      public String getFieldName() {
-
 
8900
        return _fieldName;
-
 
8901
      }
-
 
8902
    }
-
 
8903
 
-
 
8904
    // isset id assignments
-
 
8905
    private static final int __ENTITYID_ISSET_ID = 0;
-
 
8906
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
8907
 
-
 
8908
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
8909
    static {
-
 
8910
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
8911
      tmpMap.put(_Fields.ENTITY_ID, new org.apache.thrift.meta_data.FieldMetaData("entityId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
8912
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
8913
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
8914
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDiscountsForEntity_args.class, metaDataMap);
-
 
8915
    }
-
 
8916
 
-
 
8917
    public getDiscountsForEntity_args() {
-
 
8918
    }
-
 
8919
 
-
 
8920
    public getDiscountsForEntity_args(
-
 
8921
      long entityId)
-
 
8922
    {
-
 
8923
      this();
-
 
8924
      this.entityId = entityId;
-
 
8925
      setEntityIdIsSet(true);
-
 
8926
    }
-
 
8927
 
-
 
8928
    /**
-
 
8929
     * Performs a deep copy on <i>other</i>.
-
 
8930
     */
-
 
8931
    public getDiscountsForEntity_args(getDiscountsForEntity_args other) {
-
 
8932
      __isset_bit_vector.clear();
-
 
8933
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
8934
      this.entityId = other.entityId;
-
 
8935
    }
-
 
8936
 
-
 
8937
    public getDiscountsForEntity_args deepCopy() {
-
 
8938
      return new getDiscountsForEntity_args(this);
-
 
8939
    }
-
 
8940
 
-
 
8941
    @Override
-
 
8942
    public void clear() {
-
 
8943
      setEntityIdIsSet(false);
-
 
8944
      this.entityId = 0;
-
 
8945
    }
-
 
8946
 
-
 
8947
    public long getEntityId() {
-
 
8948
      return this.entityId;
-
 
8949
    }
-
 
8950
 
-
 
8951
    public void setEntityId(long entityId) {
-
 
8952
      this.entityId = entityId;
-
 
8953
      setEntityIdIsSet(true);
-
 
8954
    }
-
 
8955
 
-
 
8956
    public void unsetEntityId() {
-
 
8957
      __isset_bit_vector.clear(__ENTITYID_ISSET_ID);
-
 
8958
    }
-
 
8959
 
-
 
8960
    /** Returns true if field entityId is set (has been assigned a value) and false otherwise */
-
 
8961
    public boolean isSetEntityId() {
-
 
8962
      return __isset_bit_vector.get(__ENTITYID_ISSET_ID);
-
 
8963
    }
-
 
8964
 
-
 
8965
    public void setEntityIdIsSet(boolean value) {
-
 
8966
      __isset_bit_vector.set(__ENTITYID_ISSET_ID, value);
-
 
8967
    }
-
 
8968
 
-
 
8969
    public void setFieldValue(_Fields field, Object value) {
-
 
8970
      switch (field) {
-
 
8971
      case ENTITY_ID:
-
 
8972
        if (value == null) {
-
 
8973
          unsetEntityId();
-
 
8974
        } else {
-
 
8975
          setEntityId((Long)value);
-
 
8976
        }
-
 
8977
        break;
-
 
8978
 
-
 
8979
      }
-
 
8980
    }
-
 
8981
 
-
 
8982
    public Object getFieldValue(_Fields field) {
-
 
8983
      switch (field) {
-
 
8984
      case ENTITY_ID:
-
 
8985
        return Long.valueOf(getEntityId());
-
 
8986
 
-
 
8987
      }
-
 
8988
      throw new IllegalStateException();
-
 
8989
    }
-
 
8990
 
-
 
8991
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
8992
    public boolean isSet(_Fields field) {
-
 
8993
      if (field == null) {
-
 
8994
        throw new IllegalArgumentException();
-
 
8995
      }
-
 
8996
 
-
 
8997
      switch (field) {
-
 
8998
      case ENTITY_ID:
-
 
8999
        return isSetEntityId();
-
 
9000
      }
-
 
9001
      throw new IllegalStateException();
-
 
9002
    }
-
 
9003
 
-
 
9004
    @Override
-
 
9005
    public boolean equals(Object that) {
-
 
9006
      if (that == null)
-
 
9007
        return false;
-
 
9008
      if (that instanceof getDiscountsForEntity_args)
-
 
9009
        return this.equals((getDiscountsForEntity_args)that);
-
 
9010
      return false;
-
 
9011
    }
-
 
9012
 
-
 
9013
    public boolean equals(getDiscountsForEntity_args that) {
-
 
9014
      if (that == null)
-
 
9015
        return false;
-
 
9016
 
-
 
9017
      boolean this_present_entityId = true;
-
 
9018
      boolean that_present_entityId = true;
-
 
9019
      if (this_present_entityId || that_present_entityId) {
-
 
9020
        if (!(this_present_entityId && that_present_entityId))
-
 
9021
          return false;
-
 
9022
        if (this.entityId != that.entityId)
-
 
9023
          return false;
-
 
9024
      }
-
 
9025
 
-
 
9026
      return true;
-
 
9027
    }
-
 
9028
 
-
 
9029
    @Override
-
 
9030
    public int hashCode() {
-
 
9031
      return 0;
-
 
9032
    }
-
 
9033
 
-
 
9034
    public int compareTo(getDiscountsForEntity_args other) {
-
 
9035
      if (!getClass().equals(other.getClass())) {
-
 
9036
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9037
      }
-
 
9038
 
-
 
9039
      int lastComparison = 0;
-
 
9040
      getDiscountsForEntity_args typedOther = (getDiscountsForEntity_args)other;
-
 
9041
 
-
 
9042
      lastComparison = Boolean.valueOf(isSetEntityId()).compareTo(typedOther.isSetEntityId());
-
 
9043
      if (lastComparison != 0) {
-
 
9044
        return lastComparison;
-
 
9045
      }
-
 
9046
      if (isSetEntityId()) {
-
 
9047
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.entityId, typedOther.entityId);
-
 
9048
        if (lastComparison != 0) {
-
 
9049
          return lastComparison;
-
 
9050
        }
-
 
9051
      }
-
 
9052
      return 0;
-
 
9053
    }
-
 
9054
 
-
 
9055
    public _Fields fieldForId(int fieldId) {
-
 
9056
      return _Fields.findByThriftId(fieldId);
-
 
9057
    }
-
 
9058
 
-
 
9059
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9060
      org.apache.thrift.protocol.TField field;
-
 
9061
      iprot.readStructBegin();
-
 
9062
      while (true)
-
 
9063
      {
-
 
9064
        field = iprot.readFieldBegin();
-
 
9065
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9066
          break;
-
 
9067
        }
-
 
9068
        switch (field.id) {
-
 
9069
          case 1: // ENTITY_ID
-
 
9070
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
9071
              this.entityId = iprot.readI64();
-
 
9072
              setEntityIdIsSet(true);
-
 
9073
            } else { 
-
 
9074
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9075
            }
-
 
9076
            break;
-
 
9077
          default:
-
 
9078
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9079
        }
-
 
9080
        iprot.readFieldEnd();
-
 
9081
      }
-
 
9082
      iprot.readStructEnd();
-
 
9083
      validate();
-
 
9084
    }
-
 
9085
 
-
 
9086
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9087
      validate();
-
 
9088
 
-
 
9089
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9090
      oprot.writeFieldBegin(ENTITY_ID_FIELD_DESC);
-
 
9091
      oprot.writeI64(this.entityId);
-
 
9092
      oprot.writeFieldEnd();
-
 
9093
      oprot.writeFieldStop();
-
 
9094
      oprot.writeStructEnd();
-
 
9095
    }
-
 
9096
 
-
 
9097
    @Override
-
 
9098
    public String toString() {
-
 
9099
      StringBuilder sb = new StringBuilder("getDiscountsForEntity_args(");
-
 
9100
      boolean first = true;
-
 
9101
 
-
 
9102
      sb.append("entityId:");
-
 
9103
      sb.append(this.entityId);
-
 
9104
      first = false;
-
 
9105
      sb.append(")");
-
 
9106
      return sb.toString();
-
 
9107
    }
-
 
9108
 
-
 
9109
    public void validate() throws org.apache.thrift.TException {
-
 
9110
      // check for required fields
-
 
9111
    }
-
 
9112
 
-
 
9113
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
9114
      try {
-
 
9115
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
9116
      } catch (org.apache.thrift.TException te) {
-
 
9117
        throw new java.io.IOException(te);
-
 
9118
      }
-
 
9119
    }
-
 
9120
 
-
 
9121
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
9122
      try {
-
 
9123
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
9124
        __isset_bit_vector = new BitSet(1);
-
 
9125
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
9126
      } catch (org.apache.thrift.TException te) {
-
 
9127
        throw new java.io.IOException(te);
-
 
9128
      }
-
 
9129
    }
-
 
9130
 
-
 
9131
  }
-
 
9132
 
-
 
9133
  public static class getDiscountsForEntity_result implements org.apache.thrift.TBase<getDiscountsForEntity_result, getDiscountsForEntity_result._Fields>, java.io.Serializable, Cloneable   {
-
 
9134
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDiscountsForEntity_result");
-
 
9135
 
-
 
9136
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
 
9137
 
-
 
9138
    private Map<String,Double> success; // required
-
 
9139
 
-
 
9140
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9141
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9142
      SUCCESS((short)0, "success");
-
 
9143
 
-
 
9144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9145
 
-
 
9146
      static {
-
 
9147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
9148
          byName.put(field.getFieldName(), field);
-
 
9149
        }
-
 
9150
      }
-
 
9151
 
-
 
9152
      /**
-
 
9153
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
9154
       */
-
 
9155
      public static _Fields findByThriftId(int fieldId) {
-
 
9156
        switch(fieldId) {
-
 
9157
          case 0: // SUCCESS
-
 
9158
            return SUCCESS;
-
 
9159
          default:
-
 
9160
            return null;
-
 
9161
        }
-
 
9162
      }
-
 
9163
 
-
 
9164
      /**
-
 
9165
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
9166
       * if it is not found.
-
 
9167
       */
-
 
9168
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
9169
        _Fields fields = findByThriftId(fieldId);
-
 
9170
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
9171
        return fields;
-
 
9172
      }
-
 
9173
 
-
 
9174
      /**
-
 
9175
       * Find the _Fields constant that matches name, or null if its not found.
-
 
9176
       */
-
 
9177
      public static _Fields findByName(String name) {
-
 
9178
        return byName.get(name);
-
 
9179
      }
-
 
9180
 
-
 
9181
      private final short _thriftId;
-
 
9182
      private final String _fieldName;
-
 
9183
 
-
 
9184
      _Fields(short thriftId, String fieldName) {
-
 
9185
        _thriftId = thriftId;
-
 
9186
        _fieldName = fieldName;
-
 
9187
      }
-
 
9188
 
-
 
9189
      public short getThriftFieldId() {
-
 
9190
        return _thriftId;
-
 
9191
      }
-
 
9192
 
-
 
9193
      public String getFieldName() {
-
 
9194
        return _fieldName;
-
 
9195
      }
-
 
9196
    }
-
 
9197
 
-
 
9198
    // isset id assignments
-
 
9199
 
-
 
9200
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
9201
    static {
-
 
9202
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
9203
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
9204
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
-
 
9205
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
-
 
9206
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
-
 
9207
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
9208
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDiscountsForEntity_result.class, metaDataMap);
-
 
9209
    }
-
 
9210
 
-
 
9211
    public getDiscountsForEntity_result() {
-
 
9212
    }
-
 
9213
 
-
 
9214
    public getDiscountsForEntity_result(
-
 
9215
      Map<String,Double> success)
-
 
9216
    {
-
 
9217
      this();
-
 
9218
      this.success = success;
-
 
9219
    }
-
 
9220
 
-
 
9221
    /**
-
 
9222
     * Performs a deep copy on <i>other</i>.
-
 
9223
     */
-
 
9224
    public getDiscountsForEntity_result(getDiscountsForEntity_result other) {
-
 
9225
      if (other.isSetSuccess()) {
-
 
9226
        Map<String,Double> __this__success = new HashMap<String,Double>();
-
 
9227
        for (Map.Entry<String, Double> other_element : other.success.entrySet()) {
-
 
9228
 
-
 
9229
          String other_element_key = other_element.getKey();
-
 
9230
          Double other_element_value = other_element.getValue();
-
 
9231
 
-
 
9232
          String __this__success_copy_key = other_element_key;
-
 
9233
 
-
 
9234
          Double __this__success_copy_value = other_element_value;
-
 
9235
 
-
 
9236
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
-
 
9237
        }
-
 
9238
        this.success = __this__success;
-
 
9239
      }
-
 
9240
    }
-
 
9241
 
-
 
9242
    public getDiscountsForEntity_result deepCopy() {
-
 
9243
      return new getDiscountsForEntity_result(this);
-
 
9244
    }
-
 
9245
 
-
 
9246
    @Override
-
 
9247
    public void clear() {
-
 
9248
      this.success = null;
-
 
9249
    }
-
 
9250
 
-
 
9251
    public int getSuccessSize() {
-
 
9252
      return (this.success == null) ? 0 : this.success.size();
-
 
9253
    }
-
 
9254
 
-
 
9255
    public void putToSuccess(String key, double val) {
-
 
9256
      if (this.success == null) {
-
 
9257
        this.success = new HashMap<String,Double>();
-
 
9258
      }
-
 
9259
      this.success.put(key, val);
-
 
9260
    }
-
 
9261
 
-
 
9262
    public Map<String,Double> getSuccess() {
-
 
9263
      return this.success;
-
 
9264
    }
-
 
9265
 
-
 
9266
    public void setSuccess(Map<String,Double> success) {
-
 
9267
      this.success = success;
-
 
9268
    }
-
 
9269
 
-
 
9270
    public void unsetSuccess() {
-
 
9271
      this.success = null;
-
 
9272
    }
-
 
9273
 
-
 
9274
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
9275
    public boolean isSetSuccess() {
-
 
9276
      return this.success != null;
-
 
9277
    }
-
 
9278
 
-
 
9279
    public void setSuccessIsSet(boolean value) {
-
 
9280
      if (!value) {
-
 
9281
        this.success = null;
-
 
9282
      }
-
 
9283
    }
-
 
9284
 
-
 
9285
    public void setFieldValue(_Fields field, Object value) {
-
 
9286
      switch (field) {
-
 
9287
      case SUCCESS:
-
 
9288
        if (value == null) {
-
 
9289
          unsetSuccess();
-
 
9290
        } else {
-
 
9291
          setSuccess((Map<String,Double>)value);
-
 
9292
        }
-
 
9293
        break;
-
 
9294
 
-
 
9295
      }
-
 
9296
    }
-
 
9297
 
-
 
9298
    public Object getFieldValue(_Fields field) {
-
 
9299
      switch (field) {
-
 
9300
      case SUCCESS:
-
 
9301
        return getSuccess();
-
 
9302
 
-
 
9303
      }
-
 
9304
      throw new IllegalStateException();
-
 
9305
    }
-
 
9306
 
-
 
9307
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
9308
    public boolean isSet(_Fields field) {
-
 
9309
      if (field == null) {
-
 
9310
        throw new IllegalArgumentException();
-
 
9311
      }
-
 
9312
 
-
 
9313
      switch (field) {
-
 
9314
      case SUCCESS:
-
 
9315
        return isSetSuccess();
-
 
9316
      }
-
 
9317
      throw new IllegalStateException();
-
 
9318
    }
-
 
9319
 
-
 
9320
    @Override
-
 
9321
    public boolean equals(Object that) {
-
 
9322
      if (that == null)
-
 
9323
        return false;
-
 
9324
      if (that instanceof getDiscountsForEntity_result)
-
 
9325
        return this.equals((getDiscountsForEntity_result)that);
-
 
9326
      return false;
-
 
9327
    }
-
 
9328
 
-
 
9329
    public boolean equals(getDiscountsForEntity_result that) {
-
 
9330
      if (that == null)
-
 
9331
        return false;
-
 
9332
 
-
 
9333
      boolean this_present_success = true && this.isSetSuccess();
-
 
9334
      boolean that_present_success = true && that.isSetSuccess();
-
 
9335
      if (this_present_success || that_present_success) {
-
 
9336
        if (!(this_present_success && that_present_success))
-
 
9337
          return false;
-
 
9338
        if (!this.success.equals(that.success))
-
 
9339
          return false;
-
 
9340
      }
-
 
9341
 
-
 
9342
      return true;
-
 
9343
    }
-
 
9344
 
-
 
9345
    @Override
-
 
9346
    public int hashCode() {
-
 
9347
      return 0;
-
 
9348
    }
-
 
9349
 
-
 
9350
    public int compareTo(getDiscountsForEntity_result other) {
-
 
9351
      if (!getClass().equals(other.getClass())) {
-
 
9352
        return getClass().getName().compareTo(other.getClass().getName());
-
 
9353
      }
-
 
9354
 
-
 
9355
      int lastComparison = 0;
-
 
9356
      getDiscountsForEntity_result typedOther = (getDiscountsForEntity_result)other;
-
 
9357
 
-
 
9358
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
9359
      if (lastComparison != 0) {
-
 
9360
        return lastComparison;
-
 
9361
      }
-
 
9362
      if (isSetSuccess()) {
-
 
9363
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
9364
        if (lastComparison != 0) {
-
 
9365
          return lastComparison;
-
 
9366
        }
-
 
9367
      }
-
 
9368
      return 0;
-
 
9369
    }
-
 
9370
 
-
 
9371
    public _Fields fieldForId(int fieldId) {
-
 
9372
      return _Fields.findByThriftId(fieldId);
-
 
9373
    }
-
 
9374
 
-
 
9375
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
9376
      org.apache.thrift.protocol.TField field;
-
 
9377
      iprot.readStructBegin();
-
 
9378
      while (true)
-
 
9379
      {
-
 
9380
        field = iprot.readFieldBegin();
-
 
9381
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
9382
          break;
-
 
9383
        }
-
 
9384
        switch (field.id) {
-
 
9385
          case 0: // SUCCESS
-
 
9386
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
-
 
9387
              {
-
 
9388
                org.apache.thrift.protocol.TMap _map32 = iprot.readMapBegin();
-
 
9389
                this.success = new HashMap<String,Double>(2*_map32.size);
-
 
9390
                for (int _i33 = 0; _i33 < _map32.size; ++_i33)
-
 
9391
                {
-
 
9392
                  String _key34; // required
-
 
9393
                  double _val35; // required
-
 
9394
                  _key34 = iprot.readString();
-
 
9395
                  _val35 = iprot.readDouble();
-
 
9396
                  this.success.put(_key34, _val35);
-
 
9397
                }
-
 
9398
                iprot.readMapEnd();
-
 
9399
              }
-
 
9400
            } else { 
-
 
9401
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9402
            }
-
 
9403
            break;
-
 
9404
          default:
-
 
9405
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
9406
        }
-
 
9407
        iprot.readFieldEnd();
-
 
9408
      }
-
 
9409
      iprot.readStructEnd();
-
 
9410
      validate();
-
 
9411
    }
-
 
9412
 
-
 
9413
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
9414
      oprot.writeStructBegin(STRUCT_DESC);
-
 
9415
 
-
 
9416
      if (this.isSetSuccess()) {
-
 
9417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
9418
        {
-
 
9419
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
-
 
9420
          for (Map.Entry<String, Double> _iter36 : this.success.entrySet())
-
 
9421
          {
-
 
9422
            oprot.writeString(_iter36.getKey());
-
 
9423
            oprot.writeDouble(_iter36.getValue());
-
 
9424
          }
-
 
9425
          oprot.writeMapEnd();
-
 
9426
        }
-
 
9427
        oprot.writeFieldEnd();
-
 
9428
      }
-
 
9429
      oprot.writeFieldStop();
-
 
9430
      oprot.writeStructEnd();
-
 
9431
    }
-
 
9432
 
-
 
9433
    @Override
-
 
9434
    public String toString() {
-
 
9435
      StringBuilder sb = new StringBuilder("getDiscountsForEntity_result(");
-
 
9436
      boolean first = true;
-
 
9437
 
-
 
9438
      sb.append("success:");
-
 
9439
      if (this.success == null) {
-
 
9440
        sb.append("null");
-
 
9441
      } else {
-
 
9442
        sb.append(this.success);
-
 
9443
      }
-
 
9444
      first = false;
-
 
9445
      sb.append(")");
-
 
9446
      return sb.toString();
-
 
9447
    }
8740
 
9448
 
8741
    public void validate() throws org.apache.thrift.TException {
9449
    public void validate() throws org.apache.thrift.TException {
8742
      // check for required fields
9450
      // check for required fields
8743
    }
9451
    }
8744
 
9452