Move paths to separated files

This commit is contained in:
2019-08-26 14:34:18 +02:00
parent b285bad593
commit 0e50921a0a
8 changed files with 87 additions and 75 deletions

View File

@@ -13,14 +13,14 @@ import fr.dcproject.entity.Follow as FollowEntity
open class Follow <T: UuidEntity>(override var requester: Requester): RepositoryI<FollowEntity<T>> {
override val entityName = FollowEntity::class as KClass<FollowEntity<T>>
open fun findByCitizenId(
open fun findByCitizen(
citizen: CitizenEntity,
page: Int = 1,
limit: Int = 50
): Paginated<FollowEntity<T>> =
findByCitizenId(citizen.id ?: error("The citizen must have an id"), page, limit)
findByCitizen(citizen.id ?: error("The citizen must have an id"), page, limit)
open fun findByCitizenId(
open fun findByCitizen(
citizenId: UUID,
page: Int = 1,
limit: Int = 50
@@ -57,7 +57,7 @@ open class Follow <T: UuidEntity>(override var requester: Requester): Repository
}
class FollowArticle (requester: Requester): Follow<ArticleEntity>(requester) {
override fun findByCitizenId(
override fun findByCitizen(
citizenId: UUID,
page: Int,
limit: Int
@@ -72,7 +72,7 @@ class FollowArticle (requester: Requester): Follow<ArticleEntity>(requester) {
}
class FollowConstitution (requester: Requester): Follow<ConstitutionEntity>(requester) {
override fun findByCitizenId(
override fun findByCitizen(
citizenId: UUID,
page: Int,
limit: Int