Class BaseMappableCrudEntityService<P>

java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseMappableCrudEntityService<P>
Type Parameters:
P - The business domain type
All Implemented Interfaces:
MappableCrudEntityService<P>
Direct Known Subclasses:
BaseRsqlMappableCrudEntityService

public class BaseMappableCrudEntityService<P> extends Object implements MappableCrudEntityService<P>
Real-world service implementations of MappableCrudEntityService can extend from this class as a convenience to inherit CRUD behavior for a particular business domain type. By default, this class in turn defers to MappableCrudEntityHelper in order to allow easier refactoring of core functionality.

If a service implementation spans several repository types, then it is recommended to inject the MappableCrudEntityHelper rather than extend this class.

Author:
Nathan Moore (nathandmoore)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected P
     
    <D, R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware>
    P
    create(P businessInstance)
    Create an instance of an entity based on a business instance containing relevant property values.
    <D, R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware>
    List<P>
    createAll(List<P> businessInstances)
    Create multiple instances of an entity at once based on the business instances containing relevant property values.
    <D, R extends org.springframework.data.repository.CrudRepository<D, String> & com.broadleafcommerce.common.extension.DomainTypeAware>
    BulkPersistenceResponse<P>
    Creates multiple instances of an entity at once based on the business instances containing relevant property values.
    void
    Perform a delete operation on the entity identified by the id.
     
    protected org.springframework.data.repository.PagingAndSortingRepository<?,String>
     
    Read a list of instances in the form of the business instance.
    org.springframework.data.domain.Page<P>
    readAll(org.springframework.data.domain.Pageable pageable)
    Read a page of entity instances in the form of business instances.
    readAll(org.springframework.data.domain.Sort sort)
    Read a list of instances in the form of the business instance.
    Reads all entity instances matching the provided ids.
    Read a single instance of an entity in the form of a business domain.
    replace(String id, P businessInstance)
    Replace a single instance of an entity based on a business instance containing relavant property values.
    replaceAll(List<Update<P>> replacements)
    Replace multiple instances of an entity at once based on the business instance containing relevant property values.
    Replace multiple instances of an entity at once based on the business instances containing relevant property values.
    update(String id, P businessInstance)
    Update a single instance of an entity based on a business instance containing relevant property values.
    updateAll(List<Update<P>> updates)
    A bulk operation that updates all of the items managed by the backing repository in the form of the business entity containing property values.
    Updates all of the items managed by the backing repository in the form of the business instances containing property values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait