Class

org.virtuslab.unicorn.repositories.Repositories

BaseRepository

Related Doc: package Repositories

Permalink

abstract class BaseRepository[Entity, T <: slick.jdbc.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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    query

    base table query

Abstract Value Members

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

    Permalink

    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

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

    Permalink

    Creates table definition in database.

    Creates table definition in database.

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

    Permalink

    Deletes all elements in table.

    Deletes all elements in table.

    returns

    number of deleted elements

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

    Permalink

    Drops table definition from database.

    Drops table definition from database.

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

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

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

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

    Permalink

    returns

    all elements of type A

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

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

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

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

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

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

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

    Permalink

    base table query

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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped