Subversion Repositories SmartDukaan

Rev

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

Rev 6410 Rev 8942
Line 30... Line 30...
30
  private static final org.apache.thrift.protocol.TField BANK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("bankName", org.apache.thrift.protocol.TType.STRING, (short)5);
30
  private static final org.apache.thrift.protocol.TField BANK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("bankName", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  private static final org.apache.thrift.protocol.TField MIN_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("minAmount", org.apache.thrift.protocol.TType.I64, (short)6);
31
  private static final org.apache.thrift.protocol.TField MIN_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("minAmount", org.apache.thrift.protocol.TType.I64, (short)6);
32
  private static final org.apache.thrift.protocol.TField TENURE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("tenureDescription", org.apache.thrift.protocol.TType.STRING, (short)7);
32
  private static final org.apache.thrift.protocol.TField TENURE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("tenureDescription", org.apache.thrift.protocol.TType.STRING, (short)7);
33
  private static final org.apache.thrift.protocol.TField CHARGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("chargeType", org.apache.thrift.protocol.TType.I32, (short)8);
33
  private static final org.apache.thrift.protocol.TField CHARGE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("chargeType", org.apache.thrift.protocol.TType.I32, (short)8);
34
  private static final org.apache.thrift.protocol.TField CHARGE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("chargeValue", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
34
  private static final org.apache.thrift.protocol.TField CHARGE_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("chargeValue", org.apache.thrift.protocol.TType.DOUBLE, (short)9);
-
 
35
  private static final org.apache.thrift.protocol.TField INTEREST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("interestRate", org.apache.thrift.protocol.TType.DOUBLE, (short)10);
35
 
36
 
36
  private long id; // required
37
  private long id; // required
37
  private long gatewayId; // required
38
  private long gatewayId; // required
38
  private long bankId; // required
39
  private long bankId; // required
39
  private long tenure; // required
40
  private long tenure; // required
40
  private String bankName; // required
41
  private String bankName; // required
41
  private long minAmount; // required
42
  private long minAmount; // required
42
  private String tenureDescription; // required
43
  private String tenureDescription; // required
43
  private EmiChargeType chargeType; // required
44
  private EmiChargeType chargeType; // required
44
  private double chargeValue; // required
45
  private double chargeValue; // required
-
 
46
  private double interestRate; // required
45
 
47
 
46
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
48
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
47
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
49
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
48
    ID((short)1, "id"),
50
    ID((short)1, "id"),
49
    GATEWAY_ID((short)2, "gatewayId"),
51
    GATEWAY_ID((short)2, "gatewayId"),
Line 55... Line 57...
55
    /**
57
    /**
56
     * 
58
     * 
57
     * @see EmiChargeType
59
     * @see EmiChargeType
58
     */
60
     */
59
    CHARGE_TYPE((short)8, "chargeType"),
61
    CHARGE_TYPE((short)8, "chargeType"),
60
    CHARGE_VALUE((short)9, "chargeValue");
62
    CHARGE_VALUE((short)9, "chargeValue"),
-
 
63
    INTEREST_RATE((short)10, "interestRate");
61
 
64
 
62
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
65
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
63
 
66
 
64
    static {
67
    static {
65
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
68
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
Line 88... Line 91...
88
          return TENURE_DESCRIPTION;
91
          return TENURE_DESCRIPTION;
89
        case 8: // CHARGE_TYPE
92
        case 8: // CHARGE_TYPE
90
          return CHARGE_TYPE;
93
          return CHARGE_TYPE;
91
        case 9: // CHARGE_VALUE
94
        case 9: // CHARGE_VALUE
92
          return CHARGE_VALUE;
95
          return CHARGE_VALUE;
-
 
96
        case 10: // INTEREST_RATE
-
 
97
          return INTEREST_RATE;
93
        default:
98
        default:
94
          return null;
99
          return null;
95
      }
100
      }
96
    }
101
    }
97
 
102
 
Line 134... Line 139...
134
  private static final int __GATEWAYID_ISSET_ID = 1;
139
  private static final int __GATEWAYID_ISSET_ID = 1;
135
  private static final int __BANKID_ISSET_ID = 2;
140
  private static final int __BANKID_ISSET_ID = 2;
136
  private static final int __TENURE_ISSET_ID = 3;
141
  private static final int __TENURE_ISSET_ID = 3;
137
  private static final int __MINAMOUNT_ISSET_ID = 4;
142
  private static final int __MINAMOUNT_ISSET_ID = 4;
138
  private static final int __CHARGEVALUE_ISSET_ID = 5;
143
  private static final int __CHARGEVALUE_ISSET_ID = 5;
-
 
144
  private static final int __INTERESTRATE_ISSET_ID = 6;
139
  private BitSet __isset_bit_vector = new BitSet(6);
145
  private BitSet __isset_bit_vector = new BitSet(7);
140
 
146
 
141
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
147
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
142
  static {
148
  static {
143
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
149
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
144
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
150
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
Line 157... Line 163...
157
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
163
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
158
    tmpMap.put(_Fields.CHARGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("chargeType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
164
    tmpMap.put(_Fields.CHARGE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("chargeType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
159
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EmiChargeType.class)));
165
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EmiChargeType.class)));
160
    tmpMap.put(_Fields.CHARGE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("chargeValue", org.apache.thrift.TFieldRequirementType.DEFAULT, 
166
    tmpMap.put(_Fields.CHARGE_VALUE, new org.apache.thrift.meta_data.FieldMetaData("chargeValue", org.apache.thrift.TFieldRequirementType.DEFAULT, 
161
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
167
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
-
 
168
    tmpMap.put(_Fields.INTEREST_RATE, new org.apache.thrift.meta_data.FieldMetaData("interestRate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
169
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
162
    metaDataMap = Collections.unmodifiableMap(tmpMap);
170
    metaDataMap = Collections.unmodifiableMap(tmpMap);
163
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EmiScheme.class, metaDataMap);
171
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(EmiScheme.class, metaDataMap);
164
  }
172
  }
165
 
173
 
166
  public EmiScheme() {
174
  public EmiScheme() {
Line 173... Line 181...
173
    long tenure,
181
    long tenure,
174
    String bankName,
182
    String bankName,
175
    long minAmount,
183
    long minAmount,
176
    String tenureDescription,
184
    String tenureDescription,
177
    EmiChargeType chargeType,
185
    EmiChargeType chargeType,
178
    double chargeValue)
186
    double chargeValue,
-
 
187
    double interestRate)
179
  {
188
  {
180
    this();
189
    this();
181
    this.id = id;
190
    this.id = id;
182
    setIdIsSet(true);
191
    setIdIsSet(true);
183
    this.gatewayId = gatewayId;
192
    this.gatewayId = gatewayId;
Line 191... Line 200...
191
    setMinAmountIsSet(true);
200
    setMinAmountIsSet(true);
192
    this.tenureDescription = tenureDescription;
201
    this.tenureDescription = tenureDescription;
193
    this.chargeType = chargeType;
202
    this.chargeType = chargeType;
194
    this.chargeValue = chargeValue;
203
    this.chargeValue = chargeValue;
195
    setChargeValueIsSet(true);
204
    setChargeValueIsSet(true);
-
 
205
    this.interestRate = interestRate;
-
 
206
    setInterestRateIsSet(true);
196
  }
207
  }
197
 
208
 
198
  /**
209
  /**
199
   * Performs a deep copy on <i>other</i>.
210
   * Performs a deep copy on <i>other</i>.
200
   */
211
   */
Line 214... Line 225...
214
    }
225
    }
215
    if (other.isSetChargeType()) {
226
    if (other.isSetChargeType()) {
216
      this.chargeType = other.chargeType;
227
      this.chargeType = other.chargeType;
217
    }
228
    }
218
    this.chargeValue = other.chargeValue;
229
    this.chargeValue = other.chargeValue;
-
 
230
    this.interestRate = other.interestRate;
219
  }
231
  }
220
 
232
 
221
  public EmiScheme deepCopy() {
233
  public EmiScheme deepCopy() {
222
    return new EmiScheme(this);
234
    return new EmiScheme(this);
223
  }
235
  }
Line 237... Line 249...
237
    this.minAmount = 0;
249
    this.minAmount = 0;
238
    this.tenureDescription = null;
250
    this.tenureDescription = null;
239
    this.chargeType = null;
251
    this.chargeType = null;
240
    setChargeValueIsSet(false);
252
    setChargeValueIsSet(false);
241
    this.chargeValue = 0.0;
253
    this.chargeValue = 0.0;
-
 
254
    setInterestRateIsSet(false);
-
 
255
    this.interestRate = 0.0;
242
  }
256
  }
243
 
257
 
244
  public long getId() {
258
  public long getId() {
245
    return this.id;
259
    return this.id;
246
  }
260
  }
Line 448... Line 462...
448
 
462
 
449
  public void setChargeValueIsSet(boolean value) {
463
  public void setChargeValueIsSet(boolean value) {
450
    __isset_bit_vector.set(__CHARGEVALUE_ISSET_ID, value);
464
    __isset_bit_vector.set(__CHARGEVALUE_ISSET_ID, value);
451
  }
465
  }
452
 
466
 
-
 
467
  public double getInterestRate() {
-
 
468
    return this.interestRate;
-
 
469
  }
-
 
470
 
-
 
471
  public void setInterestRate(double interestRate) {
-
 
472
    this.interestRate = interestRate;
-
 
473
    setInterestRateIsSet(true);
-
 
474
  }
-
 
475
 
-
 
476
  public void unsetInterestRate() {
-
 
477
    __isset_bit_vector.clear(__INTERESTRATE_ISSET_ID);
-
 
478
  }
-
 
479
 
-
 
480
  /** Returns true if field interestRate is set (has been assigned a value) and false otherwise */
-
 
481
  public boolean isSetInterestRate() {
-
 
482
    return __isset_bit_vector.get(__INTERESTRATE_ISSET_ID);
-
 
483
  }
-
 
484
 
-
 
485
  public void setInterestRateIsSet(boolean value) {
-
 
486
    __isset_bit_vector.set(__INTERESTRATE_ISSET_ID, value);
-
 
487
  }
-
 
488
 
453
  public void setFieldValue(_Fields field, Object value) {
489
  public void setFieldValue(_Fields field, Object value) {
454
    switch (field) {
490
    switch (field) {
455
    case ID:
491
    case ID:
456
      if (value == null) {
492
      if (value == null) {
457
        unsetId();
493
        unsetId();
Line 522... Line 558...
522
      } else {
558
      } else {
523
        setChargeValue((Double)value);
559
        setChargeValue((Double)value);
524
      }
560
      }
525
      break;
561
      break;
526
 
562
 
-
 
563
    case INTEREST_RATE:
-
 
564
      if (value == null) {
-
 
565
        unsetInterestRate();
-
 
566
      } else {
-
 
567
        setInterestRate((Double)value);
-
 
568
      }
-
 
569
      break;
-
 
570
 
527
    }
571
    }
528
  }
572
  }
529
 
573
 
530
  public Object getFieldValue(_Fields field) {
574
  public Object getFieldValue(_Fields field) {
531
    switch (field) {
575
    switch (field) {
Line 554... Line 598...
554
      return getChargeType();
598
      return getChargeType();
555
 
599
 
556
    case CHARGE_VALUE:
600
    case CHARGE_VALUE:
557
      return Double.valueOf(getChargeValue());
601
      return Double.valueOf(getChargeValue());
558
 
602
 
-
 
603
    case INTEREST_RATE:
-
 
604
      return Double.valueOf(getInterestRate());
-
 
605
 
559
    }
606
    }
560
    throw new IllegalStateException();
607
    throw new IllegalStateException();
561
  }
608
  }
562
 
609
 
563
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
610
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
Line 583... Line 630...
583
      return isSetTenureDescription();
630
      return isSetTenureDescription();
584
    case CHARGE_TYPE:
631
    case CHARGE_TYPE:
585
      return isSetChargeType();
632
      return isSetChargeType();
586
    case CHARGE_VALUE:
633
    case CHARGE_VALUE:
587
      return isSetChargeValue();
634
      return isSetChargeValue();
-
 
635
    case INTEREST_RATE:
-
 
636
      return isSetInterestRate();
588
    }
637
    }
589
    throw new IllegalStateException();
638
    throw new IllegalStateException();
590
  }
639
  }
591
 
640
 
592
  @Override
641
  @Override
Line 681... Line 730...
681
        return false;
730
        return false;
682
      if (this.chargeValue != that.chargeValue)
731
      if (this.chargeValue != that.chargeValue)
683
        return false;
732
        return false;
684
    }
733
    }
685
 
734
 
-
 
735
    boolean this_present_interestRate = true;
-
 
736
    boolean that_present_interestRate = true;
-
 
737
    if (this_present_interestRate || that_present_interestRate) {
-
 
738
      if (!(this_present_interestRate && that_present_interestRate))
-
 
739
        return false;
-
 
740
      if (this.interestRate != that.interestRate)
-
 
741
        return false;
-
 
742
    }
-
 
743
 
686
    return true;
744
    return true;
687
  }
745
  }
688
 
746
 
689
  @Override
747
  @Override
690
  public int hashCode() {
748
  public int hashCode() {
Line 787... Line 845...
787
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chargeValue, typedOther.chargeValue);
845
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.chargeValue, typedOther.chargeValue);
788
      if (lastComparison != 0) {
846
      if (lastComparison != 0) {
789
        return lastComparison;
847
        return lastComparison;
790
      }
848
      }
791
    }
849
    }
-
 
850
    lastComparison = Boolean.valueOf(isSetInterestRate()).compareTo(typedOther.isSetInterestRate());
-
 
851
    if (lastComparison != 0) {
-
 
852
      return lastComparison;
-
 
853
    }
-
 
854
    if (isSetInterestRate()) {
-
 
855
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.interestRate, typedOther.interestRate);
-
 
856
      if (lastComparison != 0) {
-
 
857
        return lastComparison;
-
 
858
      }
-
 
859
    }
792
    return 0;
860
    return 0;
793
  }
861
  }
794
 
862
 
795
  public _Fields fieldForId(int fieldId) {
863
  public _Fields fieldForId(int fieldId) {
796
    return _Fields.findByThriftId(fieldId);
864
    return _Fields.findByThriftId(fieldId);
Line 873... Line 941...
873
            setChargeValueIsSet(true);
941
            setChargeValueIsSet(true);
874
          } else { 
942
          } else { 
875
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
943
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
876
          }
944
          }
877
          break;
945
          break;
-
 
946
        case 10: // INTEREST_RATE
-
 
947
          if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
-
 
948
            this.interestRate = iprot.readDouble();
-
 
949
            setInterestRateIsSet(true);
-
 
950
          } else { 
-
 
951
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
952
          }
-
 
953
          break;
878
        default:
954
        default:
879
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
955
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
880
      }
956
      }
881
      iprot.readFieldEnd();
957
      iprot.readFieldEnd();
882
    }
958
    }
Line 919... Line 995...
919
      oprot.writeFieldEnd();
995
      oprot.writeFieldEnd();
920
    }
996
    }
921
    oprot.writeFieldBegin(CHARGE_VALUE_FIELD_DESC);
997
    oprot.writeFieldBegin(CHARGE_VALUE_FIELD_DESC);
922
    oprot.writeDouble(this.chargeValue);
998
    oprot.writeDouble(this.chargeValue);
923
    oprot.writeFieldEnd();
999
    oprot.writeFieldEnd();
-
 
1000
    oprot.writeFieldBegin(INTEREST_RATE_FIELD_DESC);
-
 
1001
    oprot.writeDouble(this.interestRate);
-
 
1002
    oprot.writeFieldEnd();
924
    oprot.writeFieldStop();
1003
    oprot.writeFieldStop();
925
    oprot.writeStructEnd();
1004
    oprot.writeStructEnd();
926
  }
1005
  }
927
 
1006
 
928
  @Override
1007
  @Override
Line 975... Line 1054...
975
    first = false;
1054
    first = false;
976
    if (!first) sb.append(", ");
1055
    if (!first) sb.append(", ");
977
    sb.append("chargeValue:");
1056
    sb.append("chargeValue:");
978
    sb.append(this.chargeValue);
1057
    sb.append(this.chargeValue);
979
    first = false;
1058
    first = false;
-
 
1059
    if (!first) sb.append(", ");
-
 
1060
    sb.append("interestRate:");
-
 
1061
    sb.append(this.interestRate);
-
 
1062
    first = false;
980
    sb.append(")");
1063
    sb.append(")");
981
    return sb.toString();
1064
    return sb.toString();
982
  }
1065
  }
983
 
1066
 
984
  public void validate() throws org.apache.thrift.TException {
1067
  public void validate() throws org.apache.thrift.TException {