ca.shiftfocus.krispii.core.repositories

ComponentRepositoryPostgres

Related Doc: package repositories

class ComponentRepositoryPostgres extends ComponentRepository with PostgresRepository[Component]

Linear Supertypes
PostgresRepository[Component], ComponentRepository, Repository, Lifting[error.RepositoryError.Fail], Serialized, FutureMonad, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ComponentRepositoryPostgres
  2. PostgresRepository
  3. ComponentRepository
  4. Repository
  5. Lifting
  6. Serialized
  7. FutureMonad
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ComponentRepositoryPostgres()

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

  5. val CommonFields: String

  6. def CommonFieldsWithTable(table: String = Table): String

  7. val Delete: String

  8. val GroupBy: String

  9. val Insert: String

  10. val InsertAudio: String

  11. val InsertText: String

  12. val InsertVideo: String

  13. val Join: String

  14. val OrderBy: String

  15. val QMarks: String

  16. val RemoveAllFromParts: String

  17. val RemoveFromPart: String

  18. val SelectAll: String

  19. val SelectByPartId: String

  20. val SelectByProjectId: String

  21. val SelectEnabledByProjectId: String

  22. val SelectOne: String

  23. val SpecificFields: String

  24. val Table: String

  25. val Update: String

  26. val UpdateAudio: String

  27. val UpdateText: String

  28. val UpdateVideo: String

  29. def addToPart(component: Component, part: Part)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Unit]]

    Add this component to a Part.

    Add this component to a Part.

    component

    the component to be added

    part

    the part to add this component to

    returns

    a boolean indicating whether the operation was successful

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  30. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  31. def buildEntity[B](maybeResultSet: Option[ResultSet], build: (RowData) ⇒ B): \/[error.RepositoryError.Fail, B]

    Generic method to build an entity from postgresql database results, since the postgresql database may not return results.

    Generic method to build an entity from postgresql database results, since the postgresql database may not return results.

    B

    the type of entity to be built

    maybeResultSet

    an optional ResultSet returned from the database

    build

    a function that can build entities of type A from a RowData object

    returns

    a disjunction containing either a RepositoryError.Fail, or an object of type A

    Attributes
    protected
    Definition Classes
    PostgresRepository
  32. def buildEntityList[B](maybeResultSet: Option[ResultSet], build: (RowData) ⇒ B): \/[error.RepositoryError.Fail, IndexedSeq[B]]

    Generic method to build a list of entities from postgresql database results, since the postgresql database may not return results.

    Generic method to build a list of entities from postgresql database results, since the postgresql database may not return results.

    TODO: check in which case the database driver will return "None" instead of Some(ResultSet)

    B

    the type of entity to be built

    maybeResultSet

    an optional ResultSet returned from the database

    build

    a function that can build entities of type A from a RowData object

    returns

    a disjunction containing either a RepositoryError.Fail, or an object of type A

    Attributes
    protected
    Definition Classes
    PostgresRepository
  33. def cacheComponentKey(compId: UUID): String

    Definition Classes
    Repository
  34. def cacheComponentsKey(id: UUID): String

    Definition Classes
    Repository
  35. def cacheCourseKey(id: UUID): String

    Definition Classes
    Repository
  36. def cacheCourseSlugKey(slug: String): String

    Definition Classes
    Repository
  37. def cacheCoursesKey(id: UUID): String

    Definition Classes
    Repository
  38. def cacheExceptionKey(id: UUID): String

    Definition Classes
    Repository
  39. def cacheExceptionsKey(courseId: UUID, userId: UUID): String

    Definition Classes
    Repository
  40. def cacheExceptionsKey(courseId: UUID): String

    Definition Classes
    Repository
  41. def cachePartKey(id: UUID): String

    Definition Classes
    Repository
  42. def cachePartPosKey(projectId: UUID, partNum: Int): String

    Definition Classes
    Repository
  43. def cachePartsKey(projectId: UUID): String

    Definition Classes
    Repository
  44. def cacheProjectKey(id: UUID): String

    Definition Classes
    Repository
  45. def cacheProjectSlugKey(slug: String): String

    Definition Classes
    Repository
  46. def cacheProjectsKey(courseId: UUID): String

    Definition Classes
    Repository
  47. def cacheRoleKey(id: UUID): String

    Definition Classes
    Repository
  48. def cacheRoleNameKey(name: String): String

    Definition Classes
    Repository
  49. def cacheRolesKey(userId: UUID): String

    Definition Classes
    Repository
  50. def cacheScheduleKey(id: UUID): String

    Definition Classes
    Repository
  51. def cacheSchedulesKey(courseId: UUID): String

    Definition Classes
    Repository
  52. def cacheStudentsKey(id: UUID): String

    Definition Classes
    Repository
  53. def cacheTaskKey(id: UUID): String

    Definition Classes
    Repository
  54. def cacheTaskPosKey(projectId: UUID, partId: UUID, taskNum: Int): String

    Definition Classes
    Repository
  55. def cacheTasksKey(id: UUID): String

    Definition Classes
    Repository
  56. def cacheTeachingKey(id: UUID): String

    Definition Classes
    Repository
  57. def cacheUserKey(id: UUID): String

    Definition Classes
    Repository
  58. def cacheUsernameKey(username: String): String

    Definition Classes
    Repository
  59. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def constructor(row: RowData): Component

  61. def delete(component: Component)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Component]]

    Delete a component.

    Delete a component.

    component
    conn
    returns

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  62. implicit def eitherRunner[B](eithert: EitherT[Future, error.RepositoryError.Fail, B]): Future[\/[error.RepositoryError.Fail, B]]

    Definition Classes
    Lifting
  63. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  66. def find(id: UUID)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Component]]

    Find a single entry by ID.

    Find a single entry by ID.

    id

    the 128-bit UUID, as a byte array, to search for.

    returns

    an optional RowData object containing the results

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  67. implicit val futureMonad: Monad[Future]

    Definition Classes
    FutureMonad
  68. def getCached[V](key: String)(implicit cache: ScalaCache): Future[\/[error.RepositoryError.Fail, V]]

    Definition Classes
    Repository
  69. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  71. def insert(component: Component)(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, Component]]

    Insert a new component.

    Insert a new component.

    component

    the component to be inserted

    returns

    the newly created component

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  72. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  73. def lift[B]: (Future[\/[error.RepositoryError.Fail, B]]) ⇒ EitherT[Future, error.RepositoryError.Fail, B]

    Definition Classes
    Lifting
  74. def liftSeq[B](fIntermediate: Future[IndexedSeq[\/[error.RepositoryError.Fail, B]]])(implicit ec: ExecutionContext): EitherT[Future, error.RepositoryError.Fail, IndexedSeq[B]]

    Definition Classes
    Lifting
  75. def liftSeq[B](interList: IndexedSeq[Future[\/[error.RepositoryError.Fail, B]]])(implicit ec: ExecutionContext): EitherT[Future, error.RepositoryError.Fail, IndexedSeq[B]]

    Definition Classes
    Lifting
  76. def list(project: Project, user: User)(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Find all components enabled for a specific user, in a specific project.

    Find all components enabled for a specific user, in a specific project.

    project

    the project to search within

    user

    the user to search for

    returns

    an array of components

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  77. def list(project: Project)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Find all components in a specific project.

    Find all components in a specific project.

    project

    the project to search within

    returns

    an array of components

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  78. def list(part: Part)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Find all components belonging to a specific project part.

    Find all components belonging to a specific project part.

    part

    the part to search in

    returns

    an array of components

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  79. def list(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Find all components.

    Find all components.

    returns

    an array of components.

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  80. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  83. def predicate(fCondition: Future[Boolean])(fail: error.RepositoryError.Fail)(implicit ec: ExecutionContext): EitherT[Future, error.RepositoryError.Fail, Unit]

    Definition Classes
    Lifting
  84. def predicate(condition: Boolean)(fail: error.RepositoryError.Fail): EitherT[Future, error.RepositoryError.Fail, Unit]

    Definition Classes
    Lifting
  85. def putCache[V](key: String)(value: V, ttl: Option[Duration] = None)(implicit cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Unit]]

    Definition Classes
    Repository
  86. def queryList(queryText: String, parameters: Seq[Any] = Seq.empty[Any])(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Send a query to the database and retrieve a list of entities.

    Send a query to the database and retrieve a list of entities.

    queryText
    parameters
    conn
    returns

    Attributes
    protected
    Definition Classes
    PostgresRepository
  87. def queryNumRows(queryText: String, parameters: Seq[Any] = Seq.empty[Any])(compare: (Long) ⇒ Boolean)(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, Boolean]]

    Send query to the database and compare the number of rows affected.

    Send query to the database and compare the number of rows affected.

    queryText
    parameters
    conn
    returns

    Attributes
    protected
    Definition Classes
    PostgresRepository
  88. def queryOne(queryText: String, parameters: Seq[Any] = Seq.empty[Any])(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, Component]]

    Send query to the database and retrieve a single entity.

    Send query to the database and retrieve a single entity.

    queryText
    parameters
    conn
    returns

    Attributes
    protected
    Definition Classes
    PostgresRepository
  89. def removeCached(key: String)(implicit cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Unit]]

    Definition Classes
    Repository
  90. def removeFromPart(part: Part)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, IndexedSeq[Component]]]

    Remove all components from a part.

    Remove all components from a part.

    part
    conn
    returns

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  91. def removeFromPart(component: Component, part: Part)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Unit]]

    Remove this component from a Part.

    Remove this component from a Part.

    component

    the component to be removed

    part

    the part to remove this component from

    returns

    a boolean indicating whether the operation was successful

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  92. def serialized[E, R, L[E] <: IndexedSeq[E]](collection: L[E])(fn: (E) ⇒ Future[R])(implicit ec: ExecutionContext): Future[IndexedSeq[R]]

    Definition Classes
    Serialized
  93. def serializedT[E, R, L[E] <: IndexedSeq[E]](collection: L[E])(fn: (E) ⇒ Future[\/[error.RepositoryError.Fail, R]])(implicit ec: ExecutionContext): Future[\/[error.RepositoryError.Fail, IndexedSeq[R]]]

    Definition Classes
    Lifting
  94. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  95. def toString(): String

    Definition Classes
    AnyRef → Any
  96. val ttl: Some[FiniteDuration]

    Definition Classes
    Repository
  97. def update(component: Component)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Component]]

    Update an existing component

    Update an existing component

    component

    the component to be updated

    returns

    the updated component

    Definition Classes
    ComponentRepositoryPostgresComponentRepository
  98. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PostgresRepository[Component]

Inherited from ComponentRepository

Inherited from Repository

Inherited from Lifting[error.RepositoryError.Fail]

Inherited from Serialized

Inherited from FutureMonad

Inherited from AnyRef

Inherited from Any

Ungrouped