com.byteslounge.slickrepo.repository

Repository

abstract class Repository[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. Repository
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Repository(driver: JdbcProfile)

Type Members

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

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

Abstract Value Members

  1. abstract def pkType: BaseTypedType[ID]

  2. abstract def tableQuery: slick.driver.JdbcProfile.API.TableQuery[TableType]

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit lazy val _pkType: BaseTypedType[ID]

  7. final def asInstanceOf[T0]: T0

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

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

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

    Batch persister

    Batch persister

    Attributes
    protected
  10. def clone(): AnyRef

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

    Counts all entities.

  12. def delete(entity: T)(implicit ec: ExecutionContext): slick.driver.JdbcProfile.API.DBIO[T]

    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.

  13. val driver: JdbcProfile

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

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

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

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

  17. def executeTransactionally[R](work: slick.driver.JdbcProfile.API.DBIO[R]): slick.driver.JdbcProfile.API.DBIO[R]

    Executes the given unit of work in a single transaction.

  18. def finalize(): Unit

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

    Finds all entities.

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

    Finds a given entity by its primary key.

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

    Attributes
    protected
  22. val generatedIdPersister: (T, ExecutionContext) ⇒ slick.driver.JdbcProfile.API.DBIO[T]

    Generated ID persister

    Generated ID persister

    Attributes
    protected
  23. def getBatchPersister(seqTransformer: (Seq[T]) ⇒ Seq[T]): (Seq[T]) ⇒ slick.driver.JdbcProfile.API.DBIO[Option[Int]]

    Builds a batch persister

    Builds a batch persister

    Attributes
    protected
  24. final def getClass(): Class[_]

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

    Builds a generated ID persister

    Builds a generated ID persister

    Attributes
    protected
  26. def getPredefinedIdPersister(transformer: (T) ⇒ T): (T, ExecutionContext) ⇒ slick.driver.JdbcProfile.API.DBIO[T]

    Builds a predefined ID persister

    Builds a predefined ID persister

    Attributes
    protected
  27. def getUpdater(transformer: (T) ⇒ T): (T, F, ExecutionContext) ⇒ slick.driver.JdbcProfile.API.DBIO[T]

    Builds an updater

    Builds an updater

    Attributes
    protected
  28. def hashCode(): Int

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

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

    Locks an entity using a pessimistic lock.

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

    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  34. val postDelete: (T) ⇒ T

  35. val postLoad: (T) ⇒ T

  36. val postPersist: (T) ⇒ T

  37. val postUpdate: (T) ⇒ T

  38. val preDelete: (T) ⇒ T

  39. val prePersist: (T) ⇒ T

  40. val preUpdate: (T) ⇒ T

  41. val predefinedIdPersister: (T, ExecutionContext) ⇒ slick.driver.JdbcProfile.API.DBIO[T]

    Predefined ID persister

    Predefined ID persister

    Attributes
    protected
  42. def save(entity: T)(implicit ec: ExecutionContext): slick.driver.JdbcProfile.API.DBIO[T]

    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.

  43. lazy val saveCompiled: slick.driver.JdbcProfile.ReturningInsertActionComposer[TableType.TableElementType, ID]

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

    Definition Classes
    AnyRef
  45. lazy val tableQueryCompiled: CompiledStreamingExecutable[slick.driver.JdbcProfile.API.TableQuery[TableType], Seq[TableType.TableElementType], TableType.TableElementType]

    Attributes
    protected
  46. def toString(): String

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

    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.

  48. def updateFinder(entity: T): F

    Update finder

    Update finder

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

    Update validator

    Update validator

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

    Updater

    Updater

    Attributes
    protected
  51. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped