Class

com.byteslounge.slickrepo.repository

Repository

Related Doc: package repository

Permalink

abstract class Repository[T <: Entity[T, ID], ID] extends BaseRepository[T, ID]

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

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

Instance Constructors

  1. new Repository(driver: JdbcProfile)

    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 <: Keyed[ID] with slick.relational.RelationalProfile.Table[T]

    Permalink
    Definition Classes
    BaseRepository

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

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. 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
  8. val batchPersister: (Seq[T]) ⇒ slick.jdbc.JdbcProfile.API.DBIO[Option[Int]]

    Permalink

    Batch persister

    Batch persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  9. def clone(): AnyRef

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

    Permalink

    Counts all entities.

    Counts all entities.

    Definition Classes
    BaseRepository
  11. 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
  12. val driver: JdbcProfile

    Permalink
    Definition Classes
    RepositoryBaseRepository
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. 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
  16. 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
  17. def finalize(): Unit

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

    Permalink

    Finds all entities.

    Finds all entities.

    Definition Classes
    BaseRepository
  19. 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
  20. lazy val findOneCompiled: CompiledFunction[(slick.jdbc.JdbcProfile.API.Rep[ID]) ⇒ Query[TableType, BaseRepository.TableType.TableElementType, Seq], slick.jdbc.JdbcProfile.API.Rep[ID], ID, Query[TableType, BaseRepository.TableType.TableElementType, Seq], Seq[BaseRepository.TableType.TableElementType]]

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

    Permalink

    Generated ID persister

    Generated ID persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  22. 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
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. 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
  25. 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
  26. 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
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. 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
  30. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Predefined ID persister

    Predefined ID persister

    Attributes
    protected
    Definition Classes
    BaseRepository
  34. 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
  35. lazy val saveCompiled: slick.jdbc.JdbcProfile.ReturningInsertActionComposer[BaseRepository.TableType.TableElementType, ID]

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  39. 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
  40. def updateFinder(entity: T): F

    Permalink

    Update finder

    Update finder

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

    Permalink

    Update validator

    Update validator

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

    Permalink

    Updater

    Updater

    Attributes
    protected
    Definition Classes
    BaseRepository
  43. final def wait(): Unit

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

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

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

Inherited from BaseRepository[T, ID]

Inherited from AnyRef

Inherited from Any

Ungrouped