Subversion Repositories SmartDukaan

Rev

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

Rev 8201 Rev 8707
Line 66... Line 66...
66
 
66
 
67
    /**
67
    /**
68
     * Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
68
     * Creates a coupon with prefix (optional, pass null)and returns couponcode if successfully created.
69
     * 
69
     * 
70
     * @param promotionId
70
     * @param promotionId
-
 
71
     * @param couponCategory
71
     * @param couponCode
72
     * @param couponCode
72
     * @param arguments
73
     * @param arguments
73
     * @param isCod
74
     * @param isCod
74
     * @param prefix
75
     * @param prefix
75
     */
76
     */
76
    public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException;
77
    public String createCoupon(long promotionId, long couponCategory, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException;
77
 
78
 
78
    /**
79
    /**
79
     * Returns the count of successful payments done using a given coupon
80
     * Returns the count of successful payments done using a given coupon
80
     * 
81
     * 
81
     * @param couponCode
82
     * @param couponCode
Line 135... Line 136...
135
 
136
 
136
    public void getAllCouponsByPromotionId(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllCouponsByPromotionId_call> resultHandler) throws org.apache.thrift.TException;
137
    public void getAllCouponsByPromotionId(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllCouponsByPromotionId_call> resultHandler) throws org.apache.thrift.TException;
137
 
138
 
138
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
139
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
139
 
140
 
140
    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;
141
    public void createCoupon(long promotionId, long couponCategory, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
141
 
142
 
142
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
143
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
143
 
144
 
144
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
145
    public void getRuleDocString(String ruleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRuleDocString_call> resultHandler) throws org.apache.thrift.TException;
145
 
146
 
Line 611... Line 612...
611
        throw result.pex;
612
        throw result.pex;
612
      }
613
      }
613
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
614
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
614
    }
615
    }
615
 
616
 
616
    public String createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException
617
    public String createCoupon(long promotionId, long couponCategory, String couponCode, String arguments, boolean isCod, String prefix) throws PromotionException, org.apache.thrift.TException
617
    {
618
    {
618
      send_createCoupon(promotionId, couponCode, arguments, isCod, prefix);
619
      send_createCoupon(promotionId, couponCategory, couponCode, arguments, isCod, prefix);
619
      return recv_createCoupon();
620
      return recv_createCoupon();
620
    }
621
    }
621
 
622
 
622
    public void send_createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix) throws org.apache.thrift.TException
623
    public void send_createCoupon(long promotionId, long couponCategory, String couponCode, String arguments, boolean isCod, String prefix) throws org.apache.thrift.TException
623
    {
624
    {
624
      createCoupon_args args = new createCoupon_args();
625
      createCoupon_args args = new createCoupon_args();
625
      args.setPromotionId(promotionId);
626
      args.setPromotionId(promotionId);
-
 
627
      args.setCouponCategory(couponCategory);
626
      args.setCouponCode(couponCode);
628
      args.setCouponCode(couponCode);
627
      args.setArguments(arguments);
629
      args.setArguments(arguments);
628
      args.setIsCod(isCod);
630
      args.setIsCod(isCod);
629
      args.setPrefix(prefix);
631
      args.setPrefix(prefix);
630
      sendBase("createCoupon", args);
632
      sendBase("createCoupon", args);
Line 1395... Line 1397...
1395
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1397
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1396
        return (new Client(prot)).recv_getActiveCoupons();
1398
        return (new Client(prot)).recv_getActiveCoupons();
1397
      }
1399
      }
1398
    }
1400
    }
1399
 
1401
 
1400
    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 {
1402
    public void createCoupon(long promotionId, long couponCategory, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<createCoupon_call> resultHandler) throws org.apache.thrift.TException {
1401
      checkReady();
1403
      checkReady();
1402
      createCoupon_call method_call = new createCoupon_call(promotionId, couponCode, arguments, isCod, prefix, resultHandler, this, ___protocolFactory, ___transport);
1404
      createCoupon_call method_call = new createCoupon_call(promotionId, couponCategory, couponCode, arguments, isCod, prefix, resultHandler, this, ___protocolFactory, ___transport);
1403
      this.___currentMethod = method_call;
1405
      this.___currentMethod = method_call;
1404
      ___manager.call(method_call);
1406
      ___manager.call(method_call);
1405
    }
1407
    }
1406
 
1408
 
1407
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
1409
    public static class createCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
1408
      private long promotionId;
1410
      private long promotionId;
-
 
1411
      private long couponCategory;
1409
      private String couponCode;
1412
      private String couponCode;
1410
      private String arguments;
1413
      private String arguments;
1411
      private boolean isCod;
1414
      private boolean isCod;
1412
      private String prefix;
1415
      private String prefix;
1413
      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 {
1416
      public createCoupon_call(long promotionId, long couponCategory, 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 {
1414
        super(client, protocolFactory, transport, resultHandler, false);
1417
        super(client, protocolFactory, transport, resultHandler, false);
1415
        this.promotionId = promotionId;
1418
        this.promotionId = promotionId;
-
 
1419
        this.couponCategory = couponCategory;
1416
        this.couponCode = couponCode;
1420
        this.couponCode = couponCode;
1417
        this.arguments = arguments;
1421
        this.arguments = arguments;
1418
        this.isCod = isCod;
1422
        this.isCod = isCod;
1419
        this.prefix = prefix;
1423
        this.prefix = prefix;
1420
      }
1424
      }
1421
 
1425
 
1422
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1426
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1423
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1427
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
1424
        createCoupon_args args = new createCoupon_args();
1428
        createCoupon_args args = new createCoupon_args();
1425
        args.setPromotionId(promotionId);
1429
        args.setPromotionId(promotionId);
-
 
1430
        args.setCouponCategory(couponCategory);
1426
        args.setCouponCode(couponCode);
1431
        args.setCouponCode(couponCode);
1427
        args.setArguments(arguments);
1432
        args.setArguments(arguments);
1428
        args.setIsCod(isCod);
1433
        args.setIsCod(isCod);
1429
        args.setPrefix(prefix);
1434
        args.setPrefix(prefix);
1430
        args.write(prot);
1435
        args.write(prot);
Line 2072... Line 2077...
2072
      }
2077
      }
2073
 
2078
 
2074
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
2079
      protected createCoupon_result getResult(I iface, createCoupon_args args) throws org.apache.thrift.TException {
2075
        createCoupon_result result = new createCoupon_result();
2080
        createCoupon_result result = new createCoupon_result();
2076
        try {
2081
        try {
2077
          result.success = iface.createCoupon(args.promotionId, args.couponCode, args.arguments, args.isCod, args.prefix);
2082
          result.success = iface.createCoupon(args.promotionId, args.couponCategory, args.couponCode, args.arguments, args.isCod, args.prefix);
2078
        } catch (PromotionException pex) {
2083
        } catch (PromotionException pex) {
2079
          result.pex = pex;
2084
          result.pex = pex;
2080
        }
2085
        }
2081
        return result;
2086
        return result;
2082
      }
2087
      }
Line 14257... Line 14262...
14257
 
14262
 
14258
  public static class createCoupon_args implements org.apache.thrift.TBase<createCoupon_args, createCoupon_args._Fields>, java.io.Serializable, Cloneable   {
14263
  public static class createCoupon_args implements org.apache.thrift.TBase<createCoupon_args, createCoupon_args._Fields>, java.io.Serializable, Cloneable   {
14259
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_args");
14264
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createCoupon_args");
14260
 
14265
 
14261
    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);
14266
    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);
-
 
14267
    private static final org.apache.thrift.protocol.TField COUPON_CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCategory", org.apache.thrift.protocol.TType.I64, (short)2);
14262
    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);
14268
    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)3);
14263
    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);
14269
    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)4);
14264
    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);
14270
    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)5);
14265
    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);
14271
    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)6);
14266
 
14272
 
14267
    private long promotionId; // required
14273
    private long promotionId; // required
-
 
14274
    private long couponCategory; // required
14268
    private String couponCode; // required
14275
    private String couponCode; // required
14269
    private String arguments; // required
14276
    private String arguments; // required
14270
    private boolean isCod; // required
14277
    private boolean isCod; // required
14271
    private String prefix; // required
14278
    private String prefix; // required
14272
 
14279
 
14273
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14280
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14274
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14281
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14275
      PROMOTION_ID((short)1, "promotionId"),
14282
      PROMOTION_ID((short)1, "promotionId"),
-
 
14283
      COUPON_CATEGORY((short)2, "couponCategory"),
14276
      COUPON_CODE((short)2, "couponCode"),
14284
      COUPON_CODE((short)3, "couponCode"),
14277
      ARGUMENTS((short)3, "arguments"),
14285
      ARGUMENTS((short)4, "arguments"),
14278
      IS_COD((short)4, "isCod"),
14286
      IS_COD((short)5, "isCod"),
14279
      PREFIX((short)5, "prefix");
14287
      PREFIX((short)6, "prefix");
14280
 
14288
 
14281
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14289
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14282
 
14290
 
14283
      static {
14291
      static {
14284
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14292
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 14291... Line 14299...
14291
       */
14299
       */
14292
      public static _Fields findByThriftId(int fieldId) {
14300
      public static _Fields findByThriftId(int fieldId) {
14293
        switch(fieldId) {
14301
        switch(fieldId) {
14294
          case 1: // PROMOTION_ID
14302
          case 1: // PROMOTION_ID
14295
            return PROMOTION_ID;
14303
            return PROMOTION_ID;
-
 
14304
          case 2: // COUPON_CATEGORY
-
 
14305
            return COUPON_CATEGORY;
14296
          case 2: // COUPON_CODE
14306
          case 3: // COUPON_CODE
14297
            return COUPON_CODE;
14307
            return COUPON_CODE;
14298
          case 3: // ARGUMENTS
14308
          case 4: // ARGUMENTS
14299
            return ARGUMENTS;
14309
            return ARGUMENTS;
14300
          case 4: // IS_COD
14310
          case 5: // IS_COD
14301
            return IS_COD;
14311
            return IS_COD;
14302
          case 5: // PREFIX
14312
          case 6: // PREFIX
14303
            return PREFIX;
14313
            return PREFIX;
14304
          default:
14314
          default:
14305
            return null;
14315
            return null;
14306
        }
14316
        }
14307
      }
14317
      }
Line 14340... Line 14350...
14340
      }
14350
      }
14341
    }
14351
    }
14342
 
14352
 
14343
    // isset id assignments
14353
    // isset id assignments
14344
    private static final int __PROMOTIONID_ISSET_ID = 0;
14354
    private static final int __PROMOTIONID_ISSET_ID = 0;
-
 
14355
    private static final int __COUPONCATEGORY_ISSET_ID = 1;
14345
    private static final int __ISCOD_ISSET_ID = 1;
14356
    private static final int __ISCOD_ISSET_ID = 2;
14346
    private BitSet __isset_bit_vector = new BitSet(2);
14357
    private BitSet __isset_bit_vector = new BitSet(3);
14347
 
14358
 
14348
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14359
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14349
    static {
14360
    static {
14350
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14361
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14351
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14362
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14352
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14363
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
14364
      tmpMap.put(_Fields.COUPON_CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("couponCategory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
14365
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14353
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14366
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14354
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14367
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14355
      tmpMap.put(_Fields.ARGUMENTS, new org.apache.thrift.meta_data.FieldMetaData("arguments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14368
      tmpMap.put(_Fields.ARGUMENTS, new org.apache.thrift.meta_data.FieldMetaData("arguments", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14356
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14369
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14357
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14370
      tmpMap.put(_Fields.IS_COD, new org.apache.thrift.meta_data.FieldMetaData("isCod", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 14365... Line 14378...
14365
    public createCoupon_args() {
14378
    public createCoupon_args() {
14366
    }
14379
    }
14367
 
14380
 
14368
    public createCoupon_args(
14381
    public createCoupon_args(
14369
      long promotionId,
14382
      long promotionId,
-
 
14383
      long couponCategory,
14370
      String couponCode,
14384
      String couponCode,
14371
      String arguments,
14385
      String arguments,
14372
      boolean isCod,
14386
      boolean isCod,
14373
      String prefix)
14387
      String prefix)
14374
    {
14388
    {
14375
      this();
14389
      this();
14376
      this.promotionId = promotionId;
14390
      this.promotionId = promotionId;
14377
      setPromotionIdIsSet(true);
14391
      setPromotionIdIsSet(true);
-
 
14392
      this.couponCategory = couponCategory;
-
 
14393
      setCouponCategoryIsSet(true);
14378
      this.couponCode = couponCode;
14394
      this.couponCode = couponCode;
14379
      this.arguments = arguments;
14395
      this.arguments = arguments;
14380
      this.isCod = isCod;
14396
      this.isCod = isCod;
14381
      setIsCodIsSet(true);
14397
      setIsCodIsSet(true);
14382
      this.prefix = prefix;
14398
      this.prefix = prefix;
Line 14387... Line 14403...
14387
     */
14403
     */
14388
    public createCoupon_args(createCoupon_args other) {
14404
    public createCoupon_args(createCoupon_args other) {
14389
      __isset_bit_vector.clear();
14405
      __isset_bit_vector.clear();
14390
      __isset_bit_vector.or(other.__isset_bit_vector);
14406
      __isset_bit_vector.or(other.__isset_bit_vector);
14391
      this.promotionId = other.promotionId;
14407
      this.promotionId = other.promotionId;
-
 
14408
      this.couponCategory = other.couponCategory;
14392
      if (other.isSetCouponCode()) {
14409
      if (other.isSetCouponCode()) {
14393
        this.couponCode = other.couponCode;
14410
        this.couponCode = other.couponCode;
14394
      }
14411
      }
14395
      if (other.isSetArguments()) {
14412
      if (other.isSetArguments()) {
14396
        this.arguments = other.arguments;
14413
        this.arguments = other.arguments;
Line 14407... Line 14424...
14407
 
14424
 
14408
    @Override
14425
    @Override
14409
    public void clear() {
14426
    public void clear() {
14410
      setPromotionIdIsSet(false);
14427
      setPromotionIdIsSet(false);
14411
      this.promotionId = 0;
14428
      this.promotionId = 0;
-
 
14429
      setCouponCategoryIsSet(false);
-
 
14430
      this.couponCategory = 0;
14412
      this.couponCode = null;
14431
      this.couponCode = null;
14413
      this.arguments = null;
14432
      this.arguments = null;
14414
      setIsCodIsSet(false);
14433
      setIsCodIsSet(false);
14415
      this.isCod = false;
14434
      this.isCod = false;
14416
      this.prefix = null;
14435
      this.prefix = null;
Line 14436... Line 14455...
14436
 
14455
 
14437
    public void setPromotionIdIsSet(boolean value) {
14456
    public void setPromotionIdIsSet(boolean value) {
14438
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
14457
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
14439
    }
14458
    }
14440
 
14459
 
-
 
14460
    public long getCouponCategory() {
-
 
14461
      return this.couponCategory;
-
 
14462
    }
-
 
14463
 
-
 
14464
    public void setCouponCategory(long couponCategory) {
-
 
14465
      this.couponCategory = couponCategory;
-
 
14466
      setCouponCategoryIsSet(true);
-
 
14467
    }
-
 
14468
 
-
 
14469
    public void unsetCouponCategory() {
-
 
14470
      __isset_bit_vector.clear(__COUPONCATEGORY_ISSET_ID);
-
 
14471
    }
-
 
14472
 
-
 
14473
    /** Returns true if field couponCategory is set (has been assigned a value) and false otherwise */
-
 
14474
    public boolean isSetCouponCategory() {
-
 
14475
      return __isset_bit_vector.get(__COUPONCATEGORY_ISSET_ID);
-
 
14476
    }
-
 
14477
 
-
 
14478
    public void setCouponCategoryIsSet(boolean value) {
-
 
14479
      __isset_bit_vector.set(__COUPONCATEGORY_ISSET_ID, value);
-
 
14480
    }
-
 
14481
 
14441
    public String getCouponCode() {
14482
    public String getCouponCode() {
14442
      return this.couponCode;
14483
      return this.couponCode;
14443
    }
14484
    }
14444
 
14485
 
14445
    public void setCouponCode(String couponCode) {
14486
    public void setCouponCode(String couponCode) {
Line 14537... Line 14578...
14537
        } else {
14578
        } else {
14538
          setPromotionId((Long)value);
14579
          setPromotionId((Long)value);
14539
        }
14580
        }
14540
        break;
14581
        break;
14541
 
14582
 
-
 
14583
      case COUPON_CATEGORY:
-
 
14584
        if (value == null) {
-
 
14585
          unsetCouponCategory();
-
 
14586
        } else {
-
 
14587
          setCouponCategory((Long)value);
-
 
14588
        }
-
 
14589
        break;
-
 
14590
 
14542
      case COUPON_CODE:
14591
      case COUPON_CODE:
14543
        if (value == null) {
14592
        if (value == null) {
14544
          unsetCouponCode();
14593
          unsetCouponCode();
14545
        } else {
14594
        } else {
14546
          setCouponCode((String)value);
14595
          setCouponCode((String)value);
Line 14577... Line 14626...
14577
    public Object getFieldValue(_Fields field) {
14626
    public Object getFieldValue(_Fields field) {
14578
      switch (field) {
14627
      switch (field) {
14579
      case PROMOTION_ID:
14628
      case PROMOTION_ID:
14580
        return Long.valueOf(getPromotionId());
14629
        return Long.valueOf(getPromotionId());
14581
 
14630
 
-
 
14631
      case COUPON_CATEGORY:
-
 
14632
        return Long.valueOf(getCouponCategory());
-
 
14633
 
14582
      case COUPON_CODE:
14634
      case COUPON_CODE:
14583
        return getCouponCode();
14635
        return getCouponCode();
14584
 
14636
 
14585
      case ARGUMENTS:
14637
      case ARGUMENTS:
14586
        return getArguments();
14638
        return getArguments();
Line 14602... Line 14654...
14602
      }
14654
      }
14603
 
14655
 
14604
      switch (field) {
14656
      switch (field) {
14605
      case PROMOTION_ID:
14657
      case PROMOTION_ID:
14606
        return isSetPromotionId();
14658
        return isSetPromotionId();
-
 
14659
      case COUPON_CATEGORY:
-
 
14660
        return isSetCouponCategory();
14607
      case COUPON_CODE:
14661
      case COUPON_CODE:
14608
        return isSetCouponCode();
14662
        return isSetCouponCode();
14609
      case ARGUMENTS:
14663
      case ARGUMENTS:
14610
        return isSetArguments();
14664
        return isSetArguments();
14611
      case IS_COD:
14665
      case IS_COD:
Line 14636... Line 14690...
14636
          return false;
14690
          return false;
14637
        if (this.promotionId != that.promotionId)
14691
        if (this.promotionId != that.promotionId)
14638
          return false;
14692
          return false;
14639
      }
14693
      }
14640
 
14694
 
-
 
14695
      boolean this_present_couponCategory = true;
-
 
14696
      boolean that_present_couponCategory = true;
-
 
14697
      if (this_present_couponCategory || that_present_couponCategory) {
-
 
14698
        if (!(this_present_couponCategory && that_present_couponCategory))
-
 
14699
          return false;
-
 
14700
        if (this.couponCategory != that.couponCategory)
-
 
14701
          return false;
-
 
14702
      }
-
 
14703
 
14641
      boolean this_present_couponCode = true && this.isSetCouponCode();
14704
      boolean this_present_couponCode = true && this.isSetCouponCode();
14642
      boolean that_present_couponCode = true && that.isSetCouponCode();
14705
      boolean that_present_couponCode = true && that.isSetCouponCode();
14643
      if (this_present_couponCode || that_present_couponCode) {
14706
      if (this_present_couponCode || that_present_couponCode) {
14644
        if (!(this_present_couponCode && that_present_couponCode))
14707
        if (!(this_present_couponCode && that_present_couponCode))
14645
          return false;
14708
          return false;
Line 14698... Line 14761...
14698
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
14761
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
14699
        if (lastComparison != 0) {
14762
        if (lastComparison != 0) {
14700
          return lastComparison;
14763
          return lastComparison;
14701
        }
14764
        }
14702
      }
14765
      }
-
 
14766
      lastComparison = Boolean.valueOf(isSetCouponCategory()).compareTo(typedOther.isSetCouponCategory());
-
 
14767
      if (lastComparison != 0) {
-
 
14768
        return lastComparison;
-
 
14769
      }
-
 
14770
      if (isSetCouponCategory()) {
-
 
14771
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCategory, typedOther.couponCategory);
-
 
14772
        if (lastComparison != 0) {
-
 
14773
          return lastComparison;
-
 
14774
        }
-
 
14775
      }
14703
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
14776
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
14704
      if (lastComparison != 0) {
14777
      if (lastComparison != 0) {
14705
        return lastComparison;
14778
        return lastComparison;
14706
      }
14779
      }
14707
      if (isSetCouponCode()) {
14780
      if (isSetCouponCode()) {
Line 14763... Line 14836...
14763
              setPromotionIdIsSet(true);
14836
              setPromotionIdIsSet(true);
14764
            } else { 
14837
            } else { 
14765
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14838
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14766
            }
14839
            }
14767
            break;
14840
            break;
-
 
14841
          case 2: // COUPON_CATEGORY
-
 
14842
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
14843
              this.couponCategory = iprot.readI64();
-
 
14844
              setCouponCategoryIsSet(true);
-
 
14845
            } else { 
-
 
14846
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
14847
            }
-
 
14848
            break;
14768
          case 2: // COUPON_CODE
14849
          case 3: // COUPON_CODE
14769
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14850
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14770
              this.couponCode = iprot.readString();
14851
              this.couponCode = iprot.readString();
14771
            } else { 
14852
            } else { 
14772
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14853
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14773
            }
14854
            }
14774
            break;
14855
            break;
14775
          case 3: // ARGUMENTS
14856
          case 4: // ARGUMENTS
14776
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14857
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14777
              this.arguments = iprot.readString();
14858
              this.arguments = iprot.readString();
14778
            } else { 
14859
            } else { 
14779
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14860
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14780
            }
14861
            }
14781
            break;
14862
            break;
14782
          case 4: // IS_COD
14863
          case 5: // IS_COD
14783
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
14864
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
14784
              this.isCod = iprot.readBool();
14865
              this.isCod = iprot.readBool();
14785
              setIsCodIsSet(true);
14866
              setIsCodIsSet(true);
14786
            } else { 
14867
            } else { 
14787
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14868
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14788
            }
14869
            }
14789
            break;
14870
            break;
14790
          case 5: // PREFIX
14871
          case 6: // PREFIX
14791
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14872
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14792
              this.prefix = iprot.readString();
14873
              this.prefix = iprot.readString();
14793
            } else { 
14874
            } else { 
14794
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14875
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14795
            }
14876
            }
Line 14808... Line 14889...
14808
 
14889
 
14809
      oprot.writeStructBegin(STRUCT_DESC);
14890
      oprot.writeStructBegin(STRUCT_DESC);
14810
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
14891
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
14811
      oprot.writeI64(this.promotionId);
14892
      oprot.writeI64(this.promotionId);
14812
      oprot.writeFieldEnd();
14893
      oprot.writeFieldEnd();
-
 
14894
      oprot.writeFieldBegin(COUPON_CATEGORY_FIELD_DESC);
-
 
14895
      oprot.writeI64(this.couponCategory);
-
 
14896
      oprot.writeFieldEnd();
14813
      if (this.couponCode != null) {
14897
      if (this.couponCode != null) {
14814
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
14898
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
14815
        oprot.writeString(this.couponCode);
14899
        oprot.writeString(this.couponCode);
14816
        oprot.writeFieldEnd();
14900
        oprot.writeFieldEnd();
14817
      }
14901
      }
Line 14839... Line 14923...
14839
 
14923
 
14840
      sb.append("promotionId:");
14924
      sb.append("promotionId:");
14841
      sb.append(this.promotionId);
14925
      sb.append(this.promotionId);
14842
      first = false;
14926
      first = false;
14843
      if (!first) sb.append(", ");
14927
      if (!first) sb.append(", ");
-
 
14928
      sb.append("couponCategory:");
-
 
14929
      sb.append(this.couponCategory);
-
 
14930
      first = false;
-
 
14931
      if (!first) sb.append(", ");
14844
      sb.append("couponCode:");
14932
      sb.append("couponCode:");
14845
      if (this.couponCode == null) {
14933
      if (this.couponCode == null) {
14846
        sb.append("null");
14934
        sb.append("null");
14847
      } else {
14935
      } else {
14848
        sb.append(this.couponCode);
14936
        sb.append(this.couponCode);
Line 14884... Line 14972...
14884
      }
14972
      }
14885
    }
14973
    }
14886
 
14974
 
14887
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14975
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14888
      try {
14976
      try {
14889
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
14890
        __isset_bit_vector = new BitSet(1);
-
 
14891
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14977
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14892
      } catch (org.apache.thrift.TException te) {
14978
      } catch (org.apache.thrift.TException te) {
14893
        throw new java.io.IOException(te);
14979
        throw new java.io.IOException(te);
14894
      }
14980
      }
14895
    }
14981
    }