Class

com.byteslounge.slickrepo.repository

BaseRepository

Related Doc: package repository

Permalink

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

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

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseRepository
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseRepository()

    Permalink

Type Members

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

    Permalink
  2. abstract type TableType <: Keyed[ID] with slick.relational.RelationalProfile.Table[T]

    Permalink

Abstract Value Members

  1. abstract val driver: JdbcProfile

    Permalink
    Attributes
    protected
  2. abstract def pkType: BaseTypedType[ID]

    Permalink
  3. abstract def tableQuery: slick.jdbc.JdbcProfile.API.TableQuery[TableType]

    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
  5. implicit lazy val _pkType: BaseTypedType[ID]

    Permalink
  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).

  8. val batchPersister: (Seq[T]) ⇒ slick.jdbc.JdbcProfile.API.DBIO[Option[Int]]

    Permalink

    Batch persister

    Batch persister

    Attributes
    protected
  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.

  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.

  12. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink

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

  15. 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.

  16. def finalize(): Unit

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

    Permalink

    Finds all entities.

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

    Permalink

    Finds a given entity by its primary key.

  19. 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
  20. val generatedIdPersister: (T, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Generated ID persister

    Generated ID persister

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. 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
  24. 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
  25. def getUpdater(transformer: (T) ⇒ T): (T, F, ExecutionContext) ⇒ slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Builds an updater

    Builds an updater

    Attributes
    protected
  26. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  28. def lock(entity: T)(implicit ec: ExecutionContext): slick.jdbc.JdbcProfile.API.DBIO[T]

    Permalink

    Locks an entity using a pessimistic lock.

  29. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    Predefined ID persister

    Predefined ID persister

    Attributes
    protected
  33. 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.

  34. lazy val saveCompiled: slick.jdbc.JdbcProfile.ReturningInsertActionComposer[TableType.TableElementType, ID]

    Permalink
    Attributes
    protected
  35. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Attributes
    protected
  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. 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.

  39. def updateFinder(entity: T): F

    Permalink

    Update finder

    Update finder

    Attributes
    protected
  40. def updateValidator(previous: T, next: T): (Int) ⇒ T

    Permalink

    Update validator

    Update validator

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

    Permalink

    Updater

    Updater

    Attributes
    protected
  42. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped