org.virtuslab.unicorn.repositories.Repositories

BaseRepository

Related Doc: package Repositories

abstract class BaseRepository[Entity, T <: slick.driver.JdbcProfile.API.Table[Entity]] extends (Repositories.this)#CommonRepositoryMethods[Entity, T]

Base for services for entities that have no type-safe id created - for example join tables.

Entity

type of entity

T

type of table

Linear Supertypes
(Repositories.this)#CommonRepositoryMethods[Entity, T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BaseRepository
  2. CommonRepositoryMethods
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseRepository(query: slick.driver.JdbcProfile.API.TableQuery[T])

    query

    base table query

Abstract Value Members

  1. abstract def exists(elem: Entity): slick.driver.JdbcProfile.API.DBIO[Boolean]

    Checks if element exists in database.

    Checks if element exists in database. It have to be implemented by user, because this is service for entities without an id and generic method could not be created.

    elem

    element to check for

    returns

    true if element exists in database

    Attributes
    protected

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def create(): slick.driver.JdbcProfile.API.DBIO[Unit]

    Creates table definition in database.

    Creates table definition in database.

    Definition Classes
    CommonRepositoryMethods
  7. def deleteAll(): slick.driver.JdbcProfile.API.DBIO[Int]

    Deletes all elements in table.

    Deletes all elements in table.

    returns

    number of deleted elements

    Definition Classes
    CommonRepositoryMethods
  8. def drop(): slick.driver.JdbcProfile.API.DBIO[Unit]

    Drops table definition from database.

    Drops table definition from database.

    Definition Classes
    CommonRepositoryMethods
  9. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findAll(): slick.driver.JdbcProfile.API.DBIO[Seq[Entity]]

    returns

    all elements of type A

    Definition Classes
    CommonRepositoryMethods
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

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

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  19. val query: slick.driver.JdbcProfile.API.TableQuery[T]

    base table query

  20. def save(elem: Entity)(implicit ec: ExecutionContext): slick.driver.JdbcProfile.API.DBIO[Entity]

    Saves one element.

    Saves one element. Warning - if element already exist, it's not updated.

    elem

    element to save

    returns

    elem itself

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from (Repositories.this)#CommonRepositoryMethods[Entity, T]

Inherited from AnyRef

Inherited from Any

Ungrouped