Subversion Repositories SmartDukaan

Rev

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

Rev 18634 Rev 18769
Line 32... Line 32...
32
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)7);
32
  private static final org.apache.thrift.protocol.TField CREATED_FIELD_DESC = new org.apache.thrift.protocol.TField("created", org.apache.thrift.protocol.TType.I64, (short)7);
33
  private static final org.apache.thrift.protocol.TField UPDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("updated", org.apache.thrift.protocol.TType.I64, (short)8);
33
  private static final org.apache.thrift.protocol.TField UPDATED_FIELD_DESC = new org.apache.thrift.protocol.TField("updated", org.apache.thrift.protocol.TType.I64, (short)8);
34
  private static final org.apache.thrift.protocol.TField LOAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("loan_id", org.apache.thrift.protocol.TType.STRING, (short)9);
34
  private static final org.apache.thrift.protocol.TField LOAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("loan_id", org.apache.thrift.protocol.TType.STRING, (short)9);
35
  private static final org.apache.thrift.protocol.TField DUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("due_date", org.apache.thrift.protocol.TType.I64, (short)10);
35
  private static final org.apache.thrift.protocol.TField DUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("due_date", org.apache.thrift.protocol.TType.I64, (short)10);
36
  private static final org.apache.thrift.protocol.TField VALUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("value_date", org.apache.thrift.protocol.TType.I64, (short)11);
36
  private static final org.apache.thrift.protocol.TField VALUE_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("value_date", org.apache.thrift.protocol.TType.I64, (short)11);
-
 
37
  private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)12);
37
 
38
 
38
  private long id; // required
39
  private long id; // required
39
  private long user_id; // required
40
  private long user_id; // required
40
  private long creditor_id; // required
41
  private long creditor_id; // required
41
  private long payment_id; // required
42
  private long payment_id; // required
Line 44... Line 45...
44
  private long created; // required
45
  private long created; // required
45
  private long updated; // required
46
  private long updated; // required
46
  private String loan_id; // required
47
  private String loan_id; // required
47
  private long due_date; // required
48
  private long due_date; // required
48
  private long value_date; // required
49
  private long value_date; // required
-
 
50
  private String invoiceNumber; // required
49
 
51
 
50
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
52
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
51
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
53
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
52
    ID((short)1, "id"),
54
    ID((short)1, "id"),
53
    USER_ID((short)2, "user_id"),
55
    USER_ID((short)2, "user_id"),
Line 61... Line 63...
61
    CREDIT_TYPE((short)6, "credit_type"),
63
    CREDIT_TYPE((short)6, "credit_type"),
62
    CREATED((short)7, "created"),
64
    CREATED((short)7, "created"),
63
    UPDATED((short)8, "updated"),
65
    UPDATED((short)8, "updated"),
64
    LOAN_ID((short)9, "loan_id"),
66
    LOAN_ID((short)9, "loan_id"),
65
    DUE_DATE((short)10, "due_date"),
67
    DUE_DATE((short)10, "due_date"),
66
    VALUE_DATE((short)11, "value_date");
68
    VALUE_DATE((short)11, "value_date"),
-
 
69
    INVOICE_NUMBER((short)12, "invoiceNumber");
67
 
70
 
68
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
71
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
69
 
72
 
70
    static {
73
    static {
71
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
74
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 98... Line 101...
98
          return LOAN_ID;
101
          return LOAN_ID;
99
        case 10: // DUE_DATE
102
        case 10: // DUE_DATE
100
          return DUE_DATE;
103
          return DUE_DATE;
101
        case 11: // VALUE_DATE
104
        case 11: // VALUE_DATE
102
          return VALUE_DATE;
105
          return VALUE_DATE;
-
 
106
        case 12: // INVOICE_NUMBER
-
 
107
          return INVOICE_NUMBER;
103
        default:
108
        default:
104
          return null;
109
          return null;
105
      }
110
      }
106
    }
111
    }
107
 
112
 
Line 174... Line 179...
174
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
179
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
175
    tmpMap.put(_Fields.DUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("due_date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
180
    tmpMap.put(_Fields.DUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("due_date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
176
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
181
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
177
    tmpMap.put(_Fields.VALUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("value_date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
182
    tmpMap.put(_Fields.VALUE_DATE, new org.apache.thrift.meta_data.FieldMetaData("value_date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
178
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
183
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
184
    tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
185
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
179
    metaDataMap = Collections.unmodifiableMap(tmpMap);
186
    metaDataMap = Collections.unmodifiableMap(tmpMap);
180
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoanHistory.class, metaDataMap);
187
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LoanHistory.class, metaDataMap);
181
  }
188
  }
182
 
189
 
183
  public LoanHistory() {
190
  public LoanHistory() {
Line 192... Line 199...
192
    CreditTxnType credit_type,
199
    CreditTxnType credit_type,
193
    long created,
200
    long created,
194
    long updated,
201
    long updated,
195
    String loan_id,
202
    String loan_id,
196
    long due_date,
203
    long due_date,
197
    long value_date)
204
    long value_date,
-
 
205
    String invoiceNumber)
198
  {
206
  {
199
    this();
207
    this();
200
    this.id = id;
208
    this.id = id;
201
    setIdIsSet(true);
209
    setIdIsSet(true);
202
    this.user_id = user_id;
210
    this.user_id = user_id;
Line 215... Line 223...
215
    this.loan_id = loan_id;
223
    this.loan_id = loan_id;
216
    this.due_date = due_date;
224
    this.due_date = due_date;
217
    setDue_dateIsSet(true);
225
    setDue_dateIsSet(true);
218
    this.value_date = value_date;
226
    this.value_date = value_date;
219
    setValue_dateIsSet(true);
227
    setValue_dateIsSet(true);
-
 
228
    this.invoiceNumber = invoiceNumber;
220
  }
229
  }
221
 
230
 
222
  /**
231
  /**
223
   * Performs a deep copy on <i>other</i>.
232
   * Performs a deep copy on <i>other</i>.
224
   */
233
   */
Line 238... Line 247...
238
    if (other.isSetLoan_id()) {
247
    if (other.isSetLoan_id()) {
239
      this.loan_id = other.loan_id;
248
      this.loan_id = other.loan_id;
240
    }
249
    }
241
    this.due_date = other.due_date;
250
    this.due_date = other.due_date;
242
    this.value_date = other.value_date;
251
    this.value_date = other.value_date;
-
 
252
    if (other.isSetInvoiceNumber()) {
-
 
253
      this.invoiceNumber = other.invoiceNumber;
-
 
254
    }
243
  }
255
  }
244
 
256
 
245
  public LoanHistory deepCopy() {
257
  public LoanHistory deepCopy() {
246
    return new LoanHistory(this);
258
    return new LoanHistory(this);
247
  }
259
  }
Line 266... Line 278...
266
    this.loan_id = null;
278
    this.loan_id = null;
267
    setDue_dateIsSet(false);
279
    setDue_dateIsSet(false);
268
    this.due_date = 0;
280
    this.due_date = 0;
269
    setValue_dateIsSet(false);
281
    setValue_dateIsSet(false);
270
    this.value_date = 0;
282
    this.value_date = 0;
-
 
283
    this.invoiceNumber = null;
271
  }
284
  }
272
 
285
 
273
  public long getId() {
286
  public long getId() {
274
    return this.id;
287
    return this.id;
275
  }
288
  }
Line 520... Line 533...
520
 
533
 
521
  public void setValue_dateIsSet(boolean value) {
534
  public void setValue_dateIsSet(boolean value) {
522
    __isset_bit_vector.set(__VALUE_DATE_ISSET_ID, value);
535
    __isset_bit_vector.set(__VALUE_DATE_ISSET_ID, value);
523
  }
536
  }
524
 
537
 
-
 
538
  public String getInvoiceNumber() {
-
 
539
    return this.invoiceNumber;
-
 
540
  }
-
 
541
 
-
 
542
  public void setInvoiceNumber(String invoiceNumber) {
-
 
543
    this.invoiceNumber = invoiceNumber;
-
 
544
  }
-
 
545
 
-
 
546
  public void unsetInvoiceNumber() {
-
 
547
    this.invoiceNumber = null;
-
 
548
  }
-
 
549
 
-
 
550
  /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
-
 
551
  public boolean isSetInvoiceNumber() {
-
 
552
    return this.invoiceNumber != null;
-
 
553
  }
-
 
554
 
-
 
555
  public void setInvoiceNumberIsSet(boolean value) {
-
 
556
    if (!value) {
-
 
557
      this.invoiceNumber = null;
-
 
558
    }
-
 
559
  }
-
 
560
 
525
  public void setFieldValue(_Fields field, Object value) {
561
  public void setFieldValue(_Fields field, Object value) {
526
    switch (field) {
562
    switch (field) {
527
    case ID:
563
    case ID:
528
      if (value == null) {
564
      if (value == null) {
529
        unsetId();
565
        unsetId();
Line 610... Line 646...
610
      } else {
646
      } else {
611
        setValue_date((Long)value);
647
        setValue_date((Long)value);
612
      }
648
      }
613
      break;
649
      break;
614
 
650
 
-
 
651
    case INVOICE_NUMBER:
-
 
652
      if (value == null) {
-
 
653
        unsetInvoiceNumber();
-
 
654
      } else {
-
 
655
        setInvoiceNumber((String)value);
-
 
656
      }
-
 
657
      break;
-
 
658
 
615
    }
659
    }
616
  }
660
  }
617
 
661
 
618
  public Object getFieldValue(_Fields field) {
662
  public Object getFieldValue(_Fields field) {
619
    switch (field) {
663
    switch (field) {
Line 648... Line 692...
648
      return Long.valueOf(getDue_date());
692
      return Long.valueOf(getDue_date());
649
 
693
 
650
    case VALUE_DATE:
694
    case VALUE_DATE:
651
      return Long.valueOf(getValue_date());
695
      return Long.valueOf(getValue_date());
652
 
696
 
-
 
697
    case INVOICE_NUMBER:
-
 
698
      return getInvoiceNumber();
-
 
699
 
653
    }
700
    }
654
    throw new IllegalStateException();
701
    throw new IllegalStateException();
655
  }
702
  }
656
 
703
 
657
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
704
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 681... Line 728...
681
      return isSetLoan_id();
728
      return isSetLoan_id();
682
    case DUE_DATE:
729
    case DUE_DATE:
683
      return isSetDue_date();
730
      return isSetDue_date();
684
    case VALUE_DATE:
731
    case VALUE_DATE:
685
      return isSetValue_date();
732
      return isSetValue_date();
-
 
733
    case INVOICE_NUMBER:
-
 
734
      return isSetInvoiceNumber();
686
    }
735
    }
687
    throw new IllegalStateException();
736
    throw new IllegalStateException();
688
  }
737
  }
689
 
738
 
690
  @Override
739
  @Override
Line 797... Line 846...
797
        return false;
846
        return false;
798
      if (this.value_date != that.value_date)
847
      if (this.value_date != that.value_date)
799
        return false;
848
        return false;
800
    }
849
    }
801
 
850
 
-
 
851
    boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
-
 
852
    boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
-
 
853
    if (this_present_invoiceNumber || that_present_invoiceNumber) {
-
 
854
      if (!(this_present_invoiceNumber && that_present_invoiceNumber))
-
 
855
        return false;
-
 
856
      if (!this.invoiceNumber.equals(that.invoiceNumber))
-
 
857
        return false;
-
 
858
    }
-
 
859
 
802
    return true;
860
    return true;
803
  }
861
  }
804
 
862
 
805
  @Override
863
  @Override
806
  public int hashCode() {
864
  public int hashCode() {
Line 923... Line 981...
923
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value_date, typedOther.value_date);
981
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value_date, typedOther.value_date);
924
      if (lastComparison != 0) {
982
      if (lastComparison != 0) {
925
        return lastComparison;
983
        return lastComparison;
926
      }
984
      }
927
    }
985
    }
-
 
986
    lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
-
 
987
    if (lastComparison != 0) {
-
 
988
      return lastComparison;
-
 
989
    }
-
 
990
    if (isSetInvoiceNumber()) {
-
 
991
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
-
 
992
      if (lastComparison != 0) {
-
 
993
        return lastComparison;
-
 
994
      }
-
 
995
    }
928
    return 0;
996
    return 0;
929
  }
997
  }
930
 
998
 
931
  public _Fields fieldForId(int fieldId) {
999
  public _Fields fieldForId(int fieldId) {
932
    return _Fields.findByThriftId(fieldId);
1000
    return _Fields.findByThriftId(fieldId);
Line 1026... Line 1094...
1026
            setValue_dateIsSet(true);
1094
            setValue_dateIsSet(true);
1027
          } else { 
1095
          } else { 
1028
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1096
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1029
          }
1097
          }
1030
          break;
1098
          break;
-
 
1099
        case 12: // INVOICE_NUMBER
-
 
1100
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
1101
            this.invoiceNumber = iprot.readString();
-
 
1102
          } else { 
-
 
1103
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
1104
          }
-
 
1105
          break;
1031
        default:
1106
        default:
1032
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1107
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1033
      }
1108
      }
1034
      iprot.readFieldEnd();
1109
      iprot.readFieldEnd();
1035
    }
1110
    }
Line 1076... Line 1151...
1076
    oprot.writeI64(this.due_date);
1151
    oprot.writeI64(this.due_date);
1077
    oprot.writeFieldEnd();
1152
    oprot.writeFieldEnd();
1078
    oprot.writeFieldBegin(VALUE_DATE_FIELD_DESC);
1153
    oprot.writeFieldBegin(VALUE_DATE_FIELD_DESC);
1079
    oprot.writeI64(this.value_date);
1154
    oprot.writeI64(this.value_date);
1080
    oprot.writeFieldEnd();
1155
    oprot.writeFieldEnd();
-
 
1156
    if (this.invoiceNumber != null) {
-
 
1157
      oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
-
 
1158
      oprot.writeString(this.invoiceNumber);
-
 
1159
      oprot.writeFieldEnd();
-
 
1160
    }
1081
    oprot.writeFieldStop();
1161
    oprot.writeFieldStop();
1082
    oprot.writeStructEnd();
1162
    oprot.writeStructEnd();
1083
  }
1163
  }
1084
 
1164
 
1085
  @Override
1165
  @Override
Line 1136... Line 1216...
1136
    first = false;
1216
    first = false;
1137
    if (!first) sb.append(", ");
1217
    if (!first) sb.append(", ");
1138
    sb.append("value_date:");
1218
    sb.append("value_date:");
1139
    sb.append(this.value_date);
1219
    sb.append(this.value_date);
1140
    first = false;
1220
    first = false;
-
 
1221
    if (!first) sb.append(", ");
-
 
1222
    sb.append("invoiceNumber:");
-
 
1223
    if (this.invoiceNumber == null) {
-
 
1224
      sb.append("null");
-
 
1225
    } else {
-
 
1226
      sb.append(this.invoiceNumber);
-
 
1227
    }
-
 
1228
    first = false;
1141
    sb.append(")");
1229
    sb.append(")");
1142
    return sb.toString();
1230
    return sb.toString();
1143
  }
1231
  }
1144
 
1232
 
1145
  public void validate() throws org.apache.thrift.TException {
1233
  public void validate() throws org.apache.thrift.TException {