trait PersistableRepository[T <: AggregateRoot] extends Repository[T]
Service for doing CRUD operations.
It can be used for applying changes on aggregate root
to the remote server.
- T
type of
aggregate root
- Alphabetic
- By Inheritance
- PersistableRepository
- Repository
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def find(uris: Seq[String]): Future[IndexedSeq[T]]
Returns a Seq of domain objects uniquely represented with their URIs.
Returns a Seq of domain objects uniquely represented with their URIs. Only found objects will be returned (Seq will be empty if no objects are found).
- uris
sequence of unique identifiers
- returns
future to found domain objects
- Definition Classes
- Repository
- abstract def persist(inserts: Seq[T], updates: Seq[(T, T)], deletes: Seq[T]): Future[IndexedSeq[String]]
Apply local changes to the persistent store.
Apply local changes to the persistent store.
- inserts
new aggregate roots
- updates
pairs for updating old aggregate to new state
- deletes
aggregate roots which will be deleted
- returns
future uris of newly created aggregates
Concrete 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()
- def delete(delete: T): Future[Unit]
Deleting an
aggregate.Deleting an
aggregate.- delete
aggregate root to delete
- returns
future for error checking
- def delete(deletes: Seq[T]): Future[Unit]
Bulk delete.
Bulk delete. Remote multiple
aggregates.- deletes
aggregate roots to delete
- returns
future for error checking
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(uri: String): Future[Option[T]]
Returns a domain object uniquely represented with its URI.
Returns a domain object uniquely represented with its URI. If object is not found, an exception will be thrown
- uri
domain object identity
- returns
future to found domain object
- Definition Classes
- Repository
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def insert(insert: T): Future[String]
Insert a single
aggregate.Insert a single
aggregate.- insert
new aggregate root
- returns
future uri of created aggregate root
- def insert(inserts: Seq[T]): Future[IndexedSeq[String]]
Bulk insert.
Bulk insert. Create multiple new
aggregates.- inserts
new aggregate roots
- returns
future uris of created aggregate roots
- 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 def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def update(old: T, current: T): Future[Unit]
Changing state of an aggregate root.
Changing state of an aggregate root.
- old
old version of aggregate root
- current
current version of aggregate root
- returns
future for error checking
- def update(update: T): Future[Unit]
Changing state of an aggregate root.
Changing state of an aggregate root.
- update
aggregate root to update
- returns
future for error checking
- def update(updates: Seq[T]): Future[Unit]
Bulk update.
Bulk update. Changing state of multiple
aggregates.- updates
sequence of aggregate roots to update
- returns
future for error checking
- 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()