diff --git a/src/main/kotlin/fr/postgresjson/entity/Entity.kt b/src/main/kotlin/fr/postgresjson/entity/Entity.kt index 6b1e8be..8aaa066 100644 --- a/src/main/kotlin/fr/postgresjson/entity/Entity.kt +++ b/src/main/kotlin/fr/postgresjson/entity/Entity.kt @@ -1,15 +1,10 @@ package fr.postgresjson.entity -import com.fasterxml.jackson.annotation.JsonIgnore import org.joda.time.DateTime import java.util.* -import kotlin.reflect.KClass /* ID */ -interface EntityI { - val className: KClass - @JsonIgnore() get() = this::class as KClass -} +interface EntityI abstract class Entity(open var id: T? = null): EntityI open class UuidEntity(override var id: UUID? = UUID.randomUUID()): Entity(id) diff --git a/src/main/kotlin/fr/postgresjson/repository/Repository.kt b/src/main/kotlin/fr/postgresjson/repository/Repository.kt index f7566a8..4b872aa 100644 --- a/src/main/kotlin/fr/postgresjson/repository/Repository.kt +++ b/src/main/kotlin/fr/postgresjson/repository/Repository.kt @@ -1,15 +1,9 @@ package fr.postgresjson.repository import fr.postgresjson.connexion.Requester -import fr.postgresjson.entity.EntityI -import kotlin.reflect.KClass -interface RepositoryI { - val entityName: KClass +interface RepositoryI { var requester: Requester - fun getClassName(): String { - return entityName.simpleName!! - } enum class Direction { asc,