Class ArchiveStatusPersistenceEventHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.PersistenceManagerEventHandlerAdapter
org.broadleafcommerce.openadmin.server.service.persistence.ArchiveStatusPersistenceEventHandler
- All Implemented Interfaces:
PersistenceManagerEventHandler,org.springframework.core.Ordered
@Component("blArchiveStatusPersistenceEventHandler")
public class ArchiveStatusPersistenceEventHandler
extends PersistenceManagerEventHandlerAdapter
Adds
FilterMapping to the CriteriaTransferObject's CriteriaTransferObject.getAdditionalFilterMappings()
in order to exclude by default any entities that are archived.- Author:
- Phillip Verheyden (phillipuniverse)
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()preFetch(PersistenceManager persistenceManager, PersistencePackage persistencePackage, CriteriaTransferObject cto) Called prior to a fetch, which is a request for one or more persisted entitiesMethods inherited from class org.broadleafcommerce.openadmin.server.service.persistence.PersistenceManagerEventHandlerAdapter
postAdd, postFetch, postInspect, postRemove, postUpdate, preAdd, preInspect, preRemove, preUpdate, processValidationError
-
Field Details
-
extensionManager
-
-
Constructor Details
-
ArchiveStatusPersistenceEventHandler
public ArchiveStatusPersistenceEventHandler()
-
-
Method Details
-
preFetch
public PersistenceManagerEventHandlerResponse preFetch(PersistenceManager persistenceManager, PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException Description copied from interface:PersistenceManagerEventHandlerCalled prior to a fetch, which is a request for one or more persisted entities- Specified by:
preFetchin interfacePersistenceManagerEventHandler- Overrides:
preFetchin classPersistenceManagerEventHandlerAdapter- Parameters:
persistenceManager- the PersistenceManager instance making the callpersistencePackage- the descriptive information for the callcto- the criteria describing the parameters of the fetch - converted into the where clause for the select query- Returns:
- the response containing any changes, status or additional data
- Throws:
ServiceException
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Overrides:
getOrderin classPersistenceManagerEventHandlerAdapter
-