remove EntityI.className && RepositoryI.entityName
This commit is contained in:
@@ -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<EntityI>
|
||||
@JsonIgnore() get() = this::class as KClass<EntityI>
|
||||
}
|
||||
interface EntityI
|
||||
|
||||
abstract class Entity<T>(open var id: T? = null): EntityI
|
||||
open class UuidEntity(override var id: UUID? = UUID.randomUUID()): Entity<UUID>(id)
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
package fr.postgresjson.repository
|
||||
|
||||
import fr.postgresjson.connexion.Requester
|
||||
import fr.postgresjson.entity.EntityI
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
interface RepositoryI<E: EntityI> {
|
||||
val entityName: KClass<E>
|
||||
interface RepositoryI {
|
||||
var requester: Requester
|
||||
fun getClassName(): String {
|
||||
return entityName.simpleName!!
|
||||
}
|
||||
|
||||
enum class Direction {
|
||||
asc,
|
||||
|
||||
Reference in New Issue
Block a user