com.dslplatform.api.patterns

PersistableRepository

trait PersistableRepository[T <: AggregateRoot] extends Repository[T]

Service for doing CRUD operations. It can be used for applying changes on AggregateRoot aggregate root to the remote server.

It should be used when Future is a preferred way of interacting with the remote server or bulk operations are required.

Linear Supertypes
Repository[T], SearchableRepository[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PersistableRepository
  2. Repository
  3. SearchableRepository
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def count(specification: Option[Specification[T]]): Future[Long]

    Returns a number of elements satisfying provided specification.

    Returns a number of elements satisfying provided specification.

    specification

    search predicate

    returns

    future to number of domain objects which satisfy specification

    Definition Classes
    SearchableRepository
  2. abstract def delete(delete: T): Future[_]

    Deleting an AggregateRoot aggregate.

    Deleting an AggregateRoot aggregate.

    delete

    aggregate root to delete

    returns

    future for error checking

  3. abstract def delete(deletes: TraversableOnce[T]): Future[_]

    Bulk delete.

    Bulk delete. Remote multiple AggregateRoot aggregates.

    deletes

    aggregate roots to delete

    returns

    future for error checking

  4. abstract def find(uri: String): Future[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
  5. abstract def find(uris: TraversableOnce[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
  6. abstract def insert(insert: T): Future[String]

    Insert a single AggregateRoot aggregate.

    Insert a single AggregateRoot aggregate.

    insert

    new aggregate root

    returns

    future uri of created aggregate root

  7. abstract def insert(inserts: TraversableOnce[T]): Future[IndexedSeq[String]]

    Bulk insert.

    Bulk insert. Create multiple new AggregateRoot aggregates.

    inserts

    new aggregate roots

    returns

    future uris of created aggregate roots

  8. abstract def persist(inserts: TraversableOnce[T], updates: TraversableOnce[(T, T)], deletes: TraversableOnce[T]): Future[IndexedSeq[String]]

    Apply local changes to the remote server.

    Apply local changes to the remote server.

    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

  9. abstract def search(specification: Option[Specification[T]] = None, limit: Option[Int] = None, offset: Option[Int] = None, order: Map[String, Boolean] = Map.empty): Future[Seq[T]]

    Returns a Seq of domain objects satisfying Specification[TSearchable] specification with up to limit results.

    Returns a Seq of domain objects satisfying Specification[TSearchable] specification with up to limit results. offset can be used to skip initial results. order should be given as a Seq of pairs of where first is a property name and second is whether it should be sorted ascending over this property.

    specification

    search predicate

    limit

    maximum number of results

    offset

    number of results to be skipped

    order

    custom ordering

    returns

    future to domain objects which satisfy search predicate

    Definition Classes
    SearchableRepository
  10. abstract def update(update: T): Future[_]

    Changing state of an aggregate root.

    Changing state of an aggregate root.

    update

    aggregate root to update

    returns

    future for error checking

  11. abstract def update(updates: TraversableOnce[T]): Future[_]

    Bulk update.

    Bulk update. Changing state of multiple AggregateRoot aggregates.

    updates

    sequence of aggregate roots to update

    returns

    future for error checking

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def count(specification: Specification[T]): Future[Long]

    Helper method for counting domain objects.

    Helper method for counting domain objects. Returns a number of elements satisfying provided specification.

    specification

    search predicate

    returns

    future to number of domain objects which satisfy specification

    Definition Classes
    SearchableRepository
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  18. def search(specification: Specification[T], limit: Int): Future[Seq[T]]

    Helper method for searching domain objects.

    Helper method for searching domain objects. Returns a Seq of domain objects satisfying Specification[TSearchable] specification with up to limit results.

    specification

    search predicate

    limit

    maximum number of results

    returns

    future to domain objects which satisfy search predicate

    Definition Classes
    SearchableRepository
  19. def search(specification: Specification[T]): Future[Seq[T]]

    Helper method for searching domain objects.

    Helper method for searching domain objects. Returns a Seq of domain objects satisfying Specification[TSearchable] specification

    specification

    search predicate

    returns

    future to domain objects which satisfy search predicate

    Definition Classes
    SearchableRepository
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Repository[T]

Inherited from SearchableRepository[T]

Inherited from AnyRef

Inherited from Any

Ungrouped