Package

net.revenj

patterns

Permalink

package patterns

Visibility
  1. Public
  2. All

Type Members

  1. trait AggregateDomainEvent[TAgg <: AggregateRoot] extends DomainEvent

    Permalink
  2. trait AggregateDomainEventHandler[TAgg <: AggregateRoot, TDE <: AggregateDomainEvent[TAgg]] extends AnyRef

    Permalink
  3. trait AggregateRoot extends Identifiable

    Permalink

    Aggregate root is a meaningful object in the domain.

    Aggregate root is a meaningful object in the domain. It can be viewed as a write boundary for entities and value objects that will maintain write consistency.

    Usually it represents a single table, but can span several tables and can be used like document or similar data structure. Since every aggregate is also an entity, it has a unique identification represented by its URI.

    DSL example:

    module Todo {
      aggregate Task {
        Timestamp  startedAt;
        Timestamp? finishedAt;
        Int?       priority;
        Seq<Note>  notes;
      }
    
      value Note {
        Date   entered;
        String remark;
      }
    }
  4. trait AsyncDomainEventStore[T <: DomainEvent] extends DomainEventStore[T]

    Permalink
  5. trait AsyncEvent extends DomainEvent

    Permalink
  6. trait Cacheable extends AnyRef

    Permalink
  7. trait ChangeTracking[T] extends Comparable[T]

    Permalink
  8. trait Command extends Event with ValidationErrors

    Permalink
  9. trait CommandLog[T <: Command] extends Identifiable with NestedValue[T]

    Permalink
  10. trait DataCache[T <: Identifiable] extends Repository[T]

    Permalink
  11. trait DataChangeNotification extends AnyRef

    Permalink
  12. trait DataContext extends AnyRef

    Permalink
  13. trait DataSource extends AnyRef

    Permalink

    Domain object that can be queried.

    Domain object that can be queried. Server supports custom objects, such as SQL and LINQ objects which are not entities, but can be queried using specifications and other methods

    DSL example:

    module Legacy {
      sql Town 'SELECT id, name FROM town' {
        Int    id;
        String name;
      }
    }
  14. trait DataSourceCache[T <: Identifiable] extends DataCache[T] with SearchableRepository[T]

    Permalink
  15. trait DependencyTracking extends AnyRef

    Permalink
  16. trait DomainEvent extends Event with Identifiable

    Permalink

    Domain event represents an meaningful business event that occurred in the system.

    Domain event represents an meaningful business event that occurred in the system. It is a message that back-end system knows how to process and that will change the state of the system.

    They are preferred way of manipulating data instead of simple CUD operations (create, update, delete). Unlike aggregate domain event which is tied to a change in a single aggregate root, domain event should be used when an action will result in modifications to multiple aggregates, external call (like sending an email) or some other action.

    By default event will be applied immediately. If async is used, event will be stored immediately but applied later.

    DomainEvent is defined in DSL with keyword event.

    module Todo {
      aggregate Task;
      event MarkDone {
        Task task;
      }
    }
  17. trait DomainEventHandler[T] extends AnyRef

    Permalink
  18. trait DomainEventStore[T <: DomainEvent] extends EventStore[T] with Repository[T] with SearchableRepository[T]

    Permalink
  19. trait DomainModel extends AnyRef

    Permalink
  20. trait EagerNotification extends DataChangeNotification

    Permalink
  21. trait Event extends AnyRef

    Permalink
  22. trait EventStore[T <: Event] extends AnyRef

    Permalink
  23. trait EventStoreAspect[T <: Event] extends AnyRef

    Permalink
  24. trait History[T <: ObjectHistory] extends Identifiable

    Permalink
  25. trait Identifiable extends DataSource

    Permalink

    Domain object uniquely represented by its URI.

    Domain object uniquely represented by its URI. Entity and snowflake are example of domain objects which are identified by its identity, instead of attributes. While entity does not implement Identifiable, aggregate root does.

  26. trait NestedValue[TValue] extends AnyRef

    Permalink
  27. trait ObjectHistory extends Identifiable

    Permalink
  28. trait OlapCubeQuery[T <: DataSource] extends AnyRef

    Permalink

    Olap cube is online analytical processing concept used for extracting business intelligence.

    Olap cube is online analytical processing concept used for extracting business intelligence. At it's core it's just a grouping of data by some dimensions and aggregation of values through facts. Facts can be sum, count, distinct and various others concepts. Cube can be made from various data sources: aggregates, snowflakes, SQL, LINQ, etc...

    DSL example:

    module Finance {
      aggregate Payment {
        Timestamp createdAt { versioning; }
        String    account;
        Money     total;
        calculated Int year from 'it => it.Year';
      }
    
      cube<Payment> Analysis {
        dimension account;
        dimension year;
        count     createdAt;
        sum       total;
      }
    }
  29. trait PersistableRepository[T <: AggregateRoot] extends Repository[T]

    Permalink

    Service for doing CRUD operations.

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

    T

    type of aggregate root

  30. trait PersistableRepositoryAspect[T <: AggregateRoot] extends AnyRef

    Permalink
  31. trait Report[T] extends AnyRef

    Permalink

    Report is concept for aggregating multiple calls into a single object.

    Report is concept for aggregating multiple calls into a single object. By providing search arguments and specifying queries with search predicates, order, limit and offset using LINQ data will be populated on the server.

    DSL example:

    module Blog {
      aggregate Post {
        Timestamp createdAt { versioning; }
        String    author;
        String    content;
      }
    
      report FindPosts {
        String? byAuthor;
        Date?   from;
        Set<Post>   postsFromAuthor 'it => it.author == byAuthor' ORDER BY createdAt;
        Array<Task> recentPosts 'it => it.createdAt >= from' LIMIT 20 ORDER BY createdAt DESC;
      }
    }
  32. trait ReportAspect[R, T <: Report[R]] extends AnyRef

    Permalink
  33. trait Repository[T <: Identifiable] extends AnyRef

    Permalink

    Service for finding Identifiable domain objects.

    Service for finding Identifiable domain objects. Finding domain objects using their URI identity is the fastest way retrieve an object from the repository.

    T

    IIdentifiable domain object type

  34. trait SearchableRepository[T <: DataSource] extends AnyRef

    Permalink

    Service for searching and counting domain objects.

    Service for searching and counting domain objects. Search can be performed using specification, paged using limit and offset arguments.

    T

    domain object type.

  35. trait ServiceLocator extends AnyRef

    Permalink

    Service for resolving other services.

    Service for resolving other services. One locator per project should be used.

    When multiple projects are used, locator must be passed around to resolve appropriate service.

    Custom classes can be resolved if their dependencies can be satisfied.

  36. trait Snapshot[T <: ObjectHistory] extends Identifiable

    Permalink
  37. trait Specification[T <: DataSource] extends (T) ⇒ Boolean

    Permalink

    Search predicate which can be used to filter domain objects from the remote server using searchable repository.

    Search predicate which can be used to filter domain objects from the remote server using searchable repository.

    Specification is defined in DSL with keyword specification and a predicate. Server can convert specification to SQL query on the fly or call database function created at compile time. Other optimization techniques can be used too.

    DSL example:

    module Todo {
      aggregate Task {
        Timestamp createdOn;
        specification findBetween
            'it => it.createdOn >= after && it.createdOn <= before' {
          Date after;
          Date before;
        }
      }
    }
    T

    domain object on which search will be performed.

  38. trait UnitOfWork extends DataContext with Closeable

    Permalink
  39. trait ValidationErrors extends AnyRef

    Permalink

Value Members

  1. object DataChangeNotification

    Permalink
  2. object OlapCubeQuery

    Permalink

Ungrouped