O'Reilly logo

Implementing Domain-Driven Design by Vaughn Vernon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coherence Implementation

As we did with the collection-oriented Repository, we first define an interface and then its implementation. Here’s a persistence-oriented interface that defines save-based methods that are used for the Oracle Coherence data grid:

package com.saasovation.agilepm.domain.model.product; import java.util.Collection; import com.saasovation.agilepm.domain.model.tenant.Tenant; public interface ProductRepository  {     public ProductId nextIdentity();     public Collection<Product> allProductsOfTenant(Tenant aTenant);     public Product productOfId(Tenant aTenant, ProductId aProductId);     public void remove(Product aProduct);     public void removeAll(Collection<Product> aProductCollection); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required