Subversion Repositories SmartDukaan

Rev

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

Rev 6433 Rev 6515
Line 41... Line 41...
41
  private static final org.apache.thrift.protocol.TField RESPONSE_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("responseTimestamp", org.apache.thrift.protocol.TType.I64, (short)16);
41
  private static final org.apache.thrift.protocol.TField RESPONSE_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("responseTimestamp", org.apache.thrift.protocol.TType.I64, (short)16);
42
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)17);
42
  private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description", org.apache.thrift.protocol.TType.STRING, (short)17);
43
  private static final org.apache.thrift.protocol.TField PLAN_FIELD_DESC = new org.apache.thrift.protocol.TField("plan", org.apache.thrift.protocol.TType.STRING, (short)18);
43
  private static final org.apache.thrift.protocol.TField PLAN_FIELD_DESC = new org.apache.thrift.protocol.TField("plan", org.apache.thrift.protocol.TType.STRING, (short)18);
44
  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)19);
44
  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)19);
45
  private static final org.apache.thrift.protocol.TField COUPON_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("couponAmount", org.apache.thrift.protocol.TType.I64, (short)20);
45
  private static final org.apache.thrift.protocol.TField COUPON_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("couponAmount", org.apache.thrift.protocol.TType.I64, (short)20);
-
 
46
  private static final org.apache.thrift.protocol.TField REFUND_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("refundTimestamp", org.apache.thrift.protocol.TType.I64, (short)21);
46
 
47
 
47
  private long id; // required
48
  private long id; // required
48
  private String displayId; // required
49
  private String displayId; // required
49
  private long totalAmount; // required
50
  private long totalAmount; // required
50
  private long walletAmount; // required
51
  private long walletAmount; // required
Line 62... Line 63...
62
  private long responseTimestamp; // required
63
  private long responseTimestamp; // required
63
  private String description; // required
64
  private String description; // required
64
  private String plan; // required
65
  private String plan; // required
65
  private String couponCode; // required
66
  private String couponCode; // required
66
  private long couponAmount; // required
67
  private long couponAmount; // required
-
 
68
  private long refundTimestamp; // required
67
 
69
 
68
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
70
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
69
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
71
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
70
    ID((short)1, "id"),
72
    ID((short)1, "id"),
71
    DISPLAY_ID((short)2, "displayId"),
73
    DISPLAY_ID((short)2, "displayId"),
Line 96... Line 98...
96
    SPICE_TID((short)15, "spiceTID"),
98
    SPICE_TID((short)15, "spiceTID"),
97
    RESPONSE_TIMESTAMP((short)16, "responseTimestamp"),
99
    RESPONSE_TIMESTAMP((short)16, "responseTimestamp"),
98
    DESCRIPTION((short)17, "description"),
100
    DESCRIPTION((short)17, "description"),
99
    PLAN((short)18, "plan"),
101
    PLAN((short)18, "plan"),
100
    COUPON_CODE((short)19, "couponCode"),
102
    COUPON_CODE((short)19, "couponCode"),
101
    COUPON_AMOUNT((short)20, "couponAmount");
103
    COUPON_AMOUNT((short)20, "couponAmount"),
-
 
104
    REFUND_TIMESTAMP((short)21, "refundTimestamp");
102
 
105
 
103
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
106
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
104
 
107
 
105
    static {
108
    static {
106
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
109
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 151... Line 154...
151
          return PLAN;
154
          return PLAN;
152
        case 19: // COUPON_CODE
155
        case 19: // COUPON_CODE
153
          return COUPON_CODE;
156
          return COUPON_CODE;
154
        case 20: // COUPON_AMOUNT
157
        case 20: // COUPON_AMOUNT
155
          return COUPON_AMOUNT;
158
          return COUPON_AMOUNT;
-
 
159
        case 21: // REFUND_TIMESTAMP
-
 
160
          return REFUND_TIMESTAMP;
156
        default:
161
        default:
157
          return null;
162
          return null;
158
      }
163
      }
159
    }
164
    }
160
 
165
 
Line 201... Line 206...
201
  private static final int __OPERATORID_ISSET_ID = 5;
206
  private static final int __OPERATORID_ISSET_ID = 5;
202
  private static final int __USERID_ISSET_ID = 6;
207
  private static final int __USERID_ISSET_ID = 6;
203
  private static final int __CREATIONTIMESTAMP_ISSET_ID = 7;
208
  private static final int __CREATIONTIMESTAMP_ISSET_ID = 7;
204
  private static final int __RESPONSETIMESTAMP_ISSET_ID = 8;
209
  private static final int __RESPONSETIMESTAMP_ISSET_ID = 8;
205
  private static final int __COUPONAMOUNT_ISSET_ID = 9;
210
  private static final int __COUPONAMOUNT_ISSET_ID = 9;
-
 
211
  private static final int __REFUNDTIMESTAMP_ISSET_ID = 10;
206
  private BitSet __isset_bit_vector = new BitSet(10);
212
  private BitSet __isset_bit_vector = new BitSet(11);
207
 
213
 
208
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
214
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
209
  static {
215
  static {
210
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
216
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
211
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
217
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 246... Line 252...
246
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
252
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
247
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
253
    tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
248
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
254
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
249
    tmpMap.put(_Fields.COUPON_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("couponAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
255
    tmpMap.put(_Fields.COUPON_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("couponAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
250
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
256
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
257
    tmpMap.put(_Fields.REFUND_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("refundTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
258
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
251
    metaDataMap = Collections.unmodifiableMap(tmpMap);
259
    metaDataMap = Collections.unmodifiableMap(tmpMap);
252
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
260
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
253
  }
261
  }
254
 
262
 
255
  public RechargeOrder() {
263
  public RechargeOrder() {
Line 273... Line 281...
273
    String spiceTID,
281
    String spiceTID,
274
    long responseTimestamp,
282
    long responseTimestamp,
275
    String description,
283
    String description,
276
    String plan,
284
    String plan,
277
    String couponCode,
285
    String couponCode,
278
    long couponAmount)
286
    long couponAmount,
-
 
287
    long refundTimestamp)
279
  {
288
  {
280
    this();
289
    this();
281
    this.id = id;
290
    this.id = id;
282
    setIdIsSet(true);
291
    setIdIsSet(true);
283
    this.displayId = displayId;
292
    this.displayId = displayId;
Line 306... Line 315...
306
    this.description = description;
315
    this.description = description;
307
    this.plan = plan;
316
    this.plan = plan;
308
    this.couponCode = couponCode;
317
    this.couponCode = couponCode;
309
    this.couponAmount = couponAmount;
318
    this.couponAmount = couponAmount;
310
    setCouponAmountIsSet(true);
319
    setCouponAmountIsSet(true);
-
 
320
    this.refundTimestamp = refundTimestamp;
-
 
321
    setRefundTimestampIsSet(true);
311
  }
322
  }
312
 
323
 
313
  /**
324
  /**
314
   * Performs a deep copy on <i>other</i>.
325
   * Performs a deep copy on <i>other</i>.
315
   */
326
   */
Line 354... Line 365...
354
    }
365
    }
355
    if (other.isSetCouponCode()) {
366
    if (other.isSetCouponCode()) {
356
      this.couponCode = other.couponCode;
367
      this.couponCode = other.couponCode;
357
    }
368
    }
358
    this.couponAmount = other.couponAmount;
369
    this.couponAmount = other.couponAmount;
-
 
370
    this.refundTimestamp = other.refundTimestamp;
359
  }
371
  }
360
 
372
 
361
  public RechargeOrder deepCopy() {
373
  public RechargeOrder deepCopy() {
362
    return new RechargeOrder(this);
374
    return new RechargeOrder(this);
363
  }
375
  }
Line 392... Line 404...
392
    this.description = null;
404
    this.description = null;
393
    this.plan = null;
405
    this.plan = null;
394
    this.couponCode = null;
406
    this.couponCode = null;
395
    setCouponAmountIsSet(false);
407
    setCouponAmountIsSet(false);
396
    this.couponAmount = 0;
408
    this.couponAmount = 0;
-
 
409
    setRefundTimestampIsSet(false);
-
 
410
    this.refundTimestamp = 0;
397
  }
411
  }
398
 
412
 
399
  public long getId() {
413
  public long getId() {
400
    return this.id;
414
    return this.id;
401
  }
415
  }
Line 868... Line 882...
868
 
882
 
869
  public void setCouponAmountIsSet(boolean value) {
883
  public void setCouponAmountIsSet(boolean value) {
870
    __isset_bit_vector.set(__COUPONAMOUNT_ISSET_ID, value);
884
    __isset_bit_vector.set(__COUPONAMOUNT_ISSET_ID, value);
871
  }
885
  }
872
 
886
 
-
 
887
  public long getRefundTimestamp() {
-
 
888
    return this.refundTimestamp;
-
 
889
  }
-
 
890
 
-
 
891
  public void setRefundTimestamp(long refundTimestamp) {
-
 
892
    this.refundTimestamp = refundTimestamp;
-
 
893
    setRefundTimestampIsSet(true);
-
 
894
  }
-
 
895
 
-
 
896
  public void unsetRefundTimestamp() {
-
 
897
    __isset_bit_vector.clear(__REFUNDTIMESTAMP_ISSET_ID);
-
 
898
  }
-
 
899
 
-
 
900
  /** Returns true if field refundTimestamp is set (has been assigned a value) and false otherwise */
-
 
901
  public boolean isSetRefundTimestamp() {
-
 
902
    return __isset_bit_vector.get(__REFUNDTIMESTAMP_ISSET_ID);
-
 
903
  }
-
 
904
 
-
 
905
  public void setRefundTimestampIsSet(boolean value) {
-
 
906
    __isset_bit_vector.set(__REFUNDTIMESTAMP_ISSET_ID, value);
-
 
907
  }
-
 
908
 
873
  public void setFieldValue(_Fields field, Object value) {
909
  public void setFieldValue(_Fields field, Object value) {
874
    switch (field) {
910
    switch (field) {
875
    case ID:
911
    case ID:
876
      if (value == null) {
912
      if (value == null) {
877
        unsetId();
913
        unsetId();
Line 1030... Line 1066...
1030
      } else {
1066
      } else {
1031
        setCouponAmount((Long)value);
1067
        setCouponAmount((Long)value);
1032
      }
1068
      }
1033
      break;
1069
      break;
1034
 
1070
 
-
 
1071
    case REFUND_TIMESTAMP:
-
 
1072
      if (value == null) {
-
 
1073
        unsetRefundTimestamp();
-
 
1074
      } else {
-
 
1075
        setRefundTimestamp((Long)value);
-
 
1076
      }
-
 
1077
      break;
-
 
1078
 
1035
    }
1079
    }
1036
  }
1080
  }
1037
 
1081
 
1038
  public Object getFieldValue(_Fields field) {
1082
  public Object getFieldValue(_Fields field) {
1039
    switch (field) {
1083
    switch (field) {
Line 1095... Line 1139...
1095
      return getCouponCode();
1139
      return getCouponCode();
1096
 
1140
 
1097
    case COUPON_AMOUNT:
1141
    case COUPON_AMOUNT:
1098
      return Long.valueOf(getCouponAmount());
1142
      return Long.valueOf(getCouponAmount());
1099
 
1143
 
-
 
1144
    case REFUND_TIMESTAMP:
-
 
1145
      return Long.valueOf(getRefundTimestamp());
-
 
1146
 
1100
    }
1147
    }
1101
    throw new IllegalStateException();
1148
    throw new IllegalStateException();
1102
  }
1149
  }
1103
 
1150
 
1104
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1151
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1146... Line 1193...
1146
      return isSetPlan();
1193
      return isSetPlan();
1147
    case COUPON_CODE:
1194
    case COUPON_CODE:
1148
      return isSetCouponCode();
1195
      return isSetCouponCode();
1149
    case COUPON_AMOUNT:
1196
    case COUPON_AMOUNT:
1150
      return isSetCouponAmount();
1197
      return isSetCouponAmount();
-
 
1198
    case REFUND_TIMESTAMP:
-
 
1199
      return isSetRefundTimestamp();
1151
    }
1200
    }
1152
    throw new IllegalStateException();
1201
    throw new IllegalStateException();
1153
  }
1202
  }
1154
 
1203
 
1155
  @Override
1204
  @Override
Line 1343... Line 1392...
1343
        return false;
1392
        return false;
1344
      if (this.couponAmount != that.couponAmount)
1393
      if (this.couponAmount != that.couponAmount)
1345
        return false;
1394
        return false;
1346
    }
1395
    }
1347
 
1396
 
-
 
1397
    boolean this_present_refundTimestamp = true;
-
 
1398
    boolean that_present_refundTimestamp = true;
-
 
1399
    if (this_present_refundTimestamp || that_present_refundTimestamp) {
-
 
1400
      if (!(this_present_refundTimestamp && that_present_refundTimestamp))
-
 
1401
        return false;
-
 
1402
      if (this.refundTimestamp != that.refundTimestamp)
-
 
1403
        return false;
-
 
1404
    }
-
 
1405
 
1348
    return true;
1406
    return true;
1349
  }
1407
  }
1350
 
1408
 
1351
  @Override
1409
  @Override
1352
  public int hashCode() {
1410
  public int hashCode() {
Line 1559... Line 1617...
1559
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponAmount, typedOther.couponAmount);
1617
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponAmount, typedOther.couponAmount);
1560
      if (lastComparison != 0) {
1618
      if (lastComparison != 0) {
1561
        return lastComparison;
1619
        return lastComparison;
1562
      }
1620
      }
1563
    }
1621
    }
-
 
1622
    lastComparison = Boolean.valueOf(isSetRefundTimestamp()).compareTo(typedOther.isSetRefundTimestamp());
-
 
1623
    if (lastComparison != 0) {
-
 
1624
      return lastComparison;
-
 
1625
    }
-
 
1626
    if (isSetRefundTimestamp()) {
-
 
1627
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refundTimestamp, typedOther.refundTimestamp);
-
 
1628
      if (lastComparison != 0) {
-
 
1629
        return lastComparison;
-
 
1630
      }
-
 
1631
    }
1564
    return 0;
1632
    return 0;
1565
  }
1633
  }
1566
 
1634
 
1567
  public _Fields fieldForId(int fieldId) {
1635
  public _Fields fieldForId(int fieldId) {
1568
    return _Fields.findByThriftId(fieldId);
1636
    return _Fields.findByThriftId(fieldId);
Line 1726... Line 1794...
1726
            setCouponAmountIsSet(true);
1794
            setCouponAmountIsSet(true);
1727
          } else { 
1795
          } else { 
1728
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1796
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1729
          }
1797
          }
1730
          break;
1798
          break;
-
 
1799
        case 21: // REFUND_TIMESTAMP
-
 
1800
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1801
            this.refundTimestamp = iprot.readI64();
-
 
1802
            setRefundTimestampIsSet(true);
-
 
1803
          } else { 
-
 
1804
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1805
          }
-
 
1806
          break;
1731
        default:
1807
        default:
1732
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1808
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1733
      }
1809
      }
1734
      iprot.readFieldEnd();
1810
      iprot.readFieldEnd();
1735
    }
1811
    }
Line 1819... Line 1895...
1819
      oprot.writeFieldEnd();
1895
      oprot.writeFieldEnd();
1820
    }
1896
    }
1821
    oprot.writeFieldBegin(COUPON_AMOUNT_FIELD_DESC);
1897
    oprot.writeFieldBegin(COUPON_AMOUNT_FIELD_DESC);
1822
    oprot.writeI64(this.couponAmount);
1898
    oprot.writeI64(this.couponAmount);
1823
    oprot.writeFieldEnd();
1899
    oprot.writeFieldEnd();
-
 
1900
    oprot.writeFieldBegin(REFUND_TIMESTAMP_FIELD_DESC);
-
 
1901
    oprot.writeI64(this.refundTimestamp);
-
 
1902
    oprot.writeFieldEnd();
1824
    oprot.writeFieldStop();
1903
    oprot.writeFieldStop();
1825
    oprot.writeStructEnd();
1904
    oprot.writeStructEnd();
1826
  }
1905
  }
1827
 
1906
 
1828
  @Override
1907
  @Override
Line 1947... Line 2026...
1947
    first = false;
2026
    first = false;
1948
    if (!first) sb.append(", ");
2027
    if (!first) sb.append(", ");
1949
    sb.append("couponAmount:");
2028
    sb.append("couponAmount:");
1950
    sb.append(this.couponAmount);
2029
    sb.append(this.couponAmount);
1951
    first = false;
2030
    first = false;
-
 
2031
    if (!first) sb.append(", ");
-
 
2032
    sb.append("refundTimestamp:");
-
 
2033
    sb.append(this.refundTimestamp);
-
 
2034
    first = false;
1952
    sb.append(")");
2035
    sb.append(")");
1953
    return sb.toString();
2036
    return sb.toString();
1954
  }
2037
  }
1955
 
2038
 
1956
  public void validate() throws org.apache.thrift.TException {
2039
  public void validate() throws org.apache.thrift.TException {