Class

com.byteslounge.slickrepo.repository

VersionedRepository

Related Doc: package repository

Permalink

abstract class VersionedRepository[T <: VersionedEntity[T, ID, V], ID, V] extends Repository[T, ID]

Repository used to execute CRUD operations against a database for a given versioned entity type.

Linear Supertypes
Repository[T, ID], BaseRepository[T, ID], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. VersionedRepository
  2. Repository
  3. BaseRepository
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new VersionedRepository(driver: JdbcProfile)(implicit arg0: VersionGenerator[V])

    Permalink

Type Members

  1. type F = AppliedCompiledFunction[_, slick.jdbc.JdbcProfile.API.Query[TableType, T, Seq], Seq[T]]

    Permalink
    Definition Classes
    BaseRepository
  2. abstract type TableType <: Versioned[ID, V] with slick.relational.RelationalProfile.Table[T]

    Permalink
    Definition Classes
    VersionedRepositoryBaseRepository

Abstract Value Members

  1. abstract def pkType: BaseTypedType[ID]

    Permalink
    Definition Classes
    BaseRepository
  2. abstract def tableQuery: slick.jdbc.JdbcProfile.API.TableQuery[TableType]

    Permalink
    Definition Classes
    BaseRepository
  3. abstract def versionType: BaseTypedType[V]

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def _getPrePersist: (T) ⇒ T

    Permalink
    Attributes
    protected
    Definition Classes
    BaseRepository
  5. implicit lazy val _pkType: BaseTypedType[ID]

    Permalink
    Definition Classes
    BaseRepository
  6. implicit lazy val _versionType: BaseTypedType[V]

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def batchInsert(entities: Seq[T]): slick.jdbc.JdbcProfile.API.DBIO[Option[Int]]

    Permalink

    Performs a batch insert of the entities that are passed in as an argument.

    Performs a batch insert of the entities that are passed in as an argument. The result will be the number of created entities in case of a successful batch insert execution (if the row count is provided by the underlying database or driver. If not, then None will be returned as the result of a successful batch insert operation).

    Definition Classes
    BaseRepository
  9. val batchPersister: (Seq[T]) ⇒ slick.jdbc.JdbcProfile.API.DBIO[Option[Int]]

    Permalink

    Batch persister

    Batch persister

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def count(): slick.jdbc.JdbcProfile.API.DBIO[Int]

    Permalink

    Counts all entities.

    Counts all entities.

    Definition Classes
    BaseRepository
  12. def delete(entity: T)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Deletes a given entity from the database.

    Deletes a given entity from the database.

    If the entity is not yet persisted in the database then this operation will result in an exception being thrown.

    Definition Classes
    BaseRepository
  13. val driver: JdbcProfile

    Permalink
    Definition Classes
    VersionedRepositoryRepositoryBaseRepository
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def exclusiveLockStatement(sql: String): String

    Permalink

    Returns the pessimistic lock statement based on the current database driver type.

    Returns the pessimistic lock statement based on the current database driver type.

    Definition Classes
    BaseRepository
  17. def executeTransactionally[R](work: slick.jdbc.JdbcProfile.API.DBIO[R]): slick.jdbc.JdbcProfile.API.DBIO[R]

    Permalink

    Executes the given unit of work in a single transaction.

    Executes the given unit of work in a single transaction.

    Definition Classes
    BaseRepository
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def findAll()(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[Seq[T]]

    Permalink

    Finds all entities.

    Finds all entities.

    Definition Classes
    BaseRepository
  20. def findOne(id: ID)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[Option[T]]

    Permalink

    Finds a given entity by its primary key.

    Finds a given entity by its primary key.

    Definition Classes
    BaseRepository
  21. lazy val findOneCompiled: CompiledFunction[(slick.jdbc.JdbcProfile.API.Rep[ID]) ⇒ Query[TableType, TableType.TableElementType, Seq], slick.jdbc.JdbcProfile.API.Rep[ID], ID, Query[TableType, TableType.TableElementType, Seq], Seq[TableType.TableElementType]]

    Permalink
    Attributes
    protected
    Definition Classes
    BaseRepository
  22. val generatedIdPersister: (T, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Versioned entity generated ID persister

    Versioned entity generated ID persister

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  23. val generator: VersionGenerator[V]

    Permalink
  24. def getBatchPersister(seqTransformer: (Seq[T]) ⇒ Seq[T]): (Seq[T]) ⇒ slick.jdbc.JdbcProfile.API.DBIO[Option[Int]]

    Permalink

    Builds a batch persister

    Builds a batch persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def getGeneratedIdPersister(transformer: (T) ⇒ T): (T, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Builds a generated ID persister

    Builds a generated ID persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  27. def getPredefinedIdPersister(transformer: (T) ⇒ T): (T, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Builds a predefined ID persister

    Builds a predefined ID persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  28. def getUpdater(transformer: (T) ⇒ T): (T, F, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Builds an updater

    Builds an updater

    Attributes
    protected
    Definition Classes
    BaseRepository
  29. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  30. implicit val instantVersionToSqlTimestampMapper: JdbcType[InstantVersion] with BaseTypedType[InstantVersion]

    Permalink
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. implicit val localDateTimeVersionToSqlTimestampMapper: JdbcType[LocalDateTimeVersion] with BaseTypedType[LocalDateTimeVersion]

    Permalink
  33. def lock(entity: T)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Locks an entity using a pessimistic lock.

    Locks an entity using a pessimistic lock.

    Definition Classes
    BaseRepository
  34. implicit val longInstantVersionToSqlTimestampMapper: JdbcType[LongInstantVersion] with BaseTypedType[LongInstantVersion]

    Permalink
  35. implicit val longLocalDateTimeVersionToSqlTimestampMapper: JdbcType[LongLocalDateTimeVersion] with BaseTypedType[LongLocalDateTimeVersion]

    Permalink
  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. val predefinedIdPersister: (T, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Versioned entity predefined ID persister

    Versioned entity predefined ID persister

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  40. def save(entity: T)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Persists an entity for the first time.

    Persists an entity for the first time.

    If the entity has an already assigned primary key, then it will be persisted with that same primary key.

    If the entity doesn't have an already assigned primary key, then it will be persisted using an auto-generated primary key using the generation strategy configured in the entity definition.

    A new entity with the primary key assigned to it will be returned.

    Definition Classes
    BaseRepository
  41. lazy val saveCompiled: slick.jdbc.JdbcProfile.ReturningInsertActionComposer[TableType.TableElementType, ID]

    Permalink
    Attributes
    protected
    Definition Classes
    BaseRepository
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  43. lazy val tableQueryCompiled: CompiledStreamingExecutable[slick.jdbc.JdbcProfile.API.TableQuery[TableType], Seq[TableType.TableElementType], TableType.TableElementType]

    Permalink
    Attributes
    protected
    Definition Classes
    BaseRepository
  44. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  45. def update(entity: T)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Updates a given entity in the database.

    Updates a given entity in the database.

    If the entity is not yet persisted in the database then this operation will result in an exception being thrown.

    Returns the same entity instance that was passed in as an argument.

    Definition Classes
    BaseRepository
  46. def updateFinder(entity: T): F

    Permalink

    Update finder

    Update finder

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  47. def updateValidator(previous: T, next: T): (Int) ⇒ T

    Permalink

    Update validator

    Update validator

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  48. val updater: (T, F, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Updater

    Updater

    Attributes
    protected
    Definition Classes
    VersionedRepositoryBaseRepository
  49. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Repository[T, ID]

Inherited from BaseRepository[T, ID]

Inherited from AnyRef

Inherited from Any

Ungrouped