Subversion Repositories SmartDukaan

Rev

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

Rev 11819 Rev 13521
Line 47... Line 47...
47
 
47
 
48
    public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException;
48
    public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException;
49
 
49
 
50
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException;
50
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException;
51
 
51
 
52
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
52
    public void trackCouponUsage(String couponCode, long transactionId, long userId, long amount, boolean isDigital) throws PromotionException, org.apache.thrift.TException;
53
 
53
 
54
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
54
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
55
 
55
 
56
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
56
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
57
 
57
 
Line 124... Line 124...
124
 
124
 
125
    public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException;
125
    public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException;
126
 
126
 
127
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException;
127
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException;
128
 
128
 
129
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
129
    public void trackCouponUsage(String couponCode, long transactionId, long userId, long amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
130
 
130
 
131
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
131
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
132
 
132
 
133
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
133
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
134
 
134
 
Line 460... Line 460...
460
        throw result.pex;
460
        throw result.pex;
461
      }
461
      }
462
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyRechargeCoupon failed: unknown result");
462
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyRechargeCoupon failed: unknown result");
463
    }
463
    }
464
 
464
 
465
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException
465
    public void trackCouponUsage(String couponCode, long transactionId, long userId, long amount, boolean isDigital) throws PromotionException, org.apache.thrift.TException
466
    {
466
    {
467
      send_trackCouponUsage(couponCode, transactionId, userId);
467
      send_trackCouponUsage(couponCode, transactionId, userId, amount, isDigital);
468
      recv_trackCouponUsage();
468
      recv_trackCouponUsage();
469
    }
469
    }
470
 
470
 
471
    public void send_trackCouponUsage(String couponCode, long transactionId, long userId) throws org.apache.thrift.TException
471
    public void send_trackCouponUsage(String couponCode, long transactionId, long userId, long amount, boolean isDigital) throws org.apache.thrift.TException
472
    {
472
    {
473
      trackCouponUsage_args args = new trackCouponUsage_args();
473
      trackCouponUsage_args args = new trackCouponUsage_args();
474
      args.setCouponCode(couponCode);
474
      args.setCouponCode(couponCode);
475
      args.setTransactionId(transactionId);
475
      args.setTransactionId(transactionId);
476
      args.setUserId(userId);
476
      args.setUserId(userId);
-
 
477
      args.setAmount(amount);
-
 
478
      args.setIsDigital(isDigital);
477
      sendBase("trackCouponUsage", args);
479
      sendBase("trackCouponUsage", args);
478
    }
480
    }
479
 
481
 
480
    public void recv_trackCouponUsage() throws PromotionException, org.apache.thrift.TException
482
    public void recv_trackCouponUsage() throws PromotionException, org.apache.thrift.TException
481
    {
483
    {
Line 1199... Line 1201...
1199
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1201
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1200
        return (new Client(prot)).recv_applyRechargeCoupon();
1202
        return (new Client(prot)).recv_applyRechargeCoupon();
1201
      }
1203
      }
1202
    }
1204
    }
1203
 
1205
 
1204
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException {
1206
    public void trackCouponUsage(String couponCode, long transactionId, long userId, long amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException {
1205
      checkReady();
1207
      checkReady();
1206
      trackCouponUsage_call method_call = new trackCouponUsage_call(couponCode, transactionId, userId, resultHandler, this, ___protocolFactory, ___transport);
1208
      trackCouponUsage_call method_call = new trackCouponUsage_call(couponCode, transactionId, userId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1207
      this.___currentMethod = method_call;
1209
      this.___currentMethod = method_call;
1208
      ___manager.call(method_call);
1210
      ___manager.call(method_call);
1209
    }
1211
    }
1210
 
1212
 
1211
    public static class trackCouponUsage_call extends org.apache.thrift.async.TAsyncMethodCall {
1213
    public static class trackCouponUsage_call extends org.apache.thrift.async.TAsyncMethodCall {
1212
      private String couponCode;
1214
      private String couponCode;
1213
      private long transactionId;
1215
      private long transactionId;
1214
      private long userId;
1216
      private long userId;
-
 
1217
      private long amount;
-
 
1218
      private boolean isDigital;
1215
      public trackCouponUsage_call(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_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 {
1219
      public trackCouponUsage_call(String couponCode, long transactionId, long userId, long amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<trackCouponUsage_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 {
1216
        super(client, protocolFactory, transport, resultHandler, false);
1220
        super(client, protocolFactory, transport, resultHandler, false);
1217
        this.couponCode = couponCode;
1221
        this.couponCode = couponCode;
1218
        this.transactionId = transactionId;
1222
        this.transactionId = transactionId;
1219
        this.userId = userId;
1223
        this.userId = userId;
-
 
1224
        this.amount = amount;
-
 
1225
        this.isDigital = isDigital;
1220
      }
1226
      }
1221
 
1227
 
1222
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1228
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1223
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("trackCouponUsage", org.apache.thrift.protocol.TMessageType.CALL, 0));
1229
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("trackCouponUsage", org.apache.thrift.protocol.TMessageType.CALL, 0));
1224
        trackCouponUsage_args args = new trackCouponUsage_args();
1230
        trackCouponUsage_args args = new trackCouponUsage_args();
1225
        args.setCouponCode(couponCode);
1231
        args.setCouponCode(couponCode);
1226
        args.setTransactionId(transactionId);
1232
        args.setTransactionId(transactionId);
1227
        args.setUserId(userId);
1233
        args.setUserId(userId);
-
 
1234
        args.setAmount(amount);
-
 
1235
        args.setIsDigital(isDigital);
1228
        args.write(prot);
1236
        args.write(prot);
1229
        prot.writeMessageEnd();
1237
        prot.writeMessageEnd();
1230
      }
1238
      }
1231
 
1239
 
1232
      public void getResult() throws PromotionException, org.apache.thrift.TException {
1240
      public void getResult() throws PromotionException, org.apache.thrift.TException {
Line 1956... Line 1964...
1956
      }
1964
      }
1957
 
1965
 
1958
      protected trackCouponUsage_result getResult(I iface, trackCouponUsage_args args) throws org.apache.thrift.TException {
1966
      protected trackCouponUsage_result getResult(I iface, trackCouponUsage_args args) throws org.apache.thrift.TException {
1959
        trackCouponUsage_result result = new trackCouponUsage_result();
1967
        trackCouponUsage_result result = new trackCouponUsage_result();
1960
        try {
1968
        try {
1961
          iface.trackCouponUsage(args.couponCode, args.transactionId, args.userId);
1969
          iface.trackCouponUsage(args.couponCode, args.transactionId, args.userId, args.amount, args.isDigital);
1962
        } catch (PromotionException pex) {
1970
        } catch (PromotionException pex) {
1963
          result.pex = pex;
1971
          result.pex = pex;
1964
        }
1972
        }
1965
        return result;
1973
        return result;
1966
      }
1974
      }
Line 10110... Line 10118...
10110
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_args");
10118
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("trackCouponUsage_args");
10111
 
10119
 
10112
    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)1);
10120
    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)1);
10113
    private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)2);
10121
    private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.I64, (short)2);
10114
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)3);
10122
    private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.I64, (short)3);
-
 
10123
    private static final org.apache.thrift.protocol.TField AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("amount", org.apache.thrift.protocol.TType.I64, (short)4);
-
 
10124
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)5);
10115
 
10125
 
10116
    private String couponCode; // required
10126
    private String couponCode; // required
10117
    private long transactionId; // required
10127
    private long transactionId; // required
10118
    private long userId; // required
10128
    private long userId; // required
-
 
10129
    private long amount; // required
-
 
10130
    private boolean isDigital; // required
10119
 
10131
 
10120
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10121
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10133
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10122
      COUPON_CODE((short)1, "couponCode"),
10134
      COUPON_CODE((short)1, "couponCode"),
10123
      TRANSACTION_ID((short)2, "transactionId"),
10135
      TRANSACTION_ID((short)2, "transactionId"),
10124
      USER_ID((short)3, "userId");
10136
      USER_ID((short)3, "userId"),
-
 
10137
      AMOUNT((short)4, "amount"),
-
 
10138
      IS_DIGITAL((short)5, "isDigital");
10125
 
10139
 
10126
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10140
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10127
 
10141
 
10128
      static {
10142
      static {
10129
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10143
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 10140... Line 10154...
10140
            return COUPON_CODE;
10154
            return COUPON_CODE;
10141
          case 2: // TRANSACTION_ID
10155
          case 2: // TRANSACTION_ID
10142
            return TRANSACTION_ID;
10156
            return TRANSACTION_ID;
10143
          case 3: // USER_ID
10157
          case 3: // USER_ID
10144
            return USER_ID;
10158
            return USER_ID;
-
 
10159
          case 4: // AMOUNT
-
 
10160
            return AMOUNT;
-
 
10161
          case 5: // IS_DIGITAL
-
 
10162
            return IS_DIGITAL;
10145
          default:
10163
          default:
10146
            return null;
10164
            return null;
10147
        }
10165
        }
10148
      }
10166
      }
10149
 
10167
 
Line 10182... Line 10200...
10182
    }
10200
    }
10183
 
10201
 
10184
    // isset id assignments
10202
    // isset id assignments
10185
    private static final int __TRANSACTIONID_ISSET_ID = 0;
10203
    private static final int __TRANSACTIONID_ISSET_ID = 0;
10186
    private static final int __USERID_ISSET_ID = 1;
10204
    private static final int __USERID_ISSET_ID = 1;
-
 
10205
    private static final int __AMOUNT_ISSET_ID = 2;
-
 
10206
    private static final int __ISDIGITAL_ISSET_ID = 3;
10187
    private BitSet __isset_bit_vector = new BitSet(2);
10207
    private BitSet __isset_bit_vector = new BitSet(4);
10188
 
10208
 
10189
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10209
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10190
    static {
10210
    static {
10191
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10211
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10192
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10212
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10193
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10213
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10194
      tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10214
      tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10195
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10215
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10196
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10216
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10197
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10217
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10218
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10219
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10220
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10221
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
10198
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10222
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10199
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_args.class, metaDataMap);
10223
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(trackCouponUsage_args.class, metaDataMap);
10200
    }
10224
    }
10201
 
10225
 
10202
    public trackCouponUsage_args() {
10226
    public trackCouponUsage_args() {
10203
    }
10227
    }
10204
 
10228
 
10205
    public trackCouponUsage_args(
10229
    public trackCouponUsage_args(
10206
      String couponCode,
10230
      String couponCode,
10207
      long transactionId,
10231
      long transactionId,
10208
      long userId)
10232
      long userId,
-
 
10233
      long amount,
-
 
10234
      boolean isDigital)
10209
    {
10235
    {
10210
      this();
10236
      this();
10211
      this.couponCode = couponCode;
10237
      this.couponCode = couponCode;
10212
      this.transactionId = transactionId;
10238
      this.transactionId = transactionId;
10213
      setTransactionIdIsSet(true);
10239
      setTransactionIdIsSet(true);
10214
      this.userId = userId;
10240
      this.userId = userId;
10215
      setUserIdIsSet(true);
10241
      setUserIdIsSet(true);
-
 
10242
      this.amount = amount;
-
 
10243
      setAmountIsSet(true);
-
 
10244
      this.isDigital = isDigital;
-
 
10245
      setIsDigitalIsSet(true);
10216
    }
10246
    }
10217
 
10247
 
10218
    /**
10248
    /**
10219
     * Performs a deep copy on <i>other</i>.
10249
     * Performs a deep copy on <i>other</i>.
10220
     */
10250
     */
Line 10224... Line 10254...
10224
      if (other.isSetCouponCode()) {
10254
      if (other.isSetCouponCode()) {
10225
        this.couponCode = other.couponCode;
10255
        this.couponCode = other.couponCode;
10226
      }
10256
      }
10227
      this.transactionId = other.transactionId;
10257
      this.transactionId = other.transactionId;
10228
      this.userId = other.userId;
10258
      this.userId = other.userId;
-
 
10259
      this.amount = other.amount;
-
 
10260
      this.isDigital = other.isDigital;
10229
    }
10261
    }
10230
 
10262
 
10231
    public trackCouponUsage_args deepCopy() {
10263
    public trackCouponUsage_args deepCopy() {
10232
      return new trackCouponUsage_args(this);
10264
      return new trackCouponUsage_args(this);
10233
    }
10265
    }
Line 10237... Line 10269...
10237
      this.couponCode = null;
10269
      this.couponCode = null;
10238
      setTransactionIdIsSet(false);
10270
      setTransactionIdIsSet(false);
10239
      this.transactionId = 0;
10271
      this.transactionId = 0;
10240
      setUserIdIsSet(false);
10272
      setUserIdIsSet(false);
10241
      this.userId = 0;
10273
      this.userId = 0;
-
 
10274
      setAmountIsSet(false);
-
 
10275
      this.amount = 0;
-
 
10276
      setIsDigitalIsSet(false);
-
 
10277
      this.isDigital = false;
10242
    }
10278
    }
10243
 
10279
 
10244
    public String getCouponCode() {
10280
    public String getCouponCode() {
10245
      return this.couponCode;
10281
      return this.couponCode;
10246
    }
10282
    }
Line 10306... Line 10342...
10306
 
10342
 
10307
    public void setUserIdIsSet(boolean value) {
10343
    public void setUserIdIsSet(boolean value) {
10308
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10344
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10309
    }
10345
    }
10310
 
10346
 
-
 
10347
    public long getAmount() {
-
 
10348
      return this.amount;
-
 
10349
    }
-
 
10350
 
-
 
10351
    public void setAmount(long amount) {
-
 
10352
      this.amount = amount;
-
 
10353
      setAmountIsSet(true);
-
 
10354
    }
-
 
10355
 
-
 
10356
    public void unsetAmount() {
-
 
10357
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
-
 
10358
    }
-
 
10359
 
-
 
10360
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
-
 
10361
    public boolean isSetAmount() {
-
 
10362
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
-
 
10363
    }
-
 
10364
 
-
 
10365
    public void setAmountIsSet(boolean value) {
-
 
10366
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
-
 
10367
    }
-
 
10368
 
-
 
10369
    public boolean isIsDigital() {
-
 
10370
      return this.isDigital;
-
 
10371
    }
-
 
10372
 
-
 
10373
    public void setIsDigital(boolean isDigital) {
-
 
10374
      this.isDigital = isDigital;
-
 
10375
      setIsDigitalIsSet(true);
-
 
10376
    }
-
 
10377
 
-
 
10378
    public void unsetIsDigital() {
-
 
10379
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
-
 
10380
    }
-
 
10381
 
-
 
10382
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
-
 
10383
    public boolean isSetIsDigital() {
-
 
10384
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
-
 
10385
    }
-
 
10386
 
-
 
10387
    public void setIsDigitalIsSet(boolean value) {
-
 
10388
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
-
 
10389
    }
-
 
10390
 
10311
    public void setFieldValue(_Fields field, Object value) {
10391
    public void setFieldValue(_Fields field, Object value) {
10312
      switch (field) {
10392
      switch (field) {
10313
      case COUPON_CODE:
10393
      case COUPON_CODE:
10314
        if (value == null) {
10394
        if (value == null) {
10315
          unsetCouponCode();
10395
          unsetCouponCode();
Line 10332... Line 10412...
10332
        } else {
10412
        } else {
10333
          setUserId((Long)value);
10413
          setUserId((Long)value);
10334
        }
10414
        }
10335
        break;
10415
        break;
10336
 
10416
 
-
 
10417
      case AMOUNT:
-
 
10418
        if (value == null) {
-
 
10419
          unsetAmount();
-
 
10420
        } else {
-
 
10421
          setAmount((Long)value);
-
 
10422
        }
-
 
10423
        break;
-
 
10424
 
-
 
10425
      case IS_DIGITAL:
-
 
10426
        if (value == null) {
-
 
10427
          unsetIsDigital();
-
 
10428
        } else {
-
 
10429
          setIsDigital((Boolean)value);
-
 
10430
        }
-
 
10431
        break;
-
 
10432
 
10337
      }
10433
      }
10338
    }
10434
    }
10339
 
10435
 
10340
    public Object getFieldValue(_Fields field) {
10436
    public Object getFieldValue(_Fields field) {
10341
      switch (field) {
10437
      switch (field) {
Line 10346... Line 10442...
10346
        return Long.valueOf(getTransactionId());
10442
        return Long.valueOf(getTransactionId());
10347
 
10443
 
10348
      case USER_ID:
10444
      case USER_ID:
10349
        return Long.valueOf(getUserId());
10445
        return Long.valueOf(getUserId());
10350
 
10446
 
-
 
10447
      case AMOUNT:
-
 
10448
        return Long.valueOf(getAmount());
-
 
10449
 
-
 
10450
      case IS_DIGITAL:
-
 
10451
        return Boolean.valueOf(isIsDigital());
-
 
10452
 
10351
      }
10453
      }
10352
      throw new IllegalStateException();
10454
      throw new IllegalStateException();
10353
    }
10455
    }
10354
 
10456
 
10355
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10457
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 10363... Line 10465...
10363
        return isSetCouponCode();
10465
        return isSetCouponCode();
10364
      case TRANSACTION_ID:
10466
      case TRANSACTION_ID:
10365
        return isSetTransactionId();
10467
        return isSetTransactionId();
10366
      case USER_ID:
10468
      case USER_ID:
10367
        return isSetUserId();
10469
        return isSetUserId();
-
 
10470
      case AMOUNT:
-
 
10471
        return isSetAmount();
-
 
10472
      case IS_DIGITAL:
-
 
10473
        return isSetIsDigital();
10368
      }
10474
      }
10369
      throw new IllegalStateException();
10475
      throw new IllegalStateException();
10370
    }
10476
    }
10371
 
10477
 
10372
    @Override
10478
    @Override
Line 10407... Line 10513...
10407
          return false;
10513
          return false;
10408
        if (this.userId != that.userId)
10514
        if (this.userId != that.userId)
10409
          return false;
10515
          return false;
10410
      }
10516
      }
10411
 
10517
 
-
 
10518
      boolean this_present_amount = true;
-
 
10519
      boolean that_present_amount = true;
-
 
10520
      if (this_present_amount || that_present_amount) {
-
 
10521
        if (!(this_present_amount && that_present_amount))
-
 
10522
          return false;
-
 
10523
        if (this.amount != that.amount)
-
 
10524
          return false;
-
 
10525
      }
-
 
10526
 
-
 
10527
      boolean this_present_isDigital = true;
-
 
10528
      boolean that_present_isDigital = true;
-
 
10529
      if (this_present_isDigital || that_present_isDigital) {
-
 
10530
        if (!(this_present_isDigital && that_present_isDigital))
-
 
10531
          return false;
-
 
10532
        if (this.isDigital != that.isDigital)
-
 
10533
          return false;
-
 
10534
      }
-
 
10535
 
10412
      return true;
10536
      return true;
10413
    }
10537
    }
10414
 
10538
 
10415
    @Override
10539
    @Override
10416
    public int hashCode() {
10540
    public int hashCode() {
Line 10453... Line 10577...
10453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
10577
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
10454
        if (lastComparison != 0) {
10578
        if (lastComparison != 0) {
10455
          return lastComparison;
10579
          return lastComparison;
10456
        }
10580
        }
10457
      }
10581
      }
-
 
10582
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
-
 
10583
      if (lastComparison != 0) {
-
 
10584
        return lastComparison;
-
 
10585
      }
-
 
10586
      if (isSetAmount()) {
-
 
10587
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
-
 
10588
        if (lastComparison != 0) {
-
 
10589
          return lastComparison;
-
 
10590
        }
-
 
10591
      }
-
 
10592
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
-
 
10593
      if (lastComparison != 0) {
-
 
10594
        return lastComparison;
-
 
10595
      }
-
 
10596
      if (isSetIsDigital()) {
-
 
10597
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
-
 
10598
        if (lastComparison != 0) {
-
 
10599
          return lastComparison;
-
 
10600
        }
-
 
10601
      }
10458
      return 0;
10602
      return 0;
10459
    }
10603
    }
10460
 
10604
 
10461
    public _Fields fieldForId(int fieldId) {
10605
    public _Fields fieldForId(int fieldId) {
10462
      return _Fields.findByThriftId(fieldId);
10606
      return _Fields.findByThriftId(fieldId);
Line 10493... Line 10637...
10493
              setUserIdIsSet(true);
10637
              setUserIdIsSet(true);
10494
            } else { 
10638
            } else { 
10495
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10639
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10496
            }
10640
            }
10497
            break;
10641
            break;
-
 
10642
          case 4: // AMOUNT
-
 
10643
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10644
              this.amount = iprot.readI64();
-
 
10645
              setAmountIsSet(true);
-
 
10646
            } else { 
-
 
10647
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10648
            }
-
 
10649
            break;
-
 
10650
          case 5: // IS_DIGITAL
-
 
10651
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
10652
              this.isDigital = iprot.readBool();
-
 
10653
              setIsDigitalIsSet(true);
-
 
10654
            } else { 
-
 
10655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10656
            }
-
 
10657
            break;
10498
          default:
10658
          default:
10499
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10659
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10500
        }
10660
        }
10501
        iprot.readFieldEnd();
10661
        iprot.readFieldEnd();
10502
      }
10662
      }
Line 10517... Line 10677...
10517
      oprot.writeI64(this.transactionId);
10677
      oprot.writeI64(this.transactionId);
10518
      oprot.writeFieldEnd();
10678
      oprot.writeFieldEnd();
10519
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10679
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10520
      oprot.writeI64(this.userId);
10680
      oprot.writeI64(this.userId);
10521
      oprot.writeFieldEnd();
10681
      oprot.writeFieldEnd();
-
 
10682
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
-
 
10683
      oprot.writeI64(this.amount);
-
 
10684
      oprot.writeFieldEnd();
-
 
10685
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
-
 
10686
      oprot.writeBool(this.isDigital);
-
 
10687
      oprot.writeFieldEnd();
10522
      oprot.writeFieldStop();
10688
      oprot.writeFieldStop();
10523
      oprot.writeStructEnd();
10689
      oprot.writeStructEnd();
10524
    }
10690
    }
10525
 
10691
 
10526
    @Override
10692
    @Override
Line 10541... Line 10707...
10541
      first = false;
10707
      first = false;
10542
      if (!first) sb.append(", ");
10708
      if (!first) sb.append(", ");
10543
      sb.append("userId:");
10709
      sb.append("userId:");
10544
      sb.append(this.userId);
10710
      sb.append(this.userId);
10545
      first = false;
10711
      first = false;
-
 
10712
      if (!first) sb.append(", ");
-
 
10713
      sb.append("amount:");
-
 
10714
      sb.append(this.amount);
-
 
10715
      first = false;
-
 
10716
      if (!first) sb.append(", ");
-
 
10717
      sb.append("isDigital:");
-
 
10718
      sb.append(this.isDigital);
-
 
10719
      first = false;
10546
      sb.append(")");
10720
      sb.append(")");
10547
      return sb.toString();
10721
      return sb.toString();
10548
    }
10722
    }
10549
 
10723
 
10550
    public void validate() throws org.apache.thrift.TException {
10724
    public void validate() throws org.apache.thrift.TException {