Subversion Repositories SmartDukaan

Rev

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

Rev 7080 Rev 7096
Line 42... Line 42...
42
  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)17);
42
  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)17);
43
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)18);
43
  private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)18);
44
  private static final org.apache.thrift.protocol.TField CAF_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("cafNum", org.apache.thrift.protocol.TType.STRING, (short)19);
44
  private static final org.apache.thrift.protocol.TField CAF_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("cafNum", org.apache.thrift.protocol.TType.STRING, (short)19);
45
  private static final org.apache.thrift.protocol.TField SIM_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("simNum", org.apache.thrift.protocol.TType.STRING, (short)20);
45
  private static final org.apache.thrift.protocol.TField SIM_NUM_FIELD_DESC = new org.apache.thrift.protocol.TField("simNum", org.apache.thrift.protocol.TType.STRING, (short)20);
46
  private static final org.apache.thrift.protocol.TField ALTERNATE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("alternateNumber", org.apache.thrift.protocol.TType.STRING, (short)21);
46
  private static final org.apache.thrift.protocol.TField ALTERNATE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("alternateNumber", org.apache.thrift.protocol.TType.STRING, (short)21);
-
 
47
  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)22);
47
 
48
 
48
  private long id; // required
49
  private long id; // required
49
  private long storeId; // required
50
  private long storeId; // required
50
  private double amount; // required
51
  private double amount; // required
51
  private long transactionTime; // required
52
  private long transactionTime; // required
Line 64... Line 65...
64
  private String ipAddress; // required
65
  private String ipAddress; // required
65
  private String name; // required
66
  private String name; // required
66
  private String cafNum; // required
67
  private String cafNum; // required
67
  private String simNum; // required
68
  private String simNum; // required
68
  private String alternateNumber; // required
69
  private String alternateNumber; // required
-
 
70
  private String description; // 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
    STORE_ID((short)2, "storeId"),
75
    STORE_ID((short)2, "storeId"),
Line 99... Line 101...
99
    PLAN((short)16, "plan"),
101
    PLAN((short)16, "plan"),
100
    IP_ADDRESS((short)17, "ipAddress"),
102
    IP_ADDRESS((short)17, "ipAddress"),
101
    NAME((short)18, "name"),
103
    NAME((short)18, "name"),
102
    CAF_NUM((short)19, "cafNum"),
104
    CAF_NUM((short)19, "cafNum"),
103
    SIM_NUM((short)20, "simNum"),
105
    SIM_NUM((short)20, "simNum"),
104
    ALTERNATE_NUMBER((short)21, "alternateNumber");
106
    ALTERNATE_NUMBER((short)21, "alternateNumber"),
-
 
107
    DESCRIPTION((short)22, "description");
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 CAF_NUM;
159
          return CAF_NUM;
157
        case 20: // SIM_NUM
160
        case 20: // SIM_NUM
158
          return SIM_NUM;
161
          return SIM_NUM;
159
        case 21: // ALTERNATE_NUMBER
162
        case 21: // ALTERNATE_NUMBER
160
          return ALTERNATE_NUMBER;
163
          return ALTERNATE_NUMBER;
-
 
164
        case 22: // DESCRIPTION
-
 
165
          return DESCRIPTION;
161
        default:
166
        default:
162
          return null;
167
          return null;
163
      }
168
      }
164
    }
169
    }
165
 
170
 
Line 252... Line 257...
252
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
257
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
253
    tmpMap.put(_Fields.SIM_NUM, new org.apache.thrift.meta_data.FieldMetaData("simNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
258
    tmpMap.put(_Fields.SIM_NUM, new org.apache.thrift.meta_data.FieldMetaData("simNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
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.ALTERNATE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("alternateNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
260
    tmpMap.put(_Fields.ALTERNATE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("alternateNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
256
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
261
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
262
    tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
263
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
257
    metaDataMap = Collections.unmodifiableMap(tmpMap);
264
    metaDataMap = Collections.unmodifiableMap(tmpMap);
258
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeTransaction.class, metaDataMap);
265
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeTransaction.class, metaDataMap);
259
  }
266
  }
260
 
267
 
261
  public RechargeTransaction() {
268
  public RechargeTransaction() {
Line 280... Line 287...
280
    String plan,
287
    String plan,
281
    String ipAddress,
288
    String ipAddress,
282
    String name,
289
    String name,
283
    String cafNum,
290
    String cafNum,
284
    String simNum,
291
    String simNum,
285
    String alternateNumber)
292
    String alternateNumber,
-
 
293
    String description)
286
  {
294
  {
287
    this();
295
    this();
288
    this.id = id;
296
    this.id = id;
289
    setIdIsSet(true);
297
    setIdIsSet(true);
290
    this.storeId = storeId;
298
    this.storeId = storeId;
Line 313... Line 321...
313
    this.ipAddress = ipAddress;
321
    this.ipAddress = ipAddress;
314
    this.name = name;
322
    this.name = name;
315
    this.cafNum = cafNum;
323
    this.cafNum = cafNum;
316
    this.simNum = simNum;
324
    this.simNum = simNum;
317
    this.alternateNumber = alternateNumber;
325
    this.alternateNumber = alternateNumber;
-
 
326
    this.description = description;
318
  }
327
  }
319
 
328
 
320
  /**
329
  /**
321
   * Performs a deep copy on <i>other</i>.
330
   * Performs a deep copy on <i>other</i>.
322
   */
331
   */
Line 366... Line 375...
366
      this.simNum = other.simNum;
375
      this.simNum = other.simNum;
367
    }
376
    }
368
    if (other.isSetAlternateNumber()) {
377
    if (other.isSetAlternateNumber()) {
369
      this.alternateNumber = other.alternateNumber;
378
      this.alternateNumber = other.alternateNumber;
370
    }
379
    }
-
 
380
    if (other.isSetDescription()) {
-
 
381
      this.description = other.description;
-
 
382
    }
371
  }
383
  }
372
 
384
 
373
  public RechargeTransaction deepCopy() {
385
  public RechargeTransaction deepCopy() {
374
    return new RechargeTransaction(this);
386
    return new RechargeTransaction(this);
375
  }
387
  }
Line 404... Line 416...
404
    this.ipAddress = null;
416
    this.ipAddress = null;
405
    this.name = null;
417
    this.name = null;
406
    this.cafNum = null;
418
    this.cafNum = null;
407
    this.simNum = null;
419
    this.simNum = null;
408
    this.alternateNumber = null;
420
    this.alternateNumber = null;
-
 
421
    this.description = null;
409
  }
422
  }
410
 
423
 
411
  public long getId() {
424
  public long getId() {
412
    return this.id;
425
    return this.id;
413
  }
426
  }
Line 904... Line 917...
904
    if (!value) {
917
    if (!value) {
905
      this.alternateNumber = null;
918
      this.alternateNumber = null;
906
    }
919
    }
907
  }
920
  }
908
 
921
 
-
 
922
  public String getDescription() {
-
 
923
    return this.description;
-
 
924
  }
-
 
925
 
-
 
926
  public void setDescription(String description) {
-
 
927
    this.description = description;
-
 
928
  }
-
 
929
 
-
 
930
  public void unsetDescription() {
-
 
931
    this.description = null;
-
 
932
  }
-
 
933
 
-
 
934
  /** Returns true if field description is set (has been assigned a value) and false otherwise */
-
 
935
  public boolean isSetDescription() {
-
 
936
    return this.description != null;
-
 
937
  }
-
 
938
 
-
 
939
  public void setDescriptionIsSet(boolean value) {
-
 
940
    if (!value) {
-
 
941
      this.description = 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
        setAlternateNumber((String)value);
1111
        setAlternateNumber((String)value);
1076
      }
1112
      }
1077
      break;
1113
      break;
1078
 
1114
 
-
 
1115
    case DESCRIPTION:
-
 
1116
      if (value == null) {
-
 
1117
        unsetDescription();
-
 
1118
      } else {
-
 
1119
        setDescription((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 getSimNum();
1186
      return getSimNum();
1143
 
1187
 
1144
    case ALTERNATE_NUMBER:
1188
    case ALTERNATE_NUMBER:
1145
      return getAlternateNumber();
1189
      return getAlternateNumber();
1146
 
1190
 
-
 
1191
    case DESCRIPTION:
-
 
1192
      return getDescription();
-
 
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 isSetCafNum();
1242
      return isSetCafNum();
1196
    case SIM_NUM:
1243
    case SIM_NUM:
1197
      return isSetSimNum();
1244
      return isSetSimNum();
1198
    case ALTERNATE_NUMBER:
1245
    case ALTERNATE_NUMBER:
1199
      return isSetAlternateNumber();
1246
      return isSetAlternateNumber();
-
 
1247
    case DESCRIPTION:
-
 
1248
      return isSetDescription();
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.alternateNumber.equals(that.alternateNumber))
1451
      if (!this.alternateNumber.equals(that.alternateNumber))
1403
        return false;
1452
        return false;
1404
    }
1453
    }
1405
 
1454
 
-
 
1455
    boolean this_present_description = true && this.isSetDescription();
-
 
1456
    boolean that_present_description = true && that.isSetDescription();
-
 
1457
    if (this_present_description || that_present_description) {
-
 
1458
      if (!(this_present_description && that_present_description))
-
 
1459
        return false;
-
 
1460
      if (!this.description.equals(that.description))
-
 
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.alternateNumber, typedOther.alternateNumber);
1685
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternateNumber, typedOther.alternateNumber);
1628
      if (lastComparison != 0) {
1686
      if (lastComparison != 0) {
1629
        return lastComparison;
1687
        return lastComparison;
1630
      }
1688
      }
1631
    }
1689
    }
-
 
1690
    lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
-
 
1691
    if (lastComparison != 0) {
-
 
1692
      return lastComparison;
-
 
1693
    }
-
 
1694
    if (isSetDescription()) {
-
 
1695
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
-
 
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 1800... Line 1868...
1800
            this.alternateNumber = iprot.readString();
1868
            this.alternateNumber = iprot.readString();
1801
          } else { 
1869
          } else { 
1802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1870
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1803
          }
1871
          }
1804
          break;
1872
          break;
-
 
1873
        case 22: // DESCRIPTION
-
 
1874
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1875
            this.description = iprot.readString();
-
 
1876
          } else { 
-
 
1877
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1878
          }
-
 
1879
          break;
1805
        default:
1880
        default:
1806
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1881
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1807
      }
1882
      }
1808
      iprot.readFieldEnd();
1883
      iprot.readFieldEnd();
1809
    }
1884
    }
Line 1900... Line 1975...
1900
    if (this.alternateNumber != null) {
1975
    if (this.alternateNumber != null) {
1901
      oprot.writeFieldBegin(ALTERNATE_NUMBER_FIELD_DESC);
1976
      oprot.writeFieldBegin(ALTERNATE_NUMBER_FIELD_DESC);
1902
      oprot.writeString(this.alternateNumber);
1977
      oprot.writeString(this.alternateNumber);
1903
      oprot.writeFieldEnd();
1978
      oprot.writeFieldEnd();
1904
    }
1979
    }
-
 
1980
    if (this.description != null) {
-
 
1981
      oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
-
 
1982
      oprot.writeString(this.description);
-
 
1983
      oprot.writeFieldEnd();
-
 
1984
    }
1905
    oprot.writeFieldStop();
1985
    oprot.writeFieldStop();
1906
    oprot.writeStructEnd();
1986
    oprot.writeStructEnd();
1907
  }
1987
  }
1908
 
1988
 
1909
  @Override
1989
  @Override
Line 2040... Line 2120...
2040
      sb.append("null");
2120
      sb.append("null");
2041
    } else {
2121
    } else {
2042
      sb.append(this.alternateNumber);
2122
      sb.append(this.alternateNumber);
2043
    }
2123
    }
2044
    first = false;
2124
    first = false;
-
 
2125
    if (!first) sb.append(", ");
-
 
2126
    sb.append("description:");
-
 
2127
    if (this.description == null) {
-
 
2128
      sb.append("null");
-
 
2129
    } else {
-
 
2130
      sb.append(this.description);
-
 
2131
    }
-
 
2132
    first = false;
2045
    sb.append(")");
2133
    sb.append(")");
2046
    return sb.toString();
2134
    return sb.toString();
2047
  }
2135
  }
2048
 
2136
 
2049
  public void validate() throws org.apache.thrift.TException {
2137
  public void validate() throws org.apache.thrift.TException {