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); ...
Get Implementing Domain-Driven Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.