fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [4/5] incubator-fineract git commit: Removing Hibernate annotations
Date Tue, 28 Jun 2016 11:39:30 GMT
Removing Hibernate annotations


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/9e5e7329
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/9e5e7329
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/9e5e7329

Branch: refs/heads/develop
Commit: 9e5e7329adfedb68dadd5cadabaef2ba43e22c88
Parents: 9a2568d
Author: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Authored: Tue Jun 28 11:09:42 2016 +0530
Committer: Nazeer Hussain Shaik <nazeer.shaik@confluxtechnologies.com>
Committed: Tue Jun 28 11:09:42 2016 +0530

----------------------------------------------------------------------
 .../ClientLoanIntegrationTest.java              |   1 +
 .../provisioning/domain/ProvisioningEntry.java  |  11 +-
 ...esWritePlatformServiceJpaRepositoryImpl.java |   7 +-
 .../accounting/rule/domain/AccountingRule.java  |   6 +-
 .../dataqueries/domain/Report.java              |   6 +-
 .../infrastructure/hooks/domain/Hook.java       |  10 +-
 .../hooks/domain/HookTemplate.java              |   6 +-
 .../domain/ProvisioningCriteria.java            |   9 +-
 .../account/domain/AccountTransferDetails.java  |   5 +-
 .../portfolio/client/domain/Client.java         |   5 +-
 .../client/domain/ClientTransaction.java        |   6 +-
 .../floatingrates/domain/FloatingRate.java      |   6 +-
 .../loanaccount/data/LoanAccountData.java       |   1 -
 .../portfolio/loanaccount/domain/Loan.java      | 357 ++++++++++---------
 .../domain/LoanAccountDomainServiceJpa.java     |  10 +-
 .../loanaccount/domain/LoanCharge.java          |   5 +-
 .../LoanRepaymentScheduleInstallment.java       |  16 +-
 .../loanaccount/domain/LoanTransaction.java     |  11 +-
 .../loanaccount/guarantor/domain/Guarantor.java |   6 +-
 .../domain/GuarantorFundingDetails.java         |   6 +-
 .../domain/AbstractLoanScheduleGenerator.java   |   4 +-
 .../LoanScheduleModelDisbursementPeriod.java    |   4 +-
 .../domain/LoanScheduleModelPeriod.java         |   4 +-
 .../LoanScheduleModelRepaymentPeriod.java       |   8 +-
 .../service/LoanScheduleAssembler.java          |  13 +-
 ...nScheduleCalculationPlatformServiceImpl.java |   7 +-
 .../LoanScheduleWritePlatformServiceImpl.java   |   5 +-
 ...scheduleRequestWritePlatformServiceImpl.java |   9 +-
 ...LoanApplicationCommandFromApiJsonHelper.java |   2 +-
 ...onWritePlatformServiceJpaRepositoryImpl.java |   2 +-
 ...anWritePlatformServiceJpaRepositoryImpl.java |  31 +-
 .../loanproduct/domain/LoanProduct.java         |  17 +-
 .../domain/DepositAccountDomainServiceJpa.java  |   2 +-
 .../domain/DepositAccountInterestRateChart.java |   6 +-
 .../DepositAccountInterestRateChartSlabs.java   |   6 +-
 .../savings/domain/RecurringDepositAccount.java |  49 ++-
 .../RecurringDepositScheduleInstallment.java    |   4 +
 .../savings/domain/SavingsAccount.java          |  90 ++---
 .../savings/domain/SavingsAccountCharge.java    |   3 +-
 .../savings/domain/SavingsAccountSummary.java   |   3 +-
 .../domain/SavingsAccountTransaction.java       |   9 +-
 ...SavingsAccountTransactionSummaryWrapper.java |  24 +-
 ...ntWritePlatformServiceJpaRepositoryImpl.java |   6 +-
 ...ntWritePlatformServiceJpaRepositoryImpl.java |  44 +--
 .../shareaccounts/domain/ShareAccount.java      |   9 +-
 .../domain/ShareAccountTransaction.java         |   6 +-
 .../shareproducts/domain/ShareProduct.java      |   5 +-
 .../ShareProductDividendPayOutDetails.java      |   6 +-
 .../portfolio/tax/domain/TaxComponent.java      |  19 +-
 .../fineract/portfolio/tax/domain/TaxGroup.java |  18 +-
 .../tax/serialization/TaxValidator.java         |   8 +-
 .../portfolio/tax/service/TaxAssembler.java     |   8 +-
 .../portfolio/tax/service/TaxUtils.java         |   5 +-
 .../service/TaxWritePlatformServiceImpl.java    |   4 +-
 .../useradministration/domain/AppUser.java      |   5 +-
 ...LoanRepaymentScheduleInstallmentBuilder.java |   4 +-
 56 files changed, 475 insertions(+), 464 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
index b2a737c..66740c8 100644
--- a/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
+++ b/fineract-provider/src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
@@ -3805,6 +3805,7 @@ public class ClientLoanIntegrationTest {
         final Integer loanID = applyForLoanApplicationForInterestRecalculation(clientID,
loanProductID, LOAN_DISBURSEMENT_DATE,
                 REST_START_DATE, LoanApplicationTestBuilder.DEFAULT_STRATEGY, null);
 
+
         Assert.assertNotNull(loanID);
         HashMap loanStatusHashMap = LoanStatusChecker.getStatusOfLoan(this.requestSpec, this.responseSpec,
loanID);
         LoanStatusChecker.verifyLoanIsPending(loanStatusHashMap);

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java
index 7d75c5c..5b56507 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java
@@ -21,10 +21,12 @@ package org.apache.fineract.accounting.provisioning.domain;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashSet;
+import java.util.Set;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
@@ -33,8 +35,6 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
 @Entity
@@ -44,9 +44,8 @@ public class ProvisioningEntry extends AbstractPersistable<Long> {
     @Column(name = "journal_entry_created")
     private Boolean isJournalEntryCreated;
     
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "entry", orphanRemoval = true)
-    Collection<LoanProductProvisioningEntry> provisioningEntries = new HashSet<>();
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "entry", orphanRemoval = true, fetch=FetchType.EAGER)
+    Set<LoanProductProvisioningEntry> provisioningEntries = new HashSet<>();
     
     @OneToOne
     @JoinColumn(name = "createdby_id")
@@ -68,7 +67,7 @@ public class ProvisioningEntry extends AbstractPersistable<Long> {
         
     }
     
-    public ProvisioningEntry(AppUser createdBy, Date createdDate, AppUser lastModifiedBy,
Date lastModifiedDate, Collection<LoanProductProvisioningEntry> provisioningEntries
) {
+    public ProvisioningEntry(AppUser createdBy, Date createdDate, AppUser lastModifiedBy,
Date lastModifiedDate, Set<LoanProductProvisioningEntry> provisioningEntries ) {
         this.provisioningEntries = provisioningEntries ;
         this.createdBy = createdBy ;
         this.createdDate = createdDate ;

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.java
index 2eb191e..517f20c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.java
@@ -22,6 +22,7 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.fineract.accounting.glaccount.domain.GLAccount;
 import org.apache.fineract.accounting.glaccount.domain.GLAccountRepository;
@@ -58,8 +59,6 @@ import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct;
 import org.apache.fineract.portfolio.loanproduct.domain.LoanProductRepository;
 import org.apache.fineract.useradministration.domain.AppUser;
 import org.joda.time.LocalDate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.dao.DataIntegrityViolationException;
 import org.springframework.stereotype.Service;
@@ -69,8 +68,6 @@ import com.google.gson.JsonObject;
 @Service
 public class ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl implements ProvisioningEntriesWritePlatformService
{
 
-    private final static Logger logger = LoggerFactory.getLogger(ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl.class);
-
     private final ProvisioningEntriesReadPlatformService provisioningEntriesReadPlatformService;
     private final ProvisioningCriteriaReadPlatformService provisioningCriteriaReadPlatformService
;
     private final LoanProductRepository loanProductRepository;
@@ -192,7 +189,7 @@ public class ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl
implements
         AppUser currentUser = this.platformSecurityContext.authenticatedUser();
         AppUser lastModifiedBy = null;
         Date lastModifiedDate = null;
-        Collection<LoanProductProvisioningEntry> nullEntries = null;
+        Set<LoanProductProvisioningEntry> nullEntries = null;
         ProvisioningEntry requestedEntry = new ProvisioningEntry(currentUser, date, lastModifiedBy,
lastModifiedDate, nullEntries);
         Collection<LoanProductProvisioningEntry> entries = generateLoanProvisioningEntry(requestedEntry,
date);
         requestedEntry.setProvisioningEntries(entries);

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java
index c0027b4..a603722 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java
@@ -28,6 +28,7 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
@@ -40,8 +41,6 @@ import org.apache.fineract.accounting.journalentry.domain.JournalEntryType;
 import org.apache.fineract.accounting.rule.api.AccountingRuleJsonInputParams;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.organisation.office.domain.Office;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
 @Entity
@@ -69,8 +68,7 @@ public class AccountingRule extends AbstractPersistable<Long> {
     @Column(name = "system_defined", nullable = false)
     private Boolean systemDefined;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "accountingRule", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "accountingRule", orphanRemoval = true,
fetch=FetchType.EAGER)
     private final List<AccountingTagRule> accountingTagRules = new ArrayList<>();
 
     @Column(name = "allow_multiple_credits", nullable = false)

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java
index 799f003..4d8fe02 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java
@@ -29,6 +29,7 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.OneToMany;
 import javax.persistence.Table;
 import javax.persistence.UniqueConstraint;
@@ -39,8 +40,6 @@ import org.apache.fineract.infrastructure.core.data.ApiParameterError;
 import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
 import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
 import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
 import com.google.gson.JsonArray;
@@ -74,8 +73,7 @@ public final class Report extends AbstractPersistable<Long> {
     @Column(name = "report_sql")
     private String reportSql;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "report", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "report", orphanRemoval = true, fetch=FetchType.EAGER)
     private final Set<ReportParameterUsage> reportParameterUsages = new HashSet<>();
 
     public static Report fromJson(final JsonCommand command, final Collection<String>
reportTypes) {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java
index 986e690..7f7ea74 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java
@@ -20,16 +20,16 @@ package org.apache.fineract.infrastructure.hooks.domain;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom;
 import org.apache.fineract.template.domain.Template;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.util.CollectionUtils;
 
 import javax.persistence.*;
+
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -47,12 +47,10 @@ public class Hook extends AbstractAuditableCustom<AppUser, Long>
{
     @Column(name = "is_active", nullable = false)
     private Boolean isActive;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true, fetch=FetchType.EAGER)
     private Set<HookResource> events = new HashSet<>();
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "hook", orphanRemoval = true, fetch=FetchType.EAGER)
     private Set<HookConfiguration> config = new HashSet<>();
 
     @ManyToOne(optional = true)

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java
index 0da4af8..904db7a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java
@@ -26,13 +26,12 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.OneToMany;
 import javax.persistence.Table;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
 @Entity
@@ -42,8 +41,7 @@ public class HookTemplate extends AbstractPersistable<Long> {
 	@Column(name = "name", nullable = false, length = 100)
 	private String name;
 
-	@LazyCollection(LazyCollectionOption.FALSE)
-	@OneToMany(cascade = CascadeType.ALL, mappedBy = "template", orphanRemoval = true)
+	@OneToMany(cascade = CascadeType.ALL, mappedBy = "template", orphanRemoval = true, fetch=FetchType.EAGER)
 	private final Set<Schema> fields = new HashSet<>();
 
 	private HookTemplate(final String name) {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java
b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java
index 90aeb47..320b3cc 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java
@@ -27,6 +27,7 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.OneToMany;
 import javax.persistence.Table;
 import javax.persistence.UniqueConstraint;
@@ -38,8 +39,6 @@ import org.apache.fineract.organisation.provisioning.constants.ProvisioningCrite
 import org.apache.fineract.organisation.provisioning.data.ProvisioningCriteriaDefinitionData;
 import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.joda.time.DateTime;
 
 @Entity
@@ -49,12 +48,10 @@ public class ProvisioningCriteria extends AbstractAuditableCustom<AppUser,
Long>
     @Column(name = "criteria_name", nullable = false)
     private String criteriaName;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "criteria", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "criteria", orphanRemoval = true, fetch=FetchType.EAGER)
     Set<ProvisioningCriteriaDefinition> provisioningCriteriaDefinition = new HashSet<>();
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "criteria", orphanRemoval = true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "criteria", orphanRemoval = true, fetch=FetchType.EAGER)
     Set<LoanProductProvisionCriteria> loanProductMapping = new HashSet<>();
 
     public String getCriteriaName() {

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java
index 7106602..d8cd057 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java
@@ -35,8 +35,6 @@ import org.apache.fineract.organisation.office.domain.Office;
 import org.apache.fineract.portfolio.client.domain.Client;
 import org.apache.fineract.portfolio.loanaccount.domain.Loan;
 import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
 @Entity
@@ -78,8 +76,7 @@ public class AccountTransferDetails extends AbstractPersistable<Long>
{
     @Column(name = "transfer_type")
     private Integer transferType;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "accountTransferDetails", orphanRemoval
= true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "accountTransferDetails", orphanRemoval
= true, fetch=FetchType.EAGER)
     private final List<AccountTransferTransaction> accountTransferTransactions = new
ArrayList<>();
 
     @OneToOne(mappedBy = "accountTransferDetails", cascade = CascadeType.ALL, optional =
true, orphanRemoval = true, fetch = FetchType.LAZY)

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java
index 5ed9ad4..70f205a 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java
@@ -57,8 +57,6 @@ import org.apache.fineract.portfolio.group.domain.Group;
 import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
 import org.apache.fineract.portfolio.savings.domain.SavingsProduct;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.joda.time.LocalDate;
 import org.joda.time.format.DateTimeFormatter;
 import org.springframework.data.jpa.domain.AbstractPersistable;
@@ -134,8 +132,7 @@ public final class Client extends AbstractPersistable<Long> {
     @JoinColumn(name = "staff_id")
     private Staff staff;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @ManyToMany
+    @ManyToMany(fetch=FetchType.EAGER)
     @JoinTable(name = "m_group_client", joinColumns = @JoinColumn(name = "client_id"), inverseJoinColumns
= @JoinColumn(name = "group_id"))
     private Set<Group> groups;
 

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java
index e3f56f6..65a0e36 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
@@ -48,8 +49,6 @@ import org.apache.fineract.organisation.office.domain.Office;
 import org.apache.fineract.organisation.office.domain.OrganisationCurrency;
 import org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.joda.time.LocalDate;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
@@ -96,8 +95,7 @@ public class ClientTransaction extends AbstractPersistable<Long> {
     @JoinColumn(name = "appuser_id", nullable = true)
     private AppUser appUser;
 
-    @LazyCollection(LazyCollectionOption.FALSE)
-    @OneToMany(cascade = CascadeType.ALL, mappedBy = "clientTransaction", orphanRemoval =
true)
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "clientTransaction", orphanRemoval =
true, fetch=FetchType.EAGER)
     private Set<ClientChargePaidBy> clientChargePaidByCollection = new HashSet<>();
 
     @Transient

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java
index b6649a6..6275074 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/domain/FloatingRate.java
@@ -30,6 +30,7 @@ import java.util.Set;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
+import javax.persistence.FetchType;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
@@ -43,8 +44,6 @@ import org.apache.fineract.infrastructure.core.service.DateUtils;
 import org.apache.fineract.portfolio.floatingrates.data.FloatingRateDTO;
 import org.apache.fineract.portfolio.floatingrates.data.FloatingRatePeriodData;
 import org.apache.fineract.useradministration.domain.AppUser;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
 import org.joda.time.LocalDate;
 import org.springframework.data.jpa.domain.AbstractPersistable;
 
@@ -66,8 +65,7 @@ public class FloatingRate extends AbstractPersistable<Long> {
 	private boolean isActive;
 
 	@OrderBy(value = "fromDate,id")
-	@LazyCollection(LazyCollectionOption.FALSE)
-	@OneToMany(cascade = CascadeType.ALL, mappedBy = "floatingRate", orphanRemoval = true)
+	@OneToMany(cascade = CascadeType.ALL, mappedBy = "floatingRate", orphanRemoval = true, fetch=FetchType.EAGER)
 	private Set<FloatingRatePeriod> floatingRatePeriods;
 
 	@ManyToOne(optional = true)

http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/9e5e7329/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
index 555ed3b..fa6881d 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java
@@ -48,7 +48,6 @@ import org.apache.fineract.portfolio.loanproduct.data.TransactionProcessingStrat
 import org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes;
 import org.apache.fineract.portfolio.loanproduct.domain.LoanProductValueConditionType;
 import org.apache.fineract.portfolio.note.data.NoteData;
-import org.hibernate.dialect.Sybase11Dialect;
 import org.joda.time.LocalDate;
 import org.springframework.util.CollectionUtils;
 


Mime
View raw message