Subversion Repositories SmartDukaan

Rev

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

Rev 6679 Rev 6730
Line 60... Line 60...
60
 
60
 
61
    /**
61
    /**
62
     * Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
62
     * Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
63
     * 
63
     * 
64
     * @param promotionId
64
     * @param promotionId
-
 
65
     * @param couponCode
65
     * @param arguments
66
     * @param arguments
66
     * @param isCod
67
     * @param isCod
67
     * @param prefix
68
     * @param prefix
68
     */
69
     */
69
    public String createCoupon(long promotionId, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException;
70
    public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException;
70
 
71
 
71
    /**
72
    /**
72
     * Returns the count of successful payments done using a given coupon
73
     * Returns the count of successful payments done using a given coupon
73
     * 
74
     * 
74
     * @param couponCode
75
     * @param couponCode
Line 122... Line 123...
122
 
123
 
123
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
124
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
124
 
125
 
125
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
126
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
126
 
127
 
127
    public void createCoupon(long promotionId, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
128
    public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
128
 
129
 
129
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
130
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
130
 
131
 
131
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
132
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
132
 
133
 
Line 520... Line 521...
520
        throw result.pex;
521
        throw result.pex;
521
      }
522
      }
522
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
523
    }
524
    }
524
 
525
 
525
    public String createCoupon(long promotionId, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException
526
    public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException
526
    {
527
    {
527
      send_createCoupon(promotionId, arguments, isCod, prefix);
528
      send_createCoupon(promotionId, couponCode, arguments, isCod, prefix);
528
      return recv_createCoupon();
529
      return recv_createCoupon();
529
    }
530
    }
530
 
531
 
531
    public void send_createCoupon(long promotionId, String arguments, boolean isCod, String prefix) throws org.apache.thrift.TException
532
    public void send_createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws org.apache.thrift.TException
532
    {
533
    {
533
      createCoupon_args args = new createCoupon_args();
534
      createCoupon_args args = new createCoupon_args();
534
      args.setPromotionId(promotionId);
535
      args.setPromotionId(promotionId);
-
 
536
      args.setCouponCode(couponCode);
535
      args.setArguments(arguments);
537
      args.setArguments(arguments);
536
      args.setIsCod(isCod);
538
      args.setIsCod(isCod);
537
      args.setPrefix(prefix);
539
      args.setPrefix(prefix);
538
      sendBase("createCoupon", args);
540
      sendBase("createCoupon", args);
539
    }
541
    }
Line 1207... Line 1209...
1207
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1209
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1208
        return (new Client(prot)).recv_getActiveCoupons();
1210
        return (new Client(prot)).recv_getActiveCoupons();
1209
      }
1211
      }
1210
    }
1212
    }
1211
 
1213
 
1212
    public void createCoupon(long promotionId, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
1214
    public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
1213
      checkReady();
1215
      checkReady();
1214
      createCoupon_call method_call = new createCoupon_call(promotionId, arguments, isCod, prefix, resultHandler, this, ___protocolFactory, ___transport);
1216
      createCoupon_call method_call = new createCoupon_call(promotionId, couponCode, arguments, isCod, prefix, resultHandler, this, ___protocolFactory, ___transport);
1215
      this.___currentMethod = method_call;
1217
      this.___currentMethod = method_call;
1216
      ___manager.call(method_call);
1218
      ___manager.call(method_call);
1217
    }
1219
    }
1218
 
1220
 
1219
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
1221
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
1220
      private long promotionId;
1222
      private long promotionId;
-
 
1223
      private String couponCode;
1221
      private String arguments;
1224
      private String arguments;
1222
      private boolean isCod;
1225
      private boolean isCod;
1223
      private String prefix;
1226
      private String prefix;
1224
      public createCoupon_call(long promotionId, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_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 {
1227
      public createCoupon_call(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_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 {
1225
        super(client, protocolFactory, transport, resultHandler, false);
1228
        super(client, protocolFactory, transport, resultHandler, false);
1226
        this.promotionId = promotionId;
1229
        this.promotionId = promotionId;
-
 
1230
        this.couponCode = couponCode;
1227
        this.arguments = arguments;
1231
        this.arguments = arguments;
1228
        this.isCod = isCod;
1232
        this.isCod = isCod;
1229
        this.prefix = prefix;
1233
        this.prefix = prefix;
1230
      }
1234
      }
1231
 
1235
 
1232
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1236
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1233
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1237
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1234
        createCoupon_args args = new createCoupon_args();
1238
        createCoupon_args args = new createCoupon_args();
1235
        args.setPromotionId(promotionId);
1239
        args.setPromotionId(promotionId);
-
 
1240
        args.setCouponCode(couponCode);
1236
        args.setArguments(arguments);
1241
        args.setArguments(arguments);
1237
        args.setIsCod(isCod);
1242
        args.setIsCod(isCod);
1238
        args.setPrefix(prefix);
1243
        args.setPrefix(prefix);
1239
        args.write(prot);
1244
        args.write(prot);
1240
        prot.writeMessageEnd();
1245
        prot.writeMessageEnd();
Line 1817... Line 1822...
1817
      }
1822
      }
1818
 
1823
 
1819
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
1824
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
1820
        createCoupon_result result = new createCoupon_result();
1825
        createCoupon_result result = new createCoupon_result();
1821
        try {
1826
        try {
1822
          result.success = iface.createCoupon(args.promotionId, args.arguments, args.isCod, args.prefix);
1827
          result.success = iface.createCoupon(args.promotionId, args.couponCode, args.arguments, args.isCod, args.prefix);
1823
        } catch (PromotionException pex) {
1828
        } catch (PromotionException pex) {
1824
          result.pex = pex;
1829
          result.pex = pex;
1825
        }
1830
        }
1826
        return result;
1831
        return result;
1827
      }
1832
      }
Line 11894... Line 11899...
11894
 
11899
 
11895
  public static class createCoupon_args implements org.apache.thrift.TBase<createCoupon_args, createCoupon_args._Fields>, java.io.Serializable, Cloneable   {
11900
  public static class createCoupon_args implements org.apache.thrift.TBase<createCoupon_args, createCoupon_args._Fields>, java.io.Serializable, Cloneable   {
11896
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_args");
11901
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_args");
11897
 
11902
 
11898
    private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
11903
    private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
11904
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)2);
11899
    private static final org.apache.thrift.protocol.TField ARGUMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("arguments", org.apache.thrift.protocol.TType.STRING, (short)2);
11905
    private static final org.apache.thrift.protocol.TField ARGUMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("arguments", org.apache.thrift.protocol.TType.STRING, (short)3);
11900
    private static final org.apache.thrift.protocol.TField IS_COD_FIELD_DESC = new org.apache.thrift.protocol.TField("isCod", org.apache.thrift.protocol.TType.BOOL, (short)3);
11906
    private static final org.apache.thrift.protocol.TField IS_COD_FIELD_DESC = new org.apache.thrift.protocol.TField("isCod", org.apache.thrift.protocol.TType.BOOL, (short)4);
11901
    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)4);
11907
    private static final org.apache.thrift.protocol.TField PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("prefix", org.apache.thrift.protocol.TType.STRING, (short)5);
11902
 
11908
 
11903
    private long promotionId; // required
11909
    private long promotionId; // required
-
 
11910
    private String couponCode; // required
11904
    private String arguments; // required
11911
    private String arguments; // required
11905
    private boolean isCod; // required
11912
    private boolean isCod; // required
11906
    private String prefix; // required
11913
    private String prefix; // required
11907
 
11914
 
11908
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11909
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11916
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11910
      PROMOTION_ID((short)1, "promotionId"),
11917
      PROMOTION_ID((short)1, "promotionId"),
-
 
11918
      COUPON_CODE((short)2, "couponCode"),
11911
      ARGUMENTS((short)2, "arguments"),
11919
      ARGUMENTS((short)3, "arguments"),
11912
      IS_COD((short)3, "isCod"),
11920
      IS_COD((short)4, "isCod"),
11913
      PREFIX((short)4, "prefix");
11921
      PREFIX((short)5, "prefix");
11914
 
11922
 
11915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11916
 
11924
 
11917
      static {
11925
      static {
11918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 11925... Line 11933...
11925
       */
11933
       */
11926
      public static _Fields findByThriftId(int fieldId) {
11934
      public static _Fields findByThriftId(int fieldId) {
11927
        switch(fieldId) {
11935
        switch(fieldId) {
11928
          case 1: // PROMOTION_ID
11936
          case 1: // PROMOTION_ID
11929
            return PROMOTION_ID;
11937
            return PROMOTION_ID;
-
 
11938
          case 2: // COUPON_CODE
-
 
11939
            return COUPON_CODE;
11930
          case 2: // ARGUMENTS
11940
          case 3: // ARGUMENTS
11931
            return ARGUMENTS;
11941
            return ARGUMENTS;
11932
          case 3: // IS_COD
11942
          case 4: // IS_COD
11933
            return IS_COD;
11943
            return IS_COD;
11934
          case 4: // PREFIX
11944
          case 5: // PREFIX
11935
            return PREFIX;
11945
            return PREFIX;
11936
          default:
11946
          default:
11937
            return null;
11947
            return null;
11938
        }
11948
        }
11939
      }
11949
      }
Line 11980... Line 11990...
11980
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11990
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11981
    static {
11991
    static {
11982
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11992
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11983
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11993
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11984
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11994
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
11995
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11996
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
11985
      tmpMap.put(_Fields.ARGUMENTS, new org.apache.thrift.meta_data.FieldMetaData("arguments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11997
      tmpMap.put(_Fields.ARGUMENTS, new org.apache.thrift.meta_data.FieldMetaData("arguments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11986
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
11998
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
11987
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11999
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11988
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
12000
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
11989
      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12001
      tmpMap.put(_Fields.PREFIX, new org.apache.thrift.meta_data.FieldMetaData("prefix", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 11995... Line 12007...
11995
    public createCoupon_args() {
12007
    public createCoupon_args() {
11996
    }
12008
    }
11997
 
12009
 
11998
    public createCoupon_args(
12010
    public createCoupon_args(
11999
      long promotionId,
12011
      long promotionId,
-
 
12012
      String couponCode,
12000
      String arguments,
12013
      String arguments,
12001
      boolean isCod,
12014
      boolean isCod,
12002
      String prefix)
12015
      String prefix)
12003
    {
12016
    {
12004
      this();
12017
      this();
12005
      this.promotionId = promotionId;
12018
      this.promotionId = promotionId;
12006
      setPromotionIdIsSet(true);
12019
      setPromotionIdIsSet(true);
-
 
12020
      this.couponCode = couponCode;
12007
      this.arguments = arguments;
12021
      this.arguments = arguments;
12008
      this.isCod = isCod;
12022
      this.isCod = isCod;
12009
      setIsCodIsSet(true);
12023
      setIsCodIsSet(true);
12010
      this.prefix = prefix;
12024
      this.prefix = prefix;
12011
    }
12025
    }
Line 12015... Line 12029...
12015
     */
12029
     */
12016
    public createCoupon_args(createCoupon_args other) {
12030
    public createCoupon_args(createCoupon_args other) {
12017
      __isset_bit_vector.clear();
12031
      __isset_bit_vector.clear();
12018
      __isset_bit_vector.or(other.__isset_bit_vector);
12032
      __isset_bit_vector.or(other.__isset_bit_vector);
12019
      this.promotionId = other.promotionId;
12033
      this.promotionId = other.promotionId;
-
 
12034
      if (other.isSetCouponCode()) {
-
 
12035
        this.couponCode = other.couponCode;
-
 
12036
      }
12020
      if (other.isSetArguments()) {
12037
      if (other.isSetArguments()) {
12021
        this.arguments = other.arguments;
12038
        this.arguments = other.arguments;
12022
      }
12039
      }
12023
      this.isCod = other.isCod;
12040
      this.isCod = other.isCod;
12024
      if (other.isSetPrefix()) {
12041
      if (other.isSetPrefix()) {
Line 12032... Line 12049...
12032
 
12049
 
12033
    @Override
12050
    @Override
12034
    public void clear() {
12051
    public void clear() {
12035
      setPromotionIdIsSet(false);
12052
      setPromotionIdIsSet(false);
12036
      this.promotionId = 0;
12053
      this.promotionId = 0;
-
 
12054
      this.couponCode = null;
12037
      this.arguments = null;
12055
      this.arguments = null;
12038
      setIsCodIsSet(false);
12056
      setIsCodIsSet(false);
12039
      this.isCod = false;
12057
      this.isCod = false;
12040
      this.prefix = null;
12058
      this.prefix = null;
12041
    }
12059
    }
Line 12060... Line 12078...
12060
 
12078
 
12061
    public void setPromotionIdIsSet(boolean value) {
12079
    public void setPromotionIdIsSet(boolean value) {
12062
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
12080
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
12063
    }
12081
    }
12064
 
12082
 
-
 
12083
    public String getCouponCode() {
-
 
12084
      return this.couponCode;
-
 
12085
    }
-
 
12086
 
-
 
12087
    public void setCouponCode(String couponCode) {
-
 
12088
      this.couponCode = couponCode;
-
 
12089
    }
-
 
12090
 
-
 
12091
    public void unsetCouponCode() {
-
 
12092
      this.couponCode = null;
-
 
12093
    }
-
 
12094
 
-
 
12095
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
-
 
12096
    public boolean isSetCouponCode() {
-
 
12097
      return this.couponCode != null;
-
 
12098
    }
-
 
12099
 
-
 
12100
    public void setCouponCodeIsSet(boolean value) {
-
 
12101
      if (!value) {
-
 
12102
        this.couponCode = null;
-
 
12103
      }
-
 
12104
    }
-
 
12105
 
12065
    public String getArguments() {
12106
    public String getArguments() {
12066
      return this.arguments;
12107
      return this.arguments;
12067
    }
12108
    }
12068
 
12109
 
12069
    public void setArguments(String arguments) {
12110
    public void setArguments(String arguments) {
Line 12138... Line 12179...
12138
        } else {
12179
        } else {
12139
          setPromotionId((Long)value);
12180
          setPromotionId((Long)value);
12140
        }
12181
        }
12141
        break;
12182
        break;
12142
 
12183
 
-
 
12184
      case COUPON_CODE:
-
 
12185
        if (value == null) {
-
 
12186
          unsetCouponCode();
-
 
12187
        } else {
-
 
12188
          setCouponCode((String)value);
-
 
12189
        }
-
 
12190
        break;
-
 
12191
 
12143
      case ARGUMENTS:
12192
      case ARGUMENTS:
12144
        if (value == null) {
12193
        if (value == null) {
12145
          unsetArguments();
12194
          unsetArguments();
12146
        } else {
12195
        } else {
12147
          setArguments((String)value);
12196
          setArguments((String)value);
Line 12170... Line 12219...
12170
    public Object getFieldValue(_Fields field) {
12219
    public Object getFieldValue(_Fields field) {
12171
      switch (field) {
12220
      switch (field) {
12172
      case PROMOTION_ID:
12221
      case PROMOTION_ID:
12173
        return Long.valueOf(getPromotionId());
12222
        return Long.valueOf(getPromotionId());
12174
 
12223
 
-
 
12224
      case COUPON_CODE:
-
 
12225
        return getCouponCode();
-
 
12226
 
12175
      case ARGUMENTS:
12227
      case ARGUMENTS:
12176
        return getArguments();
12228
        return getArguments();
12177
 
12229
 
12178
      case IS_COD:
12230
      case IS_COD:
12179
        return Boolean.valueOf(isIsCod());
12231
        return Boolean.valueOf(isIsCod());
Line 12192... Line 12244...
12192
      }
12244
      }
12193
 
12245
 
12194
      switch (field) {
12246
      switch (field) {
12195
      case PROMOTION_ID:
12247
      case PROMOTION_ID:
12196
        return isSetPromotionId();
12248
        return isSetPromotionId();
-
 
12249
      case COUPON_CODE:
-
 
12250
        return isSetCouponCode();
12197
      case ARGUMENTS:
12251
      case ARGUMENTS:
12198
        return isSetArguments();
12252
        return isSetArguments();
12199
      case IS_COD:
12253
      case IS_COD:
12200
        return isSetIsCod();
12254
        return isSetIsCod();
12201
      case PREFIX:
12255
      case PREFIX:
Line 12224... Line 12278...
12224
          return false;
12278
          return false;
12225
        if (this.promotionId != that.promotionId)
12279
        if (this.promotionId != that.promotionId)
12226
          return false;
12280
          return false;
12227
      }
12281
      }
12228
 
12282
 
-
 
12283
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
12284
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
12285
      if (this_present_couponCode || that_present_couponCode) {
-
 
12286
        if (!(this_present_couponCode && that_present_couponCode))
-
 
12287
          return false;
-
 
12288
        if (!this.couponCode.equals(that.couponCode))
-
 
12289
          return false;
-
 
12290
      }
-
 
12291
 
12229
      boolean this_present_arguments = true && this.isSetArguments();
12292
      boolean this_present_arguments = true && this.isSetArguments();
12230
      boolean that_present_arguments = true && that.isSetArguments();
12293
      boolean that_present_arguments = true && that.isSetArguments();
12231
      if (this_present_arguments || that_present_arguments) {
12294
      if (this_present_arguments || that_present_arguments) {
12232
        if (!(this_present_arguments && that_present_arguments))
12295
        if (!(this_present_arguments && that_present_arguments))
12233
          return false;
12296
          return false;
Line 12277... Line 12340...
12277
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
12340
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
12278
        if (lastComparison != 0) {
12341
        if (lastComparison != 0) {
12279
          return lastComparison;
12342
          return lastComparison;
12280
        }
12343
        }
12281
      }
12344
      }
-
 
12345
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
-
 
12346
      if (lastComparison != 0) {
-
 
12347
        return lastComparison;
-
 
12348
      }
-
 
12349
      if (isSetCouponCode()) {
-
 
12350
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
-
 
12351
        if (lastComparison != 0) {
-
 
12352
          return lastComparison;
-
 
12353
        }
-
 
12354
      }
12282
      lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments());
12355
      lastComparison = Boolean.valueOf(isSetArguments()).compareTo(typedOther.isSetArguments());
12283
      if (lastComparison != 0) {
12356
      if (lastComparison != 0) {
12284
        return lastComparison;
12357
        return lastComparison;
12285
      }
12358
      }
12286
      if (isSetArguments()) {
12359
      if (isSetArguments()) {
Line 12332... Line 12405...
12332
              setPromotionIdIsSet(true);
12405
              setPromotionIdIsSet(true);
12333
            } else { 
12406
            } else { 
12334
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12407
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12335
            }
12408
            }
12336
            break;
12409
            break;
-
 
12410
          case 2: // COUPON_CODE
-
 
12411
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
12412
              this.couponCode = iprot.readString();
-
 
12413
            } else { 
-
 
12414
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12415
            }
-
 
12416
            break;
12337
          case 2: // ARGUMENTS
12417
          case 3: // ARGUMENTS
12338
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12418
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12339
              this.arguments = iprot.readString();
12419
              this.arguments = iprot.readString();
12340
            } else { 
12420
            } else { 
12341
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12421
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12342
            }
12422
            }
12343
            break;
12423
            break;
12344
          case 3: // IS_COD
12424
          case 4: // IS_COD
12345
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
12425
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
12346
              this.isCod = iprot.readBool();
12426
              this.isCod = iprot.readBool();
12347
              setIsCodIsSet(true);
12427
              setIsCodIsSet(true);
12348
            } else { 
12428
            } else { 
12349
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12429
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12350
            }
12430
            }
12351
            break;
12431
            break;
12352
          case 4: // PREFIX
12432
          case 5: // PREFIX
12353
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12433
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12354
              this.prefix = iprot.readString();
12434
              this.prefix = iprot.readString();
12355
            } else { 
12435
            } else { 
12356
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12436
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12357
            }
12437
            }
Line 12370... Line 12450...
12370
 
12450
 
12371
      oprot.writeStructBegin(STRUCT_DESC);
12451
      oprot.writeStructBegin(STRUCT_DESC);
12372
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
12452
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
12373
      oprot.writeI64(this.promotionId);
12453
      oprot.writeI64(this.promotionId);
12374
      oprot.writeFieldEnd();
12454
      oprot.writeFieldEnd();
-
 
12455
      if (this.couponCode != null) {
-
 
12456
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
12457
        oprot.writeString(this.couponCode);
-
 
12458
        oprot.writeFieldEnd();
-
 
12459
      }
12375
      if (this.arguments != null) {
12460
      if (this.arguments != null) {
12376
        oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
12461
        oprot.writeFieldBegin(ARGUMENTS_FIELD_DESC);
12377
        oprot.writeString(this.arguments);
12462
        oprot.writeString(this.arguments);
12378
        oprot.writeFieldEnd();
12463
        oprot.writeFieldEnd();
12379
      }
12464
      }
Line 12396... Line 12481...
12396
 
12481
 
12397
      sb.append("promotionId:");
12482
      sb.append("promotionId:");
12398
      sb.append(this.promotionId);
12483
      sb.append(this.promotionId);
12399
      first = false;
12484
      first = false;
12400
      if (!first) sb.append(", ");
12485
      if (!first) sb.append(", ");
-
 
12486
      sb.append("couponCode:");
-
 
12487
      if (this.couponCode == null) {
-
 
12488
        sb.append("null");
-
 
12489
      } else {
-
 
12490
        sb.append(this.couponCode);
-
 
12491
      }
-
 
12492
      first = false;
-
 
12493
      if (!first) sb.append(", ");
12401
      sb.append("arguments:");
12494
      sb.append("arguments:");
12402
      if (this.arguments == null) {
12495
      if (this.arguments == null) {
12403
        sb.append("null");
12496
        sb.append("null");
12404
      } else {
12497
      } else {
12405
        sb.append(this.arguments);
12498
        sb.append(this.arguments);