Subversion Repositories SmartDukaan

Rev

Rev 6515 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6515 Rev 6591
Line 42... Line 42...
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
  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);
-
 
47
  private static final org.apache.thrift.protocol.TField IP_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("ipAddress", org.apache.thrift.protocol.TType.STRING, (short)22);
47
 
48
 
48
  private long id; // required
49
  private long id; // required
49
  private String displayId; // required
50
  private String displayId; // required
50
  private long totalAmount; // required
51
  private long totalAmount; // required
51
  private long walletAmount; // required
52
  private long walletAmount; // required
Line 64... Line 65...
64
  private String description; // required
65
  private String description; // required
65
  private String plan; // required
66
  private String plan; // required
66
  private String couponCode; // required
67
  private String couponCode; // required
67
  private long couponAmount; // required
68
  private long couponAmount; // required
68
  private long refundTimestamp; // required
69
  private long refundTimestamp; // required
-
 
70
  private String ipAddress; // required
69
 
71
 
70
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
72
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
71
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
73
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
72
    ID((short)1, "id"),
74
    ID((short)1, "id"),
73
    DISPLAY_ID((short)2, "displayId"),
75
    DISPLAY_ID((short)2, "displayId"),
Line 99... Line 101...
99
    RESPONSE_TIMESTAMP((short)16, "responseTimestamp"),
101
    RESPONSE_TIMESTAMP((short)16, "responseTimestamp"),
100
    DESCRIPTION((short)17, "description"),
102
    DESCRIPTION((short)17, "description"),
101
    PLAN((short)18, "plan"),
103
    PLAN((short)18, "plan"),
102
    COUPON_CODE((short)19, "couponCode"),
104
    COUPON_CODE((short)19, "couponCode"),
103
    COUPON_AMOUNT((short)20, "couponAmount"),
105
    COUPON_AMOUNT((short)20, "couponAmount"),
104
    REFUND_TIMESTAMP((short)21, "refundTimestamp");
106
    REFUND_TIMESTAMP((short)21, "refundTimestamp"),
-
 
107
    IP_ADDRESS((short)22, "ipAddress");
105
 
108
 
106
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
109
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
107
 
110
 
108
    static {
111
    static {
109
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
112
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 156... Line 159...
156
          return COUPON_CODE;
159
          return COUPON_CODE;
157
        case 20: // COUPON_AMOUNT
160
        case 20: // COUPON_AMOUNT
158
          return COUPON_AMOUNT;
161
          return COUPON_AMOUNT;
159
        case 21: // REFUND_TIMESTAMP
162
        case 21: // REFUND_TIMESTAMP
160
          return REFUND_TIMESTAMP;
163
          return REFUND_TIMESTAMP;
-
 
164
        case 22: // IP_ADDRESS
-
 
165
          return IP_ADDRESS;
161
        default:
166
        default:
162
          return null;
167
          return null;
163
      }
168
      }
164
    }
169
    }
165
 
170
 
Line 254... Line 259...
254
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
259
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
255
    tmpMap.put(_Fields.COUPON_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("couponAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
260
    tmpMap.put(_Fields.COUPON_AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("couponAmount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
256
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
261
        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, 
262
    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)));
263
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
264
    tmpMap.put(_Fields.IP_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("ipAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
265
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
259
    metaDataMap = Collections.unmodifiableMap(tmpMap);
266
    metaDataMap = Collections.unmodifiableMap(tmpMap);
260
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
267
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeOrder.class, metaDataMap);
261
  }
268
  }
262
 
269
 
263
  public RechargeOrder() {
270
  public RechargeOrder() {
Line 282... Line 289...
282
    long responseTimestamp,
289
    long responseTimestamp,
283
    String description,
290
    String description,
284
    String plan,
291
    String plan,
285
    String couponCode,
292
    String couponCode,
286
    long couponAmount,
293
    long couponAmount,
287
    long refundTimestamp)
294
    long refundTimestamp,
-
 
295
    String ipAddress)
288
  {
296
  {
289
    this();
297
    this();
290
    this.id = id;
298
    this.id = id;
291
    setIdIsSet(true);
299
    setIdIsSet(true);
292
    this.displayId = displayId;
300
    this.displayId = displayId;
Line 317... Line 325...
317
    this.couponCode = couponCode;
325
    this.couponCode = couponCode;
318
    this.couponAmount = couponAmount;
326
    this.couponAmount = couponAmount;
319
    setCouponAmountIsSet(true);
327
    setCouponAmountIsSet(true);
320
    this.refundTimestamp = refundTimestamp;
328
    this.refundTimestamp = refundTimestamp;
321
    setRefundTimestampIsSet(true);
329
    setRefundTimestampIsSet(true);
-
 
330
    this.ipAddress = ipAddress;
322
  }
331
  }
323
 
332
 
324
  /**
333
  /**
325
   * Performs a deep copy on <i>other</i>.
334
   * Performs a deep copy on <i>other</i>.
326
   */
335
   */
Line 366... Line 375...
366
    if (other.isSetCouponCode()) {
375
    if (other.isSetCouponCode()) {
367
      this.couponCode = other.couponCode;
376
      this.couponCode = other.couponCode;
368
    }
377
    }
369
    this.couponAmount = other.couponAmount;
378
    this.couponAmount = other.couponAmount;
370
    this.refundTimestamp = other.refundTimestamp;
379
    this.refundTimestamp = other.refundTimestamp;
-
 
380
    if (other.isSetIpAddress()) {
-
 
381
      this.ipAddress = other.ipAddress;
-
 
382
    }
371
  }
383
  }
372
 
384
 
373
  public RechargeOrder deepCopy() {
385
  public RechargeOrder deepCopy() {
374
    return new RechargeOrder(this);
386
    return new RechargeOrder(this);
375
  }
387
  }
Line 406... Line 418...
406
    this.couponCode = null;
418
    this.couponCode = null;
407
    setCouponAmountIsSet(false);
419
    setCouponAmountIsSet(false);
408
    this.couponAmount = 0;
420
    this.couponAmount = 0;
409
    setRefundTimestampIsSet(false);
421
    setRefundTimestampIsSet(false);
410
    this.refundTimestamp = 0;
422
    this.refundTimestamp = 0;
-
 
423
    this.ipAddress = null;
411
  }
424
  }
412
 
425
 
413
  public long getId() {
426
  public long getId() {
414
    return this.id;
427
    return this.id;
415
  }
428
  }
Line 904... Line 917...
904
 
917
 
905
  public void setRefundTimestampIsSet(boolean value) {
918
  public void setRefundTimestampIsSet(boolean value) {
906
    __isset_bit_vector.set(__REFUNDTIMESTAMP_ISSET_ID, value);
919
    __isset_bit_vector.set(__REFUNDTIMESTAMP_ISSET_ID, value);
907
  }
920
  }
908
 
921
 
-
 
922
  public String getIpAddress() {
-
 
923
    return this.ipAddress;
-
 
924
  }
-
 
925
 
-
 
926
  public void setIpAddress(String ipAddress) {
-
 
927
    this.ipAddress = ipAddress;
-
 
928
  }
-
 
929
 
-
 
930
  public void unsetIpAddress() {
-
 
931
    this.ipAddress = null;
-
 
932
  }
-
 
933
 
-
 
934
  /** Returns true if field ipAddress is set (has been assigned a value) and false otherwise */
-
 
935
  public boolean isSetIpAddress() {
-
 
936
    return this.ipAddress != null;
-
 
937
  }
-
 
938
 
-
 
939
  public void setIpAddressIsSet(boolean value) {
-
 
940
    if (!value) {
-
 
941
      this.ipAddress = null;
-
 
942
    }
-
 
943
  }
-
 
944
 
909
  public void setFieldValue(_Fields field, Object value) {
945
  public void setFieldValue(_Fields field, Object value) {
910
    switch (field) {
946
    switch (field) {
911
    case ID:
947
    case ID:
912
      if (value == null) {
948
      if (value == null) {
913
        unsetId();
949
        unsetId();
Line 1074... Line 1110...
1074
      } else {
1110
      } else {
1075
        setRefundTimestamp((Long)value);
1111
        setRefundTimestamp((Long)value);
1076
      }
1112
      }
1077
      break;
1113
      break;
1078
 
1114
 
-
 
1115
    case IP_ADDRESS:
-
 
1116
      if (value == null) {
-
 
1117
        unsetIpAddress();
-
 
1118
      } else {
-
 
1119
        setIpAddress((String)value);
-
 
1120
      }
-
 
1121
      break;
-
 
1122
 
1079
    }
1123
    }
1080
  }
1124
  }
1081
 
1125
 
1082
  public Object getFieldValue(_Fields field) {
1126
  public Object getFieldValue(_Fields field) {
1083
    switch (field) {
1127
    switch (field) {
Line 1142... Line 1186...
1142
      return Long.valueOf(getCouponAmount());
1186
      return Long.valueOf(getCouponAmount());
1143
 
1187
 
1144
    case REFUND_TIMESTAMP:
1188
    case REFUND_TIMESTAMP:
1145
      return Long.valueOf(getRefundTimestamp());
1189
      return Long.valueOf(getRefundTimestamp());
1146
 
1190
 
-
 
1191
    case IP_ADDRESS:
-
 
1192
      return getIpAddress();
-
 
1193
 
1147
    }
1194
    }
1148
    throw new IllegalStateException();
1195
    throw new IllegalStateException();
1149
  }
1196
  }
1150
 
1197
 
1151
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1198
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1195... Line 1242...
1195
      return isSetCouponCode();
1242
      return isSetCouponCode();
1196
    case COUPON_AMOUNT:
1243
    case COUPON_AMOUNT:
1197
      return isSetCouponAmount();
1244
      return isSetCouponAmount();
1198
    case REFUND_TIMESTAMP:
1245
    case REFUND_TIMESTAMP:
1199
      return isSetRefundTimestamp();
1246
      return isSetRefundTimestamp();
-
 
1247
    case IP_ADDRESS:
-
 
1248
      return isSetIpAddress();
1200
    }
1249
    }
1201
    throw new IllegalStateException();
1250
    throw new IllegalStateException();
1202
  }
1251
  }
1203
 
1252
 
1204
  @Override
1253
  @Override
Line 1401... Line 1450...
1401
        return false;
1450
        return false;
1402
      if (this.refundTimestamp != that.refundTimestamp)
1451
      if (this.refundTimestamp != that.refundTimestamp)
1403
        return false;
1452
        return false;
1404
    }
1453
    }
1405
 
1454
 
-
 
1455
    boolean this_present_ipAddress = true && this.isSetIpAddress();
-
 
1456
    boolean that_present_ipAddress = true && that.isSetIpAddress();
-
 
1457
    if (this_present_ipAddress || that_present_ipAddress) {
-
 
1458
      if (!(this_present_ipAddress && that_present_ipAddress))
-
 
1459
        return false;
-
 
1460
      if (!this.ipAddress.equals(that.ipAddress))
-
 
1461
        return false;
-
 
1462
    }
-
 
1463
 
1406
    return true;
1464
    return true;
1407
  }
1465
  }
1408
 
1466
 
1409
  @Override
1467
  @Override
1410
  public int hashCode() {
1468
  public int hashCode() {
Line 1627... Line 1685...
1627
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refundTimestamp, typedOther.refundTimestamp);
1685
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.refundTimestamp, typedOther.refundTimestamp);
1628
      if (lastComparison != 0) {
1686
      if (lastComparison != 0) {
1629
        return lastComparison;
1687
        return lastComparison;
1630
      }
1688
      }
1631
    }
1689
    }
-
 
1690
    lastComparison = Boolean.valueOf(isSetIpAddress()).compareTo(typedOther.isSetIpAddress());
-
 
1691
    if (lastComparison != 0) {
-
 
1692
      return lastComparison;
-
 
1693
    }
-
 
1694
    if (isSetIpAddress()) {
-
 
1695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ipAddress, typedOther.ipAddress);
-
 
1696
      if (lastComparison != 0) {
-
 
1697
        return lastComparison;
-
 
1698
      }
-
 
1699
    }
1632
    return 0;
1700
    return 0;
1633
  }
1701
  }
1634
 
1702
 
1635
  public _Fields fieldForId(int fieldId) {
1703
  public _Fields fieldForId(int fieldId) {
1636
    return _Fields.findByThriftId(fieldId);
1704
    return _Fields.findByThriftId(fieldId);
Line 1802... Line 1870...
1802
            setRefundTimestampIsSet(true);
1870
            setRefundTimestampIsSet(true);
1803
          } else { 
1871
          } else { 
1804
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1872
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1805
          }
1873
          }
1806
          break;
1874
          break;
-
 
1875
        case 22: // IP_ADDRESS
-
 
1876
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1877
            this.ipAddress = iprot.readString();
-
 
1878
          } else { 
-
 
1879
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1880
          }
-
 
1881
          break;
1807
        default:
1882
        default:
1808
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1883
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1809
      }
1884
      }
1810
      iprot.readFieldEnd();
1885
      iprot.readFieldEnd();
1811
    }
1886
    }
Line 1898... Line 1973...
1898
    oprot.writeI64(this.couponAmount);
1973
    oprot.writeI64(this.couponAmount);
1899
    oprot.writeFieldEnd();
1974
    oprot.writeFieldEnd();
1900
    oprot.writeFieldBegin(REFUND_TIMESTAMP_FIELD_DESC);
1975
    oprot.writeFieldBegin(REFUND_TIMESTAMP_FIELD_DESC);
1901
    oprot.writeI64(this.refundTimestamp);
1976
    oprot.writeI64(this.refundTimestamp);
1902
    oprot.writeFieldEnd();
1977
    oprot.writeFieldEnd();
-
 
1978
    if (this.ipAddress != null) {
-
 
1979
      oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC);
-
 
1980
      oprot.writeString(this.ipAddress);
-
 
1981
      oprot.writeFieldEnd();
-
 
1982
    }
1903
    oprot.writeFieldStop();
1983
    oprot.writeFieldStop();
1904
    oprot.writeStructEnd();
1984
    oprot.writeStructEnd();
1905
  }
1985
  }
1906
 
1986
 
1907
  @Override
1987
  @Override
Line 2030... Line 2110...
2030
    first = false;
2110
    first = false;
2031
    if (!first) sb.append(", ");
2111
    if (!first) sb.append(", ");
2032
    sb.append("refundTimestamp:");
2112
    sb.append("refundTimestamp:");
2033
    sb.append(this.refundTimestamp);
2113
    sb.append(this.refundTimestamp);
2034
    first = false;
2114
    first = false;
-
 
2115
    if (!first) sb.append(", ");
-
 
2116
    sb.append("ipAddress:");
-
 
2117
    if (this.ipAddress == null) {
-
 
2118
      sb.append("null");
-
 
2119
    } else {
-
 
2120
      sb.append(this.ipAddress);
-
 
2121
    }
-
 
2122
    first = false;
2035
    sb.append(")");
2123
    sb.append(")");
2036
    return sb.toString();
2124
    return sb.toString();
2037
  }
2125
  }
2038
 
2126
 
2039
  public void validate() throws org.apache.thrift.TException {
2127
  public void validate() throws org.apache.thrift.TException {