Class

model.persistence

UnCachedPersistence

Related Doc: package persistence

Permalink

abstract class UnCachedPersistence[Key, _IdType <: Option[Key], CaseClass <: HasId[CaseClass, _IdType]] extends AnyRef

Accesses the table for each query. You can use this abstract class to derive DAOs for case classes that must have direct access to the database so the case classes are not cached. You don't have to subclass UnCachedPersistence, but if you do then the DAOs for your cached domain objects will have the same interface as the DAOs for your uncached domain objects.

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

Instance Constructors

  1. new UnCachedPersistence()(implicit arg0: ClassTag[CaseClass])

    Permalink

Abstract Value Members

  1. abstract def _deleteById: (Id[_IdType]) ⇒ Unit

    Permalink

    Encapsulates the Quill query that deletes the instance of the case class with the given Id from the database

  2. abstract def _findAll: List[CaseClass]

    Permalink

    Encapsulates the Quill query that returns all instances of the case class from the database

  3. abstract def _findById: (Id[_IdType]) ⇒ Option[CaseClass]

    Permalink

    Encapsulates the Quill query that optionally returns the instance of the case class from the database with the given Id, or None if not found.

  4. abstract def _insert: (CaseClass) ⇒ CaseClass

    Permalink

    Encapsulates the Quill query that inserts the given instance of the case class into the database, and returns the case class as it was stored, including any auto-increment fields.

  5. abstract def _update: (CaseClass) ⇒ CaseClass

    Permalink

    Encapsulates the Quill query that updates the given instance of the case class into the database, and returns the entity.

    Encapsulates the Quill query that updates the given instance of the case class into the database, and returns the entity. Throws an Exception if the case class was not previously persisted.

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. val className: String

    Permalink
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val copyUpdate: (CaseClass, Id[_IdType]) ⇒ CaseClass

    Permalink
    Attributes
    protected
  8. def delete(caseClass: CaseClass): Unit

    Permalink
    Annotations
    @inline()
  9. def deleteById(id: Id[_IdType]): Unit

    Permalink
    Annotations
    @inline()
  10. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def findAll: List[CaseClass]

    Permalink
    Annotations
    @inline()
  14. def findAllFromDB: List[CaseClass]

    Permalink

    Always fetches from the database; bypass cache, useful for startup code.

    Always fetches from the database; bypass cache, useful for startup code. See also CachedPersistence.findAll

    Annotations
    @inline()
  15. def findById(id: Id[_IdType]): Option[CaseClass]

    Permalink
    Annotations
    @inline()
  16. def findByIdFromDB(id: Id[_IdType]): Option[CaseClass]

    Permalink

    Always fetches from the database; bypass cache, useful for startup code.

    Always fetches from the database; bypass cache, useful for startup code. See also findById

    Annotations
    @inline()
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getId(t: CaseClass): Id[Key]

    Permalink
    Annotations
    @inline()
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def insert(caseClass: CaseClass): CaseClass

    Permalink

    Sanitizes and inserts caseClass.

    Sanitizes and inserts caseClass. Does not check to see if caseClass was previously persisted

    Annotations
    @inline()
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. val logger: Logger

    Permalink
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. def remove(t: CaseClass): Unit

    Permalink

    Searches by CaseClass.id

    Searches by CaseClass.id

    returns

    true if CaseClass was removed (false if the CaseClass was not defined prior)

    Annotations
    @inline()
  27. val sanitize: (CaseClass) ⇒ CaseClass

    Permalink
    Attributes
    protected
  28. def setAutoInc(implicit ctx: JdbcContext[_, _]): Unit

    Permalink

    This method only has relevance for Postgres databases; it ensures that the next autoInc value is properly set when the app starts.

    This method only has relevance for Postgres databases; it ensures that the next autoInc value is properly set when the app starts. Assumes that column named id is present, and that $${ tableName }_id_seq exists. There is no harm in invoking this method of other types of databases, because it does not do anything unless the database is Postgres.

    Annotations
    @inline()
    See also

    https://stackoverflow.com/a/244265/553865 List sequences with

    \ds
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. lazy val tableName: String

    Permalink
  31. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  32. def update(caseClass: CaseClass): CaseClass

    Permalink

    Sanitizes and updates caseClass.

    Sanitizes and updates caseClass. Does not check to see if caseClass was previously persisted

    Annotations
    @inline()
  33. def upsert(caseClass: CaseClass): CaseClass

    Permalink

    Sanitizes and inserts or updates caseClass

    Sanitizes and inserts or updates caseClass

    Annotations
    @inline()
  34. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def zap(): Unit

    Permalink
    Annotations
    @inline()

Inherited from AnyRef

Inherited from Any

Ungrouped