Subversion Repositories SmartDukaan

Rev

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

Rev 7073 Rev 7080
Line 41... Line 41...
41
  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)16);
41
  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)16);
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
 
47
 
47
  private long id; // required
48
  private long id; // required
48
  private long storeId; // required
49
  private long storeId; // required
49
  private double amount; // required
50
  private double amount; // required
50
  private long transactionTime; // required
51
  private long transactionTime; // required
Line 62... Line 63...
62
  private String plan; // required
63
  private String plan; // required
63
  private String ipAddress; // required
64
  private String ipAddress; // required
64
  private String name; // required
65
  private String name; // required
65
  private String cafNum; // required
66
  private String cafNum; // required
66
  private String simNum; // required
67
  private String simNum; // required
-
 
68
  private String alternateNumber; // 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
    STORE_ID((short)2, "storeId"),
73
    STORE_ID((short)2, "storeId"),
Line 96... Line 98...
96
    OPERATOR_ID((short)15, "operatorId"),
98
    OPERATOR_ID((short)15, "operatorId"),
97
    PLAN((short)16, "plan"),
99
    PLAN((short)16, "plan"),
98
    IP_ADDRESS((short)17, "ipAddress"),
100
    IP_ADDRESS((short)17, "ipAddress"),
99
    NAME((short)18, "name"),
101
    NAME((short)18, "name"),
100
    CAF_NUM((short)19, "cafNum"),
102
    CAF_NUM((short)19, "cafNum"),
101
    SIM_NUM((short)20, "simNum");
103
    SIM_NUM((short)20, "simNum"),
-
 
104
    ALTERNATE_NUMBER((short)21, "alternateNumber");
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 NAME;
154
          return NAME;
152
        case 19: // CAF_NUM
155
        case 19: // CAF_NUM
153
          return CAF_NUM;
156
          return CAF_NUM;
154
        case 20: // SIM_NUM
157
        case 20: // SIM_NUM
155
          return SIM_NUM;
158
          return SIM_NUM;
-
 
159
        case 21: // ALTERNATE_NUMBER
-
 
160
          return ALTERNATE_NUMBER;
156
        default:
161
        default:
157
          return null;
162
          return null;
158
      }
163
      }
159
    }
164
    }
160
 
165
 
Line 245... Line 250...
245
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
250
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
246
    tmpMap.put(_Fields.CAF_NUM, new org.apache.thrift.meta_data.FieldMetaData("cafNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
251
    tmpMap.put(_Fields.CAF_NUM, new org.apache.thrift.meta_data.FieldMetaData("cafNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
247
        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)));
248
    tmpMap.put(_Fields.SIM_NUM, new org.apache.thrift.meta_data.FieldMetaData("simNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
253
    tmpMap.put(_Fields.SIM_NUM, new org.apache.thrift.meta_data.FieldMetaData("simNum", org.apache.thrift.TFieldRequirementType.DEFAULT, 
249
        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)));
-
 
255
    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)));
250
    metaDataMap = Collections.unmodifiableMap(tmpMap);
257
    metaDataMap = Collections.unmodifiableMap(tmpMap);
251
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeTransaction.class, metaDataMap);
258
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RechargeTransaction.class, metaDataMap);
252
  }
259
  }
253
 
260
 
254
  public RechargeTransaction() {
261
  public RechargeTransaction() {
Line 272... Line 279...
272
    long operatorId,
279
    long operatorId,
273
    String plan,
280
    String plan,
274
    String ipAddress,
281
    String ipAddress,
275
    String name,
282
    String name,
276
    String cafNum,
283
    String cafNum,
277
    String simNum)
284
    String simNum,
-
 
285
    String alternateNumber)
278
  {
286
  {
279
    this();
287
    this();
280
    this.id = id;
288
    this.id = id;
281
    setIdIsSet(true);
289
    setIdIsSet(true);
282
    this.storeId = storeId;
290
    this.storeId = storeId;
Line 304... Line 312...
304
    this.plan = plan;
312
    this.plan = plan;
305
    this.ipAddress = ipAddress;
313
    this.ipAddress = ipAddress;
306
    this.name = name;
314
    this.name = name;
307
    this.cafNum = cafNum;
315
    this.cafNum = cafNum;
308
    this.simNum = simNum;
316
    this.simNum = simNum;
-
 
317
    this.alternateNumber = alternateNumber;
309
  }
318
  }
310
 
319
 
311
  /**
320
  /**
312
   * Performs a deep copy on <i>other</i>.
321
   * Performs a deep copy on <i>other</i>.
313
   */
322
   */
Line 354... Line 363...
354
      this.cafNum = other.cafNum;
363
      this.cafNum = other.cafNum;
355
    }
364
    }
356
    if (other.isSetSimNum()) {
365
    if (other.isSetSimNum()) {
357
      this.simNum = other.simNum;
366
      this.simNum = other.simNum;
358
    }
367
    }
-
 
368
    if (other.isSetAlternateNumber()) {
-
 
369
      this.alternateNumber = other.alternateNumber;
-
 
370
    }
359
  }
371
  }
360
 
372
 
361
  public RechargeTransaction deepCopy() {
373
  public RechargeTransaction deepCopy() {
362
    return new RechargeTransaction(this);
374
    return new RechargeTransaction(this);
363
  }
375
  }
Line 391... Line 403...
391
    this.plan = null;
403
    this.plan = null;
392
    this.ipAddress = null;
404
    this.ipAddress = null;
393
    this.name = null;
405
    this.name = null;
394
    this.cafNum = null;
406
    this.cafNum = null;
395
    this.simNum = null;
407
    this.simNum = null;
-
 
408
    this.alternateNumber = null;
396
  }
409
  }
397
 
410
 
398
  public long getId() {
411
  public long getId() {
399
    return this.id;
412
    return this.id;
400
  }
413
  }
Line 868... Line 881...
868
    if (!value) {
881
    if (!value) {
869
      this.simNum = null;
882
      this.simNum = null;
870
    }
883
    }
871
  }
884
  }
872
 
885
 
-
 
886
  public String getAlternateNumber() {
-
 
887
    return this.alternateNumber;
-
 
888
  }
-
 
889
 
-
 
890
  public void setAlternateNumber(String alternateNumber) {
-
 
891
    this.alternateNumber = alternateNumber;
-
 
892
  }
-
 
893
 
-
 
894
  public void unsetAlternateNumber() {
-
 
895
    this.alternateNumber = null;
-
 
896
  }
-
 
897
 
-
 
898
  /** Returns true if field alternateNumber is set (has been assigned a value) and false otherwise */
-
 
899
  public boolean isSetAlternateNumber() {
-
 
900
    return this.alternateNumber != null;
-
 
901
  }
-
 
902
 
-
 
903
  public void setAlternateNumberIsSet(boolean value) {
-
 
904
    if (!value) {
-
 
905
      this.alternateNumber = null;
-
 
906
    }
-
 
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
        setSimNum((String)value);
1067
        setSimNum((String)value);
1032
      }
1068
      }
1033
      break;
1069
      break;
1034
 
1070
 
-
 
1071
    case ALTERNATE_NUMBER:
-
 
1072
      if (value == null) {
-
 
1073
        unsetAlternateNumber();
-
 
1074
      } else {
-
 
1075
        setAlternateNumber((String)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 getCafNum();
1139
      return getCafNum();
1096
 
1140
 
1097
    case SIM_NUM:
1141
    case SIM_NUM:
1098
      return getSimNum();
1142
      return getSimNum();
1099
 
1143
 
-
 
1144
    case ALTERNATE_NUMBER:
-
 
1145
      return getAlternateNumber();
-
 
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 isSetName();
1193
      return isSetName();
1147
    case CAF_NUM:
1194
    case CAF_NUM:
1148
      return isSetCafNum();
1195
      return isSetCafNum();
1149
    case SIM_NUM:
1196
    case SIM_NUM:
1150
      return isSetSimNum();
1197
      return isSetSimNum();
-
 
1198
    case ALTERNATE_NUMBER:
-
 
1199
      return isSetAlternateNumber();
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.simNum.equals(that.simNum))
1393
      if (!this.simNum.equals(that.simNum))
1345
        return false;
1394
        return false;
1346
    }
1395
    }
1347
 
1396
 
-
 
1397
    boolean this_present_alternateNumber = true && this.isSetAlternateNumber();
-
 
1398
    boolean that_present_alternateNumber = true && that.isSetAlternateNumber();
-
 
1399
    if (this_present_alternateNumber || that_present_alternateNumber) {
-
 
1400
      if (!(this_present_alternateNumber && that_present_alternateNumber))
-
 
1401
        return false;
-
 
1402
      if (!this.alternateNumber.equals(that.alternateNumber))
-
 
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.simNum, typedOther.simNum);
1617
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.simNum, typedOther.simNum);
1560
      if (lastComparison != 0) {
1618
      if (lastComparison != 0) {
1561
        return lastComparison;
1619
        return lastComparison;
1562
      }
1620
      }
1563
    }
1621
    }
-
 
1622
    lastComparison = Boolean.valueOf(isSetAlternateNumber()).compareTo(typedOther.isSetAlternateNumber());
-
 
1623
    if (lastComparison != 0) {
-
 
1624
      return lastComparison;
-
 
1625
    }
-
 
1626
    if (isSetAlternateNumber()) {
-
 
1627
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.alternateNumber, typedOther.alternateNumber);
-
 
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 1725... Line 1793...
1725
            this.simNum = iprot.readString();
1793
            this.simNum = iprot.readString();
1726
          } else { 
1794
          } else { 
1727
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1795
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1728
          }
1796
          }
1729
          break;
1797
          break;
-
 
1798
        case 21: // ALTERNATE_NUMBER
-
 
1799
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1800
            this.alternateNumber = iprot.readString();
-
 
1801
          } else { 
-
 
1802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1803
          }
-
 
1804
          break;
1730
        default:
1805
        default:
1731
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1806
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1732
      }
1807
      }
1733
      iprot.readFieldEnd();
1808
      iprot.readFieldEnd();
1734
    }
1809
    }
Line 1820... Line 1895...
1820
    if (this.simNum != null) {
1895
    if (this.simNum != null) {
1821
      oprot.writeFieldBegin(SIM_NUM_FIELD_DESC);
1896
      oprot.writeFieldBegin(SIM_NUM_FIELD_DESC);
1822
      oprot.writeString(this.simNum);
1897
      oprot.writeString(this.simNum);
1823
      oprot.writeFieldEnd();
1898
      oprot.writeFieldEnd();
1824
    }
1899
    }
-
 
1900
    if (this.alternateNumber != null) {
-
 
1901
      oprot.writeFieldBegin(ALTERNATE_NUMBER_FIELD_DESC);
-
 
1902
      oprot.writeString(this.alternateNumber);
-
 
1903
      oprot.writeFieldEnd();
-
 
1904
    }
1825
    oprot.writeFieldStop();
1905
    oprot.writeFieldStop();
1826
    oprot.writeStructEnd();
1906
    oprot.writeStructEnd();
1827
  }
1907
  }
1828
 
1908
 
1829
  @Override
1909
  @Override
Line 1952... Line 2032...
1952
      sb.append("null");
2032
      sb.append("null");
1953
    } else {
2033
    } else {
1954
      sb.append(this.simNum);
2034
      sb.append(this.simNum);
1955
    }
2035
    }
1956
    first = false;
2036
    first = false;
-
 
2037
    if (!first) sb.append(", ");
-
 
2038
    sb.append("alternateNumber:");
-
 
2039
    if (this.alternateNumber == null) {
-
 
2040
      sb.append("null");
-
 
2041
    } else {
-
 
2042
      sb.append(this.alternateNumber);
-
 
2043
    }
-
 
2044
    first = false;
1957
    sb.append(")");
2045
    sb.append(")");
1958
    return sb.toString();
2046
    return sb.toString();
1959
  }
2047
  }
1960
 
2048
 
1961
  public void validate() throws org.apache.thrift.TException {
2049
  public void validate() throws org.apache.thrift.TException {