class PlayMongoRepository[A] extends MongoDatabaseCollection with ObservableFutureImplicits
Initialise a mongo repository.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- PlayMongoRepository
- ObservableFutureImplicits
- MongoDatabaseCollection
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new PlayMongoRepository(mongoComponent: MongoComponent, collectionName: String, domainFormat: Format[A], indexes: Seq[IndexModel], optSchema: Option[BsonDocument] = None, replaceIndexes: Boolean = false, extraCodecs: Seq[Codec[_]] = Seq.empty)(implicit arg0: ClassTag[A], ec: ExecutionContext)
- collectionName
the name of the mongo collection.
- domainFormat
a play Json format to map the domain to mongo entities.
- indexes
indexes to ensure are created.
- optSchema
optional - to validate entities written to the collection
- replaceIndexes
optional - default is false If true, existing indices should be removed/updated to match the provided indices. If false, any old indices are left behind, and indices with changed definitions will throw IndexConflict exceptions.
- extraCodecs
optional - to support more types
Type Members
- implicit class ObservableFuture[T] extends org.mongodb.scala.ObservableFuture[T]
- Definition Classes
- ObservableFutureImplicits
- implicit class SingleObservableFuture[T] extends org.mongodb.scala.SingleObservableFuture[T]
- Definition Classes
- ObservableFutureImplicits
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- lazy val collection: MongoCollection[A]
- final val collectionName: String
- Definition Classes
- PlayMongoRepository → MongoDatabaseCollection
- final val domainFormat: Format[A]
- def ensureIndexes(): Future[Seq[String]]
- def ensureSchema(): Future[Unit]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final val indexes: Seq[IndexModel]
- Definition Classes
- PlayMongoRepository → MongoDatabaseCollection
- lazy val initialised: Future[Unit]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final val optSchema: Option[BsonDocument]
- lazy val requiresTtlIndex: Boolean
Can be overridden if the repository manages it's own data cleanup.
Can be overridden if the repository manages it's own data cleanup.
A comment should be added to document why the repository does't require a ttl index if overriding.
- Attributes
- protected[mongo]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)