Skip to content

Commit

Permalink
refactor: moving files from database module to model module (#2275)
Browse files Browse the repository at this point in the history
* initial refactoring

* MIFOSAC-321

* applying spotless and detekt MIFOSAC-321

* renaming modelObject package to just Object MIFOSAC-321

* changing the package names

* renaming dbobjects to entity
refactoring CenterPayload file
moving LoanPayload to network module
  • Loading branch information
Darkeye14 authored Jan 8, 2025
1 parent 876e30f commit b2c41c3
Show file tree
Hide file tree
Showing 674 changed files with 1,408 additions and 1,332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package com.mifos.core.data.pagingSource

import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.mifos.core.entity.group.Center
import com.mifos.core.network.datamanager.DataManagerCenter
import com.mifos.core.objects.client.Page
import com.mifos.core.objects.group.Center
import com.mifos.core.objects.clients.Page
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package com.mifos.core.data.pagingSource

import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.mifos.core.entity.client.Charges
import com.mifos.core.network.datamanager.DataManagerCharge
import com.mifos.core.objects.client.Charges
import com.mifos.core.objects.client.Page
import com.mifos.core.objects.clients.Page
import kotlinx.coroutines.suspendCancellableCoroutine
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package com.mifos.core.data.pagingSource

import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.mifos.core.entity.client.Client
import com.mifos.core.network.datamanager.DataManagerClient
import com.mifos.core.objects.client.Client
import com.mifos.core.objects.client.Page
import com.mifos.core.objects.clients.Page
import rx.Subscriber
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package com.mifos.core.data.repository

import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.client.ActivatePayload
import com.mifos.core.objects.clients.ActivatePayload
import org.openapitools.client.models.PostCentersCenterIdResponse
import org.openapitools.client.models.PostClientsClientIdResponse
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.group.CenterInfo
import com.mifos.core.objects.group.CenterWithAssociations
import com.mifos.core.entity.group.CenterWithAssociations
import com.mifos.core.objects.groups.CenterInfo
import kotlinx.coroutines.flow.Flow

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
package com.mifos.core.data.repository

import androidx.paging.PagingData
import com.mifos.core.objects.client.Page
import com.mifos.core.objects.group.Center
import com.mifos.core.objects.group.CenterWithAssociations
import com.mifos.core.entity.group.Center
import com.mifos.core.entity.group.CenterWithAssociations
import com.mifos.core.objects.clients.Page
import kotlinx.coroutines.flow.Flow
import rx.Observable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.ChargesPayload
import com.mifos.core.objects.client.ChargeCreationResponse
import com.mifos.core.objects.templates.clients.ChargeTemplate
import com.mifos.core.objects.clients.ChargeCreationResponse
import com.mifos.core.objects.template.client.ChargeTemplate
import com.mifos.core.payloads.ChargesPayload

/**
* Created by Aditya Gupta on 13/08/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package com.mifos.core.data.repository

import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.checkerinboxandtasks.CheckerInboxSearchTemplate
import com.mifos.core.objects.checkerinboxandtasks.CheckerTask
import com.mifos.core.objects.checkerinboxtask.CheckerInboxSearchTemplate
import com.mifos.core.objects.checkerinboxtask.CheckerTask

interface CheckerInboxRepository {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.checkerinboxandtasks.CheckerTask
import com.mifos.core.objects.checkerinboxandtasks.RescheduleLoansTask
import com.mifos.core.objects.checkerinboxtask.CheckerTask
import com.mifos.core.objects.checkerinboxtask.RescheduleLoansTask
import kotlinx.coroutines.flow.Flow

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package com.mifos.core.data.repository

import androidx.paging.PagingData
import com.mifos.core.objects.client.Charges
import com.mifos.core.entity.client.Charges
import kotlinx.coroutines.flow.Flow

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.ClientAccounts
import com.mifos.core.objects.client.Client
import com.mifos.core.entity.accounts.ClientAccounts
import com.mifos.core.entity.client.Client
import okhttp3.MultipartBody
import okhttp3.ResponseBody
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.noncore.IdentifierCreationResponse
import com.mifos.core.objects.noncore.IdentifierPayload
import com.mifos.core.objects.noncore.IdentifierTemplate
import com.mifos.core.objects.noncoreobjects.IdentifierCreationResponse
import com.mifos.core.objects.noncoreobjects.IdentifierPayload
import com.mifos.core.objects.noncoreobjects.IdentifierTemplate

/**
* Created by Aditya Gupta on 16/08/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.noncore.Identifier
import com.mifos.core.objects.noncoreobjects.Identifier
import org.openapitools.client.models.DeleteClientsClientIdIdentifiersIdentifierIdResponse

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
package com.mifos.core.data.repository

import androidx.paging.PagingData
import com.mifos.core.objects.client.Client
import com.mifos.core.objects.client.Page
import com.mifos.core.entity.client.Client
import com.mifos.core.objects.clients.Page
import kotlinx.coroutines.flow.Flow
import rx.Observable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.CenterPayload
import com.mifos.core.objects.response.SaveResponse
import com.mifos.core.entity.center.CenterPayload
import com.mifos.core.objects.responses.SaveResponse
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.client.Client
import com.mifos.core.objects.client.ClientPayload
import com.mifos.core.objects.organisation.Office
import com.mifos.core.objects.organisation.Staff
import com.mifos.core.objects.templates.clients.ClientsTemplate
import com.mifos.core.entity.client.Client
import com.mifos.core.entity.client.ClientPayload
import com.mifos.core.entity.organisation.Office
import com.mifos.core.entity.organisation.Staff
import com.mifos.core.entity.templates.clients.ClientsTemplate
import okhttp3.MultipartBody
import okhttp3.ResponseBody
import rx.Observable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.group.GroupPayload
import com.mifos.core.objects.organisation.Office
import com.mifos.core.objects.response.SaveResponse
import com.mifos.core.entity.group.GroupPayload
import com.mifos.core.entity.organisation.Office
import com.mifos.core.objects.responses.SaveResponse
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.GroupLoanPayload
import com.mifos.core.data.LoansPayload
import com.mifos.core.objects.accounts.loan.Loans
import com.mifos.core.objects.client.Client
import com.mifos.core.objects.client.ClientPayload
import com.mifos.core.entity.accounts.loan.Loans
import com.mifos.core.entity.client.Client
import com.mifos.core.entity.client.ClientPayload
import com.mifos.core.network.model.LoansPayload
import com.mifos.core.payloads.GroupLoanPayload
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.noncore.DataTable
import com.mifos.core.entity.noncore.DataTable

/**
* Created by Aditya Gupta on 08/08/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package com.mifos.core.data.repository

import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.noncore.Document
import com.mifos.core.objects.noncoreobjects.Document
import okhttp3.ResponseBody

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.entity.collectionsheet.CenterDetail
import com.mifos.core.entity.collectionsheet.CollectionSheetPayload
import com.mifos.core.entity.collectionsheet.CollectionSheetResponse
import com.mifos.core.entity.collectionsheet.ProductiveCollectionSheetPayload
import com.mifos.core.entity.group.Center
import com.mifos.core.entity.group.CenterWithAssociations
import com.mifos.core.entity.group.Group
import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.collectionsheet.CenterDetail
import com.mifos.core.objects.collectionsheet.CollectionSheetPayload
import com.mifos.core.objects.collectionsheet.CollectionSheetRequestPayload
import com.mifos.core.objects.collectionsheet.CollectionSheetResponse
import com.mifos.core.objects.collectionsheet.ProductiveCollectionSheetPayload
import com.mifos.core.objects.group.Center
import com.mifos.core.objects.group.CenterWithAssociations
import com.mifos.core.objects.group.Group
import com.mifos.core.objects.collectionsheets.CollectionSheetRequestPayload

/**
* Created by Aditya Gupta on 12/08/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.GroupAccounts
import com.mifos.core.objects.group.Group
import com.mifos.core.objects.group.GroupWithAssociations
import com.mifos.core.entity.accounts.GroupAccounts
import com.mifos.core.entity.group.Group
import com.mifos.core.entity.group.GroupWithAssociations
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.group.CenterWithAssociations
import com.mifos.core.objects.group.GroupWithAssociations
import com.mifos.core.entity.group.CenterWithAssociations
import com.mifos.core.entity.group.GroupWithAssociations
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.GroupLoanPayload
import com.mifos.core.objects.accounts.loan.Loans
import com.mifos.core.objects.templates.loans.GroupLoanTemplate
import com.mifos.core.entity.accounts.loan.Loans
import com.mifos.core.objects.template.loan.GroupLoanTemplate
import com.mifos.core.payloads.GroupLoanPayload
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.group.Group
import com.mifos.core.entity.group.Group
import kotlinx.coroutines.flow.Flow

interface GroupsListRepository {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package com.mifos.core.data.repository

import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.accounts.loan.LoanApproval
import com.mifos.core.objects.account.loan.LoanApproval
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.entity.templates.loans.LoanTransactionTemplate
import com.mifos.core.network.GenericResponse
import com.mifos.core.objects.accounts.loan.LoanDisbursement
import com.mifos.core.objects.templates.loans.LoanTransactionTemplate
import com.mifos.core.objects.account.loan.LoanDisbursement
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.LoansPayload
import com.mifos.core.objects.accounts.loan.Loans
import com.mifos.core.objects.organisation.LoanProducts
import com.mifos.core.objects.templates.loans.LoanTemplate
import com.mifos.core.entity.accounts.loan.Loans
import com.mifos.core.entity.templates.loans.LoanTemplate
import com.mifos.core.network.model.LoansPayload
import com.mifos.core.objects.organisations.LoanProducts
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.loan.LoanWithAssociations
import com.mifos.core.entity.accounts.loan.LoanWithAssociations
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.data.ChargesPayload
import com.mifos.core.objects.client.ChargeCreationResponse
import com.mifos.core.objects.clients.ChargeCreationResponse
import com.mifos.core.payloads.ChargesPayload
import okhttp3.ResponseBody

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.client.Charges
import com.mifos.core.entity.client.Charges

/**
* Created by Aditya Gupta on 10/08/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.loan.LoanRepaymentRequest
import com.mifos.core.objects.accounts.loan.LoanRepaymentResponse
import com.mifos.core.objects.templates.loans.LoanRepaymentTemplate
import com.mifos.core.entity.accounts.loan.LoanRepaymentRequest
import com.mifos.core.entity.templates.loans.LoanRepaymentTemplate
import com.mifos.core.objects.account.loan.LoanRepaymentResponse
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.loan.LoanWithAssociations
import com.mifos.core.entity.accounts.loan.LoanWithAssociations
import rx.Observable

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
package com.mifos.core.data.repository

import com.mifos.core.objects.accounts.loan.LoanWithAssociations
import com.mifos.core.entity.accounts.loan.LoanWithAssociations
import rx.Observable

/**
Expand Down
Loading

0 comments on commit b2c41c3

Please sign in to comment.