ca.shiftfocus.krispii.core.repositories

ProjectRepositoryPostgres

Related Doc: package repositories

class ProjectRepositoryPostgres extends ProjectRepository with PostgresRepository[Project]

Linear Supertypes
PostgresRepository[Project], ProjectRepository, Repository, Lifting[error.RepositoryError.Fail], Serialized, FutureMonad, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ProjectRepositoryPostgres
  2. PostgresRepository
  3. ProjectRepository
  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 ProjectRepositoryPostgres(partRepository: PartRepository)

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 Delete: String

  5. val Fields: String

  6. val FieldsWithTable: String

  7. val Insert: String

  8. val ListByCourse: String

  9. val QMarks: String

  10. val SelectAll: String

  11. val SelectOne: String

  12. val SelectOneBySlug: String

  13. val SelectOneForUser: String

  14. val Table: String

  15. val Update: String

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. 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
  18. 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
  19. def cacheComponentKey(compId: UUID): String

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Repository
  45. def clone(): AnyRef

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

  47. def delete(project: Project)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Project]]

    Delete a single project.

    Delete a single project.

    project

    The project to be deleted.

    conn

    An implicit connection object. Can be used in a transactional chain.

    returns

    a boolean indicator whether the deletion was successful.

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

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

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

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

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

    Find a project by slug.

    Find a project by slug.

    slug

    The project slug to search by.

    returns

    an optional RowData object containing the results

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  53. def find(projectId: UUID, user: User)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Project]]

    Find project by ID and User (teacher || student).

    Find project by ID and User (teacher || student).

    projectId

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

    returns

    an optional Project if one was found

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  54. def find(id: UUID)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Project]]

    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 Project if one was found

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  55. implicit val futureMonad: Monad[Future]

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

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

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

    Definition Classes
    AnyRef → Any
  59. def insert(project: Project)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Project]]

    Save a Project row.

    Save a Project row.

    project

    The new project to save.

    conn

    An implicit connection object. Can be used in a transactional chain.

    returns

    the new project

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  60. final def isInstanceOf[T0]: Boolean

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

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

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

    Definition Classes
    Lifting
  64. def list(course: Course)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, IndexedSeq[Project]]]

    Find all Projects belonging to a given course.

    Find all Projects belonging to a given course.

    course

    The section to return projects from.

    returns

    a vector of the returned Projects

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

    Find all Projects.

    Find all Projects.

    returns

    a vector of the returned Projects

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  66. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  69. val partRepository: PartRepository

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

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

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

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

    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
  74. 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
  75. def queryOne(queryText: String, parameters: Seq[Any] = Seq.empty[Any])(implicit conn: Connection): Future[\/[error.RepositoryError.Fail, Project]]

    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
  76. def removeCached(key: String)(implicit cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Unit]]

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

    Definition Classes
    Serialized
  78. 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
  79. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  80. def toString(): String

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

    Definition Classes
    Repository
  82. def update(project: Project)(implicit conn: Connection, cache: ScalaCache): Future[\/[error.RepositoryError.Fail, Project]]

    Save a Project row.

    Save a Project row.

    project

    The project to update.

    conn

    An implicit connection object. Can be used in a transactional chain.

    returns

    the updated project.

    Definition Classes
    ProjectRepositoryPostgresProjectRepository
  83. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PostgresRepository[Project]

Inherited from ProjectRepository

Inherited from Repository

Inherited from Lifting[error.RepositoryError.Fail]

Inherited from Serialized

Inherited from FutureMonad

Inherited from AnyRef

Inherited from Any

Ungrouped