Subversion Repositories SmartDukaan

Rev

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

Rev 3430 Rev 4421
Line 40... Line 40...
40
  private static final org.apache.thrift.protocol.TField GATEWAY_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayTxnDate", org.apache.thrift.protocol.TType.STRING, (short)15);
40
  private static final org.apache.thrift.protocol.TField GATEWAY_TXN_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayTxnDate", org.apache.thrift.protocol.TType.STRING, (short)15);
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
 
46
 
46
  private long paymentId; // required
47
  private long paymentId; // required
47
  private long gatewayId; // required
48
  private long gatewayId; // required
48
  private String gatewayPaymentId; // required
49
  private String gatewayPaymentId; // required
49
  private long merchantTxnId; // required
50
  private long merchantTxnId; // required
Line 60... Line 61...
60
  private String gatewayTxnDate; // required
61
  private String gatewayTxnDate; // required
61
  private List<Attribute> attributes; // required
62
  private List<Attribute> attributes; // required
62
  private long initTimestamp; // required
63
  private long initTimestamp; // required
63
  private long successTimestamp; // required
64
  private long successTimestamp; // required
64
  private long errorTimestamp; // required
65
  private long errorTimestamp; // required
-
 
66
  private long provisionalCaptureTimestamp; // required
65
 
67
 
66
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
68
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
67
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
69
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
68
    PAYMENT_ID((short)1, "paymentId"),
70
    PAYMENT_ID((short)1, "paymentId"),
69
    GATEWAY_ID((short)2, "gatewayId"),
71
    GATEWAY_ID((short)2, "gatewayId"),
Line 85... Line 87...
85
    SESSION_ID((short)14, "sessionId"),
87
    SESSION_ID((short)14, "sessionId"),
86
    GATEWAY_TXN_DATE((short)15, "gatewayTxnDate"),
88
    GATEWAY_TXN_DATE((short)15, "gatewayTxnDate"),
87
    ATTRIBUTES((short)16, "attributes"),
89
    ATTRIBUTES((short)16, "attributes"),
88
    INIT_TIMESTAMP((short)17, "initTimestamp"),
90
    INIT_TIMESTAMP((short)17, "initTimestamp"),
89
    SUCCESS_TIMESTAMP((short)18, "successTimestamp"),
91
    SUCCESS_TIMESTAMP((short)18, "successTimestamp"),
90
    ERROR_TIMESTAMP((short)19, "errorTimestamp");
92
    ERROR_TIMESTAMP((short)19, "errorTimestamp"),
-
 
93
    PROVISIONAL_CAPTURE_TIMESTAMP((short)20, "provisionalCaptureTimestamp");
91
 
94
 
92
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
95
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
93
 
96
 
94
    static {
97
    static {
95
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
98
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 138... Line 141...
138
          return INIT_TIMESTAMP;
141
          return INIT_TIMESTAMP;
139
        case 18: // SUCCESS_TIMESTAMP
142
        case 18: // SUCCESS_TIMESTAMP
140
          return SUCCESS_TIMESTAMP;
143
          return SUCCESS_TIMESTAMP;
141
        case 19: // ERROR_TIMESTAMP
144
        case 19: // ERROR_TIMESTAMP
142
          return ERROR_TIMESTAMP;
145
          return ERROR_TIMESTAMP;
-
 
146
        case 20: // PROVISIONAL_CAPTURE_TIMESTAMP
-
 
147
          return PROVISIONAL_CAPTURE_TIMESTAMP;
143
        default:
148
        default:
144
          return null;
149
          return null;
145
      }
150
      }
146
    }
151
    }
147
 
152
 
Line 186... Line 191...
186
  private static final int __AMOUNT_ISSET_ID = 3;
191
  private static final int __AMOUNT_ISSET_ID = 3;
187
  private static final int __USERID_ISSET_ID = 4;
192
  private static final int __USERID_ISSET_ID = 4;
188
  private static final int __INITTIMESTAMP_ISSET_ID = 5;
193
  private static final int __INITTIMESTAMP_ISSET_ID = 5;
189
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 6;
194
  private static final int __SUCCESSTIMESTAMP_ISSET_ID = 6;
190
  private static final int __ERRORTIMESTAMP_ISSET_ID = 7;
195
  private static final int __ERRORTIMESTAMP_ISSET_ID = 7;
-
 
196
  private static final int __PROVISIONALCAPTURETIMESTAMP_ISSET_ID = 8;
191
  private BitSet __isset_bit_vector = new BitSet(8);
197
  private BitSet __isset_bit_vector = new BitSet(9);
192
 
198
 
193
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
199
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
194
  static {
200
  static {
195
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
201
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
196
    tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
202
    tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 230... Line 236...
230
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
236
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
231
    tmpMap.put(_Fields.SUCCESS_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("successTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
237
    tmpMap.put(_Fields.SUCCESS_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("successTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
232
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
238
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
233
    tmpMap.put(_Fields.ERROR_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("errorTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
239
    tmpMap.put(_Fields.ERROR_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("errorTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
234
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
240
        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, 
-
 
242
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
235
    metaDataMap = Collections.unmodifiableMap(tmpMap);
243
    metaDataMap = Collections.unmodifiableMap(tmpMap);
236
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
244
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Payment.class, metaDataMap);
237
  }
245
  }
238
 
246
 
239
  public Payment() {
247
  public Payment() {
Line 256... Line 264...
256
    String sessionId,
264
    String sessionId,
257
    String gatewayTxnDate,
265
    String gatewayTxnDate,
258
    List<Attribute> attributes,
266
    List<Attribute> attributes,
259
    long initTimestamp,
267
    long initTimestamp,
260
    long successTimestamp,
268
    long successTimestamp,
261
    long errorTimestamp)
269
    long errorTimestamp,
-
 
270
    long provisionalCaptureTimestamp)
262
  {
271
  {
263
    this();
272
    this();
264
    this.paymentId = paymentId;
273
    this.paymentId = paymentId;
265
    setPaymentIdIsSet(true);
274
    setPaymentIdIsSet(true);
266
    this.gatewayId = gatewayId;
275
    this.gatewayId = gatewayId;
Line 286... Line 295...
286
    setInitTimestampIsSet(true);
295
    setInitTimestampIsSet(true);
287
    this.successTimestamp = successTimestamp;
296
    this.successTimestamp = successTimestamp;
288
    setSuccessTimestampIsSet(true);
297
    setSuccessTimestampIsSet(true);
289
    this.errorTimestamp = errorTimestamp;
298
    this.errorTimestamp = errorTimestamp;
290
    setErrorTimestampIsSet(true);
299
    setErrorTimestampIsSet(true);
-
 
300
    this.provisionalCaptureTimestamp = provisionalCaptureTimestamp;
-
 
301
    setProvisionalCaptureTimestampIsSet(true);
291
  }
302
  }
292
 
303
 
293
  /**
304
  /**
294
   * Performs a deep copy on <i>other</i>.
305
   * Performs a deep copy on <i>other</i>.
295
   */
306
   */
Line 339... Line 350...
339
      this.attributes = __this__attributes;
350
      this.attributes = __this__attributes;
340
    }
351
    }
341
    this.initTimestamp = other.initTimestamp;
352
    this.initTimestamp = other.initTimestamp;
342
    this.successTimestamp = other.successTimestamp;
353
    this.successTimestamp = other.successTimestamp;
343
    this.errorTimestamp = other.errorTimestamp;
354
    this.errorTimestamp = other.errorTimestamp;
-
 
355
    this.provisionalCaptureTimestamp = other.provisionalCaptureTimestamp;
344
  }
356
  }
345
 
357
 
346
  public Payment deepCopy() {
358
  public Payment deepCopy() {
347
    return new Payment(this);
359
    return new Payment(this);
348
  }
360
  }
Line 374... Line 386...
374
    this.initTimestamp = 0;
386
    this.initTimestamp = 0;
375
    setSuccessTimestampIsSet(false);
387
    setSuccessTimestampIsSet(false);
376
    this.successTimestamp = 0;
388
    this.successTimestamp = 0;
377
    setErrorTimestampIsSet(false);
389
    setErrorTimestampIsSet(false);
378
    this.errorTimestamp = 0;
390
    this.errorTimestamp = 0;
-
 
391
    setProvisionalCaptureTimestampIsSet(false);
-
 
392
    this.provisionalCaptureTimestamp = 0;
379
  }
393
  }
380
 
394
 
381
  public long getPaymentId() {
395
  public long getPaymentId() {
382
    return this.paymentId;
396
    return this.paymentId;
383
  }
397
  }
Line 828... Line 842...
828
 
842
 
829
  public void setErrorTimestampIsSet(boolean value) {
843
  public void setErrorTimestampIsSet(boolean value) {
830
    __isset_bit_vector.set(__ERRORTIMESTAMP_ISSET_ID, value);
844
    __isset_bit_vector.set(__ERRORTIMESTAMP_ISSET_ID, value);
831
  }
845
  }
832
 
846
 
-
 
847
  public long getProvisionalCaptureTimestamp() {
-
 
848
    return this.provisionalCaptureTimestamp;
-
 
849
  }
-
 
850
 
-
 
851
  public void setProvisionalCaptureTimestamp(long provisionalCaptureTimestamp) {
-
 
852
    this.provisionalCaptureTimestamp = provisionalCaptureTimestamp;
-
 
853
    setProvisionalCaptureTimestampIsSet(true);
-
 
854
  }
-
 
855
 
-
 
856
  public void unsetProvisionalCaptureTimestamp() {
-
 
857
    __isset_bit_vector.clear(__PROVISIONALCAPTURETIMESTAMP_ISSET_ID);
-
 
858
  }
-
 
859
 
-
 
860
  /** Returns true if field provisionalCaptureTimestamp is set (has been assigned a value) and false otherwise */
-
 
861
  public boolean isSetProvisionalCaptureTimestamp() {
-
 
862
    return __isset_bit_vector.get(__PROVISIONALCAPTURETIMESTAMP_ISSET_ID);
-
 
863
  }
-
 
864
 
-
 
865
  public void setProvisionalCaptureTimestampIsSet(boolean value) {
-
 
866
    __isset_bit_vector.set(__PROVISIONALCAPTURETIMESTAMP_ISSET_ID, value);
-
 
867
  }
-
 
868
 
833
  public void setFieldValue(_Fields field, Object value) {
869
  public void setFieldValue(_Fields field, Object value) {
834
    switch (field) {
870
    switch (field) {
835
    case PAYMENT_ID:
871
    case PAYMENT_ID:
836
      if (value == null) {
872
      if (value == null) {
837
        unsetPaymentId();
873
        unsetPaymentId();
Line 982... Line 1018...
982
      } else {
1018
      } else {
983
        setErrorTimestamp((Long)value);
1019
        setErrorTimestamp((Long)value);
984
      }
1020
      }
985
      break;
1021
      break;
986
 
1022
 
-
 
1023
    case PROVISIONAL_CAPTURE_TIMESTAMP:
-
 
1024
      if (value == null) {
-
 
1025
        unsetProvisionalCaptureTimestamp();
-
 
1026
      } else {
-
 
1027
        setProvisionalCaptureTimestamp((Long)value);
-
 
1028
      }
-
 
1029
      break;
-
 
1030
 
987
    }
1031
    }
988
  }
1032
  }
989
 
1033
 
990
  public Object getFieldValue(_Fields field) {
1034
  public Object getFieldValue(_Fields field) {
991
    switch (field) {
1035
    switch (field) {
Line 1044... Line 1088...
1044
      return Long.valueOf(getSuccessTimestamp());
1088
      return Long.valueOf(getSuccessTimestamp());
1045
 
1089
 
1046
    case ERROR_TIMESTAMP:
1090
    case ERROR_TIMESTAMP:
1047
      return Long.valueOf(getErrorTimestamp());
1091
      return Long.valueOf(getErrorTimestamp());
1048
 
1092
 
-
 
1093
    case PROVISIONAL_CAPTURE_TIMESTAMP:
-
 
1094
      return Long.valueOf(getProvisionalCaptureTimestamp());
-
 
1095
 
1049
    }
1096
    }
1050
    throw new IllegalStateException();
1097
    throw new IllegalStateException();
1051
  }
1098
  }
1052
 
1099
 
1053
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1100
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 1093... Line 1140...
1093
      return isSetInitTimestamp();
1140
      return isSetInitTimestamp();
1094
    case SUCCESS_TIMESTAMP:
1141
    case SUCCESS_TIMESTAMP:
1095
      return isSetSuccessTimestamp();
1142
      return isSetSuccessTimestamp();
1096
    case ERROR_TIMESTAMP:
1143
    case ERROR_TIMESTAMP:
1097
      return isSetErrorTimestamp();
1144
      return isSetErrorTimestamp();
-
 
1145
    case PROVISIONAL_CAPTURE_TIMESTAMP:
-
 
1146
      return isSetProvisionalCaptureTimestamp();
1098
    }
1147
    }
1099
    throw new IllegalStateException();
1148
    throw new IllegalStateException();
1100
  }
1149
  }
1101
 
1150
 
1102
  @Override
1151
  @Override
Line 1281... Line 1330...
1281
        return false;
1330
        return false;
1282
      if (this.errorTimestamp != that.errorTimestamp)
1331
      if (this.errorTimestamp != that.errorTimestamp)
1283
        return false;
1332
        return false;
1284
    }
1333
    }
1285
 
1334
 
-
 
1335
    boolean this_present_provisionalCaptureTimestamp = true;
-
 
1336
    boolean that_present_provisionalCaptureTimestamp = true;
-
 
1337
    if (this_present_provisionalCaptureTimestamp || that_present_provisionalCaptureTimestamp) {
-
 
1338
      if (!(this_present_provisionalCaptureTimestamp && that_present_provisionalCaptureTimestamp))
-
 
1339
        return false;
-
 
1340
      if (this.provisionalCaptureTimestamp != that.provisionalCaptureTimestamp)
-
 
1341
        return false;
-
 
1342
    }
-
 
1343
 
1286
    return true;
1344
    return true;
1287
  }
1345
  }
1288
 
1346
 
1289
  @Override
1347
  @Override
1290
  public int hashCode() {
1348
  public int hashCode() {
Line 1487... Line 1545...
1487
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorTimestamp, typedOther.errorTimestamp);
1545
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorTimestamp, typedOther.errorTimestamp);
1488
      if (lastComparison != 0) {
1546
      if (lastComparison != 0) {
1489
        return lastComparison;
1547
        return lastComparison;
1490
      }
1548
      }
1491
    }
1549
    }
-
 
1550
    lastComparison = Boolean.valueOf(isSetProvisionalCaptureTimestamp()).compareTo(typedOther.isSetProvisionalCaptureTimestamp());
-
 
1551
    if (lastComparison != 0) {
-
 
1552
      return lastComparison;
-
 
1553
    }
-
 
1554
    if (isSetProvisionalCaptureTimestamp()) {
-
 
1555
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.provisionalCaptureTimestamp, typedOther.provisionalCaptureTimestamp);
-
 
1556
      if (lastComparison != 0) {
-
 
1557
        return lastComparison;
-
 
1558
      }
-
 
1559
    }
1492
    return 0;
1560
    return 0;
1493
  }
1561
  }
1494
 
1562
 
1495
  public _Fields fieldForId(int fieldId) {
1563
  public _Fields fieldForId(int fieldId) {
1496
    return _Fields.findByThriftId(fieldId);
1564
    return _Fields.findByThriftId(fieldId);
Line 1656... Line 1724...
1656
            setErrorTimestampIsSet(true);
1724
            setErrorTimestampIsSet(true);
1657
          } else { 
1725
          } else { 
1658
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1726
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1659
          }
1727
          }
1660
          break;
1728
          break;
-
 
1729
        case 20: // PROVISIONAL_CAPTURE_TIMESTAMP
-
 
1730
          if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
1731
            this.provisionalCaptureTimestamp = iprot.readI64();
-
 
1732
            setProvisionalCaptureTimestampIsSet(true);
-
 
1733
          } else { 
-
 
1734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1735
          }
-
 
1736
          break;
1661
        default:
1737
        default:
1662
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1738
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1663
      }
1739
      }
1664
      iprot.readFieldEnd();
1740
      iprot.readFieldEnd();
1665
    }
1741
    }
Line 1755... Line 1831...
1755
    oprot.writeI64(this.successTimestamp);
1831
    oprot.writeI64(this.successTimestamp);
1756
    oprot.writeFieldEnd();
1832
    oprot.writeFieldEnd();
1757
    oprot.writeFieldBegin(ERROR_TIMESTAMP_FIELD_DESC);
1833
    oprot.writeFieldBegin(ERROR_TIMESTAMP_FIELD_DESC);
1758
    oprot.writeI64(this.errorTimestamp);
1834
    oprot.writeI64(this.errorTimestamp);
1759
    oprot.writeFieldEnd();
1835
    oprot.writeFieldEnd();
-
 
1836
    oprot.writeFieldBegin(PROVISIONAL_CAPTURE_TIMESTAMP_FIELD_DESC);
-
 
1837
    oprot.writeI64(this.provisionalCaptureTimestamp);
-
 
1838
    oprot.writeFieldEnd();
1760
    oprot.writeFieldStop();
1839
    oprot.writeFieldStop();
1761
    oprot.writeStructEnd();
1840
    oprot.writeStructEnd();
1762
  }
1841
  }
1763
 
1842
 
1764
  @Override
1843
  @Override
Line 1883... Line 1962...
1883
    first = false;
1962
    first = false;
1884
    if (!first) sb.append(", ");
1963
    if (!first) sb.append(", ");
1885
    sb.append("errorTimestamp:");
1964
    sb.append("errorTimestamp:");
1886
    sb.append(this.errorTimestamp);
1965
    sb.append(this.errorTimestamp);
1887
    first = false;
1966
    first = false;
-
 
1967
    if (!first) sb.append(", ");
-
 
1968
    sb.append("provisionalCaptureTimestamp:");
-
 
1969
    sb.append(this.provisionalCaptureTimestamp);
-
 
1970
    first = false;
1888
    sb.append(")");
1971
    sb.append(")");
1889
    return sb.toString();
1972
    return sb.toString();
1890
  }
1973
  }
1891
 
1974
 
1892
  public void validate() throws org.apache.thrift.TException {
1975
  public void validate() throws org.apache.thrift.TException {