Subversion Repositories SmartDukaan

Rev

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

Rev 4421 Rev 6050
Line 41... Line 41...
41
  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.LIST, (short)16);
41
  private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.LIST, (short)16);
42
  private static final org.apache.thrift.protocol.TField INIT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("initTimestamp", org.apache.thrift.protocol.TType.I64, (short)17);
42
  private static final org.apache.thrift.protocol.TField INIT_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("initTimestamp", org.apache.thrift.protocol.TType.I64, (short)17);
43
  private static final org.apache.thrift.protocol.TField SUCCESS_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("successTimestamp", org.apache.thrift.protocol.TType.I64, (short)18);
43
  private static final org.apache.thrift.protocol.TField SUCCESS_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("successTimestamp", org.apache.thrift.protocol.TType.I64, (short)18);
44
  private static final org.apache.thrift.protocol.TField ERROR_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("errorTimestamp", org.apache.thrift.protocol.TType.I64, (short)19);
44
  private static final org.apache.thrift.protocol.TField ERROR_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("errorTimestamp", org.apache.thrift.protocol.TType.I64, (short)19);
45
  private static final org.apache.thrift.protocol.TField PROVISIONAL_CAPTURE_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("provisionalCaptureTimestamp", org.apache.thrift.protocol.TType.I64, (short)20);
45
  private static final org.apache.thrift.protocol.TField PROVISIONAL_CAPTURE_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("provisionalCaptureTimestamp", org.apache.thrift.protocol.TType.I64, (short)20);
-
 
46
  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)21);
46
 
47
 
47
  private long paymentId; // required
48
  private long paymentId; // required
48
  private long gatewayId; // required
49
  private long gatewayId; // required
49
  private String gatewayPaymentId; // required
50
  private String gatewayPaymentId; // required
50
  private long merchantTxnId; // required
51
  private long merchantTxnId; // required
Line 62... Line 63...
62
  private List<Attribute> attributes; // required
63
  private List<Attribute> attributes; // required
63
  private long initTimestamp; // required
64
  private long initTimestamp; // required
64
  private long successTimestamp; // required
65
  private long successTimestamp; // required
65
  private long errorTimestamp; // required
66
  private long errorTimestamp; // required
66
  private long provisionalCaptureTimestamp; // required
67
  private long provisionalCaptureTimestamp; // required
-
 
68
  private boolean isDigital; // 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
    PAYMENT_ID((short)1, "paymentId"),
72
    PAYMENT_ID((short)1, "paymentId"),
71
    GATEWAY_ID((short)2, "gatewayId"),
73
    GATEWAY_ID((short)2, "gatewayId"),
Line 88... Line 90...
88
    GATEWAY_TXN_DATE((short)15, "gatewayTxnDate"),
90
    GATEWAY_TXN_DATE((short)15, "gatewayTxnDate"),
89
    ATTRIBUTES((short)16, "attributes"),
91
    ATTRIBUTES((short)16, "attributes"),
90
    INIT_TIMESTAMP((short)17, "initTimestamp"),
92
    INIT_TIMESTAMP((short)17, "initTimestamp"),
91
    SUCCESS_TIMESTAMP((short)18, "successTimestamp"),
93
    SUCCESS_TIMESTAMP((short)18, "successTimestamp"),
92
    ERROR_TIMESTAMP((short)19, "errorTimestamp"),
94
    ERROR_TIMESTAMP((short)19, "errorTimestamp"),
93
    PROVISIONAL_CAPTURE_TIMESTAMP((short)20, "provisionalCaptureTimestamp");
95
    PROVISIONAL_CAPTURE_TIMESTAMP((short)20, "provisionalCaptureTimestamp"),
-
 
96
    IS_DIGITAL((short)21, "isDigital");
94
 
97
 
95
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
98
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
96
 
99
 
97
    static {
100
    static {
98
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
101
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 143... Line 146...
143
          return SUCCESS_TIMESTAMP;
146
          return SUCCESS_TIMESTAMP;
144
        case 19: // ERROR_TIMESTAMP
147
        case 19: // ERROR_TIMESTAMP
145
          return ERROR_TIMESTAMP;
148
          return ERROR_TIMESTAMP;
146
        case 20: // PROVISIONAL_CAPTURE_TIMESTAMP
149
        case 20: // PROVISIONAL_CAPTURE_TIMESTAMP
147
          return PROVISIONAL_CAPTURE_TIMESTAMP;
150
          return PROVISIONAL_CAPTURE_TIMESTAMP;
-
 
151
        case 21: // IS_DIGITAL
-
 
152
          return IS_DIGITAL;
148
        default:
153
        default:
149
          return null;
154
          return null;
150
      }
155
      }
151
    }
156
    }
152
 
157
 
Line 192... Line 197...
192
  private static final int __USERID_ISSET_ID = 4;
197
  private static final int __USERID_ISSET_ID = 4;
193
  private static final int __INITTIMESTAMP_ISSET_ID = 5;
198
  private static final int __INITTIMESTAMP_ISSET_ID = 5;
194
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 6;
199
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 6;
195
  private static final int __ERRORTIMESTAMP_ISSET_ID = 7;
200
  private static final int __ERRORTIMESTAMP_ISSET_ID = 7;
196
  private static final int __PROVISIONALCAPTURETIMESTAMP_ISSET_ID = 8;
201
  private static final int __PROVISIONALCAPTURETIMESTAMP_ISSET_ID = 8;
-
 
202
  private static final int __ISDIGITAL_ISSET_ID = 9;
197
  private BitSet __isset_bit_vector = new BitSet(9);
203
  private BitSet __isset_bit_vector = new BitSet(10);
198
 
204
 
199
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
205
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
200
  static {
206
  static {
201
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
207
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
202
    tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
208
    tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 238... Line 244...
238
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
244
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
239
    tmpMap.put(_Fields.ERROR_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("errorTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
245
    tmpMap.put(_Fields.ERROR_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("errorTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
240
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
246
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
241
    tmpMap.put(_Fields.PROVISIONAL_CAPTURE_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("provisionalCaptureTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
247
    tmpMap.put(_Fields.PROVISIONAL_CAPTURE_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("provisionalCaptureTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
242
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
248
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
249
    tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
250
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
243
    metaDataMap = Collections.unmodifiableMap(tmpMap);
251
    metaDataMap = Collections.unmodifiableMap(tmpMap);
244
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
252
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
245
  }
253
  }
246
 
254
 
247
  public Payment() {
255
  public Payment() {
Line 265... Line 273...
265
    String gatewayTxnDate,
273
    String gatewayTxnDate,
266
    List<Attribute> attributes,
274
    List<Attribute> attributes,
267
    long initTimestamp,
275
    long initTimestamp,
268
    long successTimestamp,
276
    long successTimestamp,
269
    long errorTimestamp,
277
    long errorTimestamp,
270
    long provisionalCaptureTimestamp)
278
    long provisionalCaptureTimestamp,
-
 
279
    boolean isDigital)
271
  {
280
  {
272
    this();
281
    this();
273
    this.paymentId = paymentId;
282
    this.paymentId = paymentId;
274
    setPaymentIdIsSet(true);
283
    setPaymentIdIsSet(true);
275
    this.gatewayId = gatewayId;
284
    this.gatewayId = gatewayId;
Line 297... Line 306...
297
    setSuccessTimestampIsSet(true);
306
    setSuccessTimestampIsSet(true);
298
    this.errorTimestamp = errorTimestamp;
307
    this.errorTimestamp = errorTimestamp;
299
    setErrorTimestampIsSet(true);
308
    setErrorTimestampIsSet(true);
300
    this.provisionalCaptureTimestamp = provisionalCaptureTimestamp;
309
    this.provisionalCaptureTimestamp = provisionalCaptureTimestamp;
301
    setProvisionalCaptureTimestampIsSet(true);
310
    setProvisionalCaptureTimestampIsSet(true);
-
 
311
    this.isDigital = isDigital;
-
 
312
    setIsDigitalIsSet(true);
302
  }
313
  }
303
 
314
 
304
  /**
315
  /**
305
   * Performs a deep copy on <i>other</i>.
316
   * Performs a deep copy on <i>other</i>.
306
   */
317
   */
Line 351... Line 362...
351
    }
362
    }
352
    this.initTimestamp = other.initTimestamp;
363
    this.initTimestamp = other.initTimestamp;
353
    this.successTimestamp = other.successTimestamp;
364
    this.successTimestamp = other.successTimestamp;
354
    this.errorTimestamp = other.errorTimestamp;
365
    this.errorTimestamp = other.errorTimestamp;
355
    this.provisionalCaptureTimestamp = other.provisionalCaptureTimestamp;
366
    this.provisionalCaptureTimestamp = other.provisionalCaptureTimestamp;
-
 
367
    this.isDigital = other.isDigital;
356
  }
368
  }
357
 
369
 
358
  public Payment deepCopy() {
370
  public Payment deepCopy() {
359
    return new Payment(this);
371
    return new Payment(this);
360
  }
372
  }
Line 388... Line 400...
388
    this.successTimestamp = 0;
400
    this.successTimestamp = 0;
389
    setErrorTimestampIsSet(false);
401
    setErrorTimestampIsSet(false);
390
    this.errorTimestamp = 0;
402
    this.errorTimestamp = 0;
391
    setProvisionalCaptureTimestampIsSet(false);
403
    setProvisionalCaptureTimestampIsSet(false);
392
    this.provisionalCaptureTimestamp = 0;
404
    this.provisionalCaptureTimestamp = 0;
-
 
405
    setIsDigitalIsSet(false);
-
 
406
    this.isDigital = false;
393
  }
407
  }
394
 
408
 
395
  public long getPaymentId() {
409
  public long getPaymentId() {
396
    return this.paymentId;
410
    return this.paymentId;
397
  }
411
  }
Line 864... Line 878...
864
 
878
 
865
  public void setProvisionalCaptureTimestampIsSet(boolean value) {
879
  public void setProvisionalCaptureTimestampIsSet(boolean value) {
866
    __isset_bit_vector.set(__PROVISIONALCAPTURETIMESTAMP_ISSET_ID, value);
880
    __isset_bit_vector.set(__PROVISIONALCAPTURETIMESTAMP_ISSET_ID, value);
867
  }
881
  }
868
 
882
 
-
 
883
  public boolean isIsDigital() {
-
 
884
    return this.isDigital;
-
 
885
  }
-
 
886
 
-
 
887
  public void setIsDigital(boolean isDigital) {
-
 
888
    this.isDigital = isDigital;
-
 
889
    setIsDigitalIsSet(true);
-
 
890
  }
-
 
891
 
-
 
892
  public void unsetIsDigital() {
-
 
893
    __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
-
 
894
  }
-
 
895
 
-
 
896
  /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
-
 
897
  public boolean isSetIsDigital() {
-
 
898
    return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
-
 
899
  }
-
 
900
 
-
 
901
  public void setIsDigitalIsSet(boolean value) {
-
 
902
    __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
-
 
903
  }
-
 
904
 
869
  public void setFieldValue(_Fields field, Object value) {
905
  public void setFieldValue(_Fields field, Object value) {
870
    switch (field) {
906
    switch (field) {
871
    case PAYMENT_ID:
907
    case PAYMENT_ID:
872
      if (value == null) {
908
      if (value == null) {
873
        unsetPaymentId();
909
        unsetPaymentId();
Line 1026... Line 1062...
1026
      } else {
1062
      } else {
1027
        setProvisionalCaptureTimestamp((Long)value);
1063
        setProvisionalCaptureTimestamp((Long)value);
1028
      }
1064
      }
1029
      break;
1065
      break;
1030
 
1066
 
-
 
1067
    case IS_DIGITAL:
-
 
1068
      if (value == null) {
-
 
1069
        unsetIsDigital();
-
 
1070
      } else {
-
 
1071
        setIsDigital((Boolean)value);
-
 
1072
      }
-
 
1073
      break;
-
 
1074
 
1031
    }
1075
    }
1032
  }
1076
  }
1033
 
1077
 
1034
  public Object getFieldValue(_Fields field) {
1078
  public Object getFieldValue(_Fields field) {
1035
    switch (field) {
1079
    switch (field) {
Line 1091... Line 1135...
1091
      return Long.valueOf(getErrorTimestamp());
1135
      return Long.valueOf(getErrorTimestamp());
1092
 
1136
 
1093
    case PROVISIONAL_CAPTURE_TIMESTAMP:
1137
    case PROVISIONAL_CAPTURE_TIMESTAMP:
1094
      return Long.valueOf(getProvisionalCaptureTimestamp());
1138
      return Long.valueOf(getProvisionalCaptureTimestamp());
1095
 
1139
 
-
 
1140
    case IS_DIGITAL:
-
 
1141
      return Boolean.valueOf(isIsDigital());
-
 
1142
 
1096
    }
1143
    }
1097
    throw new IllegalStateException();
1144
    throw new IllegalStateException();
1098
  }
1145
  }
1099
 
1146
 
1100
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1147
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1142... Line 1189...
1142
      return isSetSuccessTimestamp();
1189
      return isSetSuccessTimestamp();
1143
    case ERROR_TIMESTAMP:
1190
    case ERROR_TIMESTAMP:
1144
      return isSetErrorTimestamp();
1191
      return isSetErrorTimestamp();
1145
    case PROVISIONAL_CAPTURE_TIMESTAMP:
1192
    case PROVISIONAL_CAPTURE_TIMESTAMP:
1146
      return isSetProvisionalCaptureTimestamp();
1193
      return isSetProvisionalCaptureTimestamp();
-
 
1194
    case IS_DIGITAL:
-
 
1195
      return isSetIsDigital();
1147
    }
1196
    }
1148
    throw new IllegalStateException();
1197
    throw new IllegalStateException();
1149
  }
1198
  }
1150
 
1199
 
1151
  @Override
1200
  @Override
Line 1339... Line 1388...
1339
        return false;
1388
        return false;
1340
      if (this.provisionalCaptureTimestamp != that.provisionalCaptureTimestamp)
1389
      if (this.provisionalCaptureTimestamp != that.provisionalCaptureTimestamp)
1341
        return false;
1390
        return false;
1342
    }
1391
    }
1343
 
1392
 
-
 
1393
    boolean this_present_isDigital = true;
-
 
1394
    boolean that_present_isDigital = true;
-
 
1395
    if (this_present_isDigital || that_present_isDigital) {
-
 
1396
      if (!(this_present_isDigital && that_present_isDigital))
-
 
1397
        return false;
-
 
1398
      if (this.isDigital != that.isDigital)
-
 
1399
        return false;
-
 
1400
    }
-
 
1401
 
1344
    return true;
1402
    return true;
1345
  }
1403
  }
1346
 
1404
 
1347
  @Override
1405
  @Override
1348
  public int hashCode() {
1406
  public int hashCode() {
Line 1555... Line 1613...
1555
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.provisionalCaptureTimestamp, typedOther.provisionalCaptureTimestamp);
1613
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.provisionalCaptureTimestamp, typedOther.provisionalCaptureTimestamp);
1556
      if (lastComparison != 0) {
1614
      if (lastComparison != 0) {
1557
        return lastComparison;
1615
        return lastComparison;
1558
      }
1616
      }
1559
    }
1617
    }
-
 
1618
    lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
-
 
1619
    if (lastComparison != 0) {
-
 
1620
      return lastComparison;
-
 
1621
    }
-
 
1622
    if (isSetIsDigital()) {
-
 
1623
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
-
 
1624
      if (lastComparison != 0) {
-
 
1625
        return lastComparison;
-
 
1626
      }
-
 
1627
    }
1560
    return 0;
1628
    return 0;
1561
  }
1629
  }
1562
 
1630
 
1563
  public _Fields fieldForId(int fieldId) {
1631
  public _Fields fieldForId(int fieldId) {
1564
    return _Fields.findByThriftId(fieldId);
1632
    return _Fields.findByThriftId(fieldId);
Line 1732... Line 1800...
1732
            setProvisionalCaptureTimestampIsSet(true);
1800
            setProvisionalCaptureTimestampIsSet(true);
1733
          } else { 
1801
          } else { 
1734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1802
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1735
          }
1803
          }
1736
          break;
1804
          break;
-
 
1805
        case 21: // IS_DIGITAL
-
 
1806
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
-
 
1807
            this.isDigital = iprot.readBool();
-
 
1808
            setIsDigitalIsSet(true);
-
 
1809
          } else { 
-
 
1810
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1811
          }
-
 
1812
          break;
1737
        default:
1813
        default:
1738
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1814
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1739
      }
1815
      }
1740
      iprot.readFieldEnd();
1816
      iprot.readFieldEnd();
1741
    }
1817
    }
Line 1834... Line 1910...
1834
    oprot.writeI64(this.errorTimestamp);
1910
    oprot.writeI64(this.errorTimestamp);
1835
    oprot.writeFieldEnd();
1911
    oprot.writeFieldEnd();
1836
    oprot.writeFieldBegin(PROVISIONAL_CAPTURE_TIMESTAMP_FIELD_DESC);
1912
    oprot.writeFieldBegin(PROVISIONAL_CAPTURE_TIMESTAMP_FIELD_DESC);
1837
    oprot.writeI64(this.provisionalCaptureTimestamp);
1913
    oprot.writeI64(this.provisionalCaptureTimestamp);
1838
    oprot.writeFieldEnd();
1914
    oprot.writeFieldEnd();
-
 
1915
    oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
-
 
1916
    oprot.writeBool(this.isDigital);
-
 
1917
    oprot.writeFieldEnd();
1839
    oprot.writeFieldStop();
1918
    oprot.writeFieldStop();
1840
    oprot.writeStructEnd();
1919
    oprot.writeStructEnd();
1841
  }
1920
  }
1842
 
1921
 
1843
  @Override
1922
  @Override
Line 1966... Line 2045...
1966
    first = false;
2045
    first = false;
1967
    if (!first) sb.append(", ");
2046
    if (!first) sb.append(", ");
1968
    sb.append("provisionalCaptureTimestamp:");
2047
    sb.append("provisionalCaptureTimestamp:");
1969
    sb.append(this.provisionalCaptureTimestamp);
2048
    sb.append(this.provisionalCaptureTimestamp);
1970
    first = false;
2049
    first = false;
-
 
2050
    if (!first) sb.append(", ");
-
 
2051
    sb.append("isDigital:");
-
 
2052
    sb.append(this.isDigital);
-
 
2053
    first = false;
1971
    sb.append(")");
2054
    sb.append(")");
1972
    return sb.toString();
2055
    return sb.toString();
1973
  }
2056
  }
1974
 
2057
 
1975
  public void validate() throws org.apache.thrift.TException {
2058
  public void validate() throws org.apache.thrift.TException {