|
4 | 4 | import android.os.Parcelable; |
5 | 5 |
|
6 | 6 | import com.google.gson.annotations.SerializedName; |
| 7 | + |
7 | 8 | import java.util.List; |
8 | 9 |
|
9 | 10 | /** |
|
12 | 13 |
|
13 | 14 | public class GroupLoanTemplate implements Parcelable { |
14 | 15 | @SerializedName("group") |
15 | | - com.mifos.objects.templates.loans.Group group; |
| 16 | + Group group; |
16 | 17 |
|
17 | 18 | @SerializedName("loanProductId") |
18 | 19 | Integer loanProductId; |
@@ -176,12 +177,81 @@ public class GroupLoanTemplate implements Parcelable { |
176 | 177 | @SerializedName("maximumGap") |
177 | 178 | Integer maximumGap; |
178 | 179 |
|
179 | | - public com.mifos.objects.templates.loans.Group getGroup() { |
180 | | - return group; |
| 180 | + protected GroupLoanTemplate(Parcel in) { |
| 181 | + this.group = in.readParcelable(Group.class.getClassLoader()); |
| 182 | + this.loanProductId = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 183 | + this.loanProductName = in.readString(); |
| 184 | + this.isLoanProductLinkedToFloatingRate = (Boolean) in.readValue(Boolean.class |
| 185 | + .getClassLoader()); |
| 186 | + this.fundId = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 187 | + this.fundName = in.readString(); |
| 188 | + this.currency = in.readParcelable(Currency.class.getClassLoader()); |
| 189 | + this.principal = (Double) in.readValue(Double.class.getClassLoader()); |
| 190 | + this.approvedPrincipal = (Double) in.readValue(Double.class.getClassLoader()); |
| 191 | + this.proposedPrincipal = (Double) in.readValue(Double.class.getClassLoader()); |
| 192 | + this.termFrequency = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 193 | + this.termPeriodFrequencyType = in.readParcelable(TermPeriodFrequencyType.class |
| 194 | + .getClassLoader()); |
| 195 | + this.numberOfRepayments = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 196 | + this.repaymentEvery = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 197 | + this.repaymentFrequencyType = in.readParcelable(RepaymentFrequencyType.class |
| 198 | + .getClassLoader()); |
| 199 | + this.interestRatePerPeriod = (Double) in.readValue(Double.class.getClassLoader()); |
| 200 | + this.interestRateFrequencyType = in.readParcelable(InterestRateFrequencyType.class |
| 201 | + .getClassLoader()); |
| 202 | + this.annualInterestRate = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 203 | + this.isFloatingInterestRate = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 204 | + this.amortizationType = in.readParcelable(AmortizationType.class.getClassLoader()); |
| 205 | + this.interestType = in.readParcelable(InterestType.class.getClassLoader()); |
| 206 | + this.interestCalculationPeriodType = in.readParcelable(InterestCalculationPeriodType |
| 207 | + .class.getClassLoader()); |
| 208 | + this.allowPartialPeriodInterestCalcualtion = (Boolean) in.readValue(Boolean.class |
| 209 | + .getClassLoader()); |
| 210 | + this.transactionProcessingStrategyId = (Integer) in.readValue(Integer.class |
| 211 | + .getClassLoader()); |
| 212 | + this.timeline = in.readParcelable(Timeline.class.getClassLoader()); |
| 213 | + this.charges = in.readParcelable(Charges.class.getClassLoader()); |
| 214 | + this.productOptions = in.createTypedArrayList(ProductOptions.CREATOR); |
| 215 | + this.loanOfficerOptions = in.createTypedArrayList(LoanOfficerOptions.CREATOR); |
| 216 | + this.loanPurposeOptions = in.createTypedArrayList(LoanPurposeOptions.CREATOR); |
| 217 | + this.fundOptions = in.createTypedArrayList(FundOptions.CREATOR); |
| 218 | + this.termFrequencyTypeOptions = in.createTypedArrayList(TermFrequencyTypeOptions.CREATOR); |
| 219 | + this.repaymentFrequencyTypeOptions = in.createTypedArrayList |
| 220 | + (RepaymentFrequencyTypeOptions.CREATOR); |
| 221 | + this.repaymentFrequencyNthDayTypeOptions = in.createTypedArrayList |
| 222 | + (RepaymentFrequencyNthDayTypeOptions.CREATOR); |
| 223 | + this.repaymentFrequencyDaysOfWeekTypeOptions = in.createTypedArrayList |
| 224 | + (RepaymentFrequencyDaysOfWeekTypeOptions.CREATOR); |
| 225 | + this.interestRateFrequencyTypeOptions = in.createTypedArrayList |
| 226 | + (InterestRateFrequencyTypeOptions.CREATOR); |
| 227 | + this.amortizationTypeOptions = in.createTypedArrayList(AmortizationTypeOptions.CREATOR); |
| 228 | + this.interestTypeOptions = in.createTypedArrayList(InterestTypeOptions.CREATOR); |
| 229 | + this.interestCalculationPeriodTypeOptions = in.createTypedArrayList |
| 230 | + (InterestCalculationPeriodType.CREATOR); |
| 231 | + this.transactionProcessingStrategyOptions = in.createTypedArrayList |
| 232 | + (TransactionProcessingStrategyOptions.CREATOR); |
| 233 | + this.chargeOptions = in.createTypedArrayList(ChargeOptions.CREATOR); |
| 234 | + this.calendarOptions = in.createTypedArrayList(CalendarOptions.CREATOR); |
| 235 | + this.multiDisburseLoan = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 236 | + this.canDefineInstallmentAmount = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 237 | + this.canDisburse = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 238 | + this.canUseForTopup = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 239 | + this.isTopup = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 240 | + this.product = in.readParcelable(Product.class.getClassLoader()); |
| 241 | + this.overdueCharges = in.createTypedArrayList(OverdueCharges.CREATOR); |
| 242 | + this.daysInMonthType = in.readParcelable(DaysInMonthType.class.getClassLoader()); |
| 243 | + this.daysInYearType = in.readParcelable(DaysInYearType.class.getClassLoader()); |
| 244 | + this.isInterestRecalculationEnabled = (Boolean) in.readValue(Boolean.class |
| 245 | + .getClassLoader()); |
| 246 | + this.interestRecalculationData = in.readParcelable |
| 247 | + (InterestRecalculationData.class.getClassLoader()); |
| 248 | + this.isVariableInstallmentsAllowed = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
| 249 | + this.minimumGap = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 250 | + this.maximumGap = (Integer) in.readValue(Integer.class.getClassLoader()); |
181 | 251 | } |
182 | 252 |
|
183 | | - public void setGroup(com.mifos.objects.templates.loans.Group group) { |
184 | | - this.group = group; |
| 253 | + public Group getGroup() { |
| 254 | + return group; |
185 | 255 | } |
186 | 256 |
|
187 | 257 | public Integer getLoanProductId() { |
@@ -702,79 +772,8 @@ public void writeToParcel(Parcel dest, int flags) { |
702 | 772 | public GroupLoanTemplate() { |
703 | 773 | } |
704 | 774 |
|
705 | | - |
706 | | - protected GroupLoanTemplate(Parcel in) { |
707 | | - this.group = in.readParcelable(com.mifos.objects.templates.loans.Group.class |
708 | | - .getClassLoader()); |
709 | | - this.loanProductId = (Integer) in.readValue(Integer.class.getClassLoader()); |
710 | | - this.loanProductName = in.readString(); |
711 | | - this.isLoanProductLinkedToFloatingRate = (Boolean) in.readValue(Boolean.class |
712 | | - .getClassLoader()); |
713 | | - this.fundId = (Integer) in.readValue(Integer.class.getClassLoader()); |
714 | | - this.fundName = in.readString(); |
715 | | - this.currency = in.readParcelable(Currency.class.getClassLoader()); |
716 | | - this.principal = (Double) in.readValue(Double.class.getClassLoader()); |
717 | | - this.approvedPrincipal = (Double) in.readValue(Double.class.getClassLoader()); |
718 | | - this.proposedPrincipal = (Double) in.readValue(Double.class.getClassLoader()); |
719 | | - this.termFrequency = (Integer) in.readValue(Integer.class.getClassLoader()); |
720 | | - this.termPeriodFrequencyType = in.readParcelable(TermPeriodFrequencyType.class |
721 | | - .getClassLoader()); |
722 | | - this.numberOfRepayments = (Integer) in.readValue(Integer.class.getClassLoader()); |
723 | | - this.repaymentEvery = (Integer) in.readValue(Integer.class.getClassLoader()); |
724 | | - this.repaymentFrequencyType = in.readParcelable(RepaymentFrequencyType.class |
725 | | - .getClassLoader()); |
726 | | - this.interestRatePerPeriod = (Double) in.readValue(Double.class.getClassLoader()); |
727 | | - this.interestRateFrequencyType = in.readParcelable(InterestRateFrequencyType.class |
728 | | - .getClassLoader()); |
729 | | - this.annualInterestRate = (Integer) in.readValue(Integer.class.getClassLoader()); |
730 | | - this.isFloatingInterestRate = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
731 | | - this.amortizationType = in.readParcelable(AmortizationType.class.getClassLoader()); |
732 | | - this.interestType = in.readParcelable(InterestType.class.getClassLoader()); |
733 | | - this.interestCalculationPeriodType = in.readParcelable(InterestCalculationPeriodType |
734 | | - .class.getClassLoader()); |
735 | | - this.allowPartialPeriodInterestCalcualtion = (Boolean) in.readValue(Boolean.class |
736 | | - .getClassLoader()); |
737 | | - this.transactionProcessingStrategyId = (Integer) in.readValue(Integer.class |
738 | | - .getClassLoader()); |
739 | | - this.timeline = in.readParcelable(Timeline.class.getClassLoader()); |
740 | | - this.charges = in.readParcelable(Charges.class.getClassLoader()); |
741 | | - this.productOptions = in.createTypedArrayList(ProductOptions.CREATOR); |
742 | | - this.loanOfficerOptions = in.createTypedArrayList(LoanOfficerOptions.CREATOR); |
743 | | - this.loanPurposeOptions = in.createTypedArrayList(LoanPurposeOptions.CREATOR); |
744 | | - this.fundOptions = in.createTypedArrayList(FundOptions.CREATOR); |
745 | | - this.termFrequencyTypeOptions = in.createTypedArrayList(TermFrequencyTypeOptions.CREATOR); |
746 | | - this.repaymentFrequencyTypeOptions = in.createTypedArrayList |
747 | | - (RepaymentFrequencyTypeOptions.CREATOR); |
748 | | - this.repaymentFrequencyNthDayTypeOptions = in.createTypedArrayList |
749 | | - (RepaymentFrequencyNthDayTypeOptions.CREATOR); |
750 | | - this.repaymentFrequencyDaysOfWeekTypeOptions = in.createTypedArrayList |
751 | | - (RepaymentFrequencyDaysOfWeekTypeOptions.CREATOR); |
752 | | - this.interestRateFrequencyTypeOptions = in.createTypedArrayList |
753 | | - (InterestRateFrequencyTypeOptions.CREATOR); |
754 | | - this.amortizationTypeOptions = in.createTypedArrayList(AmortizationTypeOptions.CREATOR); |
755 | | - this.interestTypeOptions = in.createTypedArrayList(InterestTypeOptions.CREATOR); |
756 | | - this.interestCalculationPeriodTypeOptions = in.createTypedArrayList |
757 | | - (InterestCalculationPeriodType.CREATOR); |
758 | | - this.transactionProcessingStrategyOptions = in.createTypedArrayList |
759 | | - (TransactionProcessingStrategyOptions.CREATOR); |
760 | | - this.chargeOptions = in.createTypedArrayList(ChargeOptions.CREATOR); |
761 | | - this.calendarOptions = in.createTypedArrayList(CalendarOptions.CREATOR); |
762 | | - this.multiDisburseLoan = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
763 | | - this.canDefineInstallmentAmount = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
764 | | - this.canDisburse = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
765 | | - this.canUseForTopup = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
766 | | - this.isTopup = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
767 | | - this.product = in.readParcelable(Product.class.getClassLoader()); |
768 | | - this.overdueCharges = in.createTypedArrayList(OverdueCharges.CREATOR); |
769 | | - this.daysInMonthType = in.readParcelable(DaysInMonthType.class.getClassLoader()); |
770 | | - this.daysInYearType = in.readParcelable(DaysInYearType.class.getClassLoader()); |
771 | | - this.isInterestRecalculationEnabled = (Boolean) in.readValue(Boolean.class |
772 | | - .getClassLoader()); |
773 | | - this.interestRecalculationData = in.readParcelable |
774 | | - (InterestRecalculationData.class.getClassLoader()); |
775 | | - this.isVariableInstallmentsAllowed = (Boolean) in.readValue(Boolean.class.getClassLoader()); |
776 | | - this.minimumGap = (Integer) in.readValue(Integer.class.getClassLoader()); |
777 | | - this.maximumGap = (Integer) in.readValue(Integer.class.getClassLoader()); |
| 775 | + public void setGroup(Group group) { |
| 776 | + this.group = group; |
778 | 777 | } |
779 | 778 |
|
780 | 779 | public static final Parcelable.Creator<GroupLoanTemplate> CREATOR = |
|
0 commit comments