Interface CustomPersistenceHandler

All Superinterfaces:
org.springframework.core.Ordered
All Known Implementing Classes:
AdminPermissionCustomPersistenceHandler, AdminUserCustomPersistenceHandler, ClassCustomPersistenceHandlerAdapter, CustomPersistenceHandlerAdapter, SystemPropertyCustomPersistenceHandler, TranslationCustomPersistenceHandler

public interface CustomPersistenceHandler extends org.springframework.core.Ordered
Custom Persistence Handlers provide a hook to override the normal persistence behavior of the admin application. This is useful when an alternate pathway for working with persisted data is desirable. For example, if you want to work directly with a service API, rather than go through the standard admin persistence pipeline. In such a case, you can use Spring to inject an instance of your service into your custom persistence handler and utilize that service to work with your entity. The implementation is responsible for converting domain object into the return type required by the admin. Helper classes are passed in to assist with conversion operations.
Author:
Jeff Fischer
  • Field Details

  • Method Details

    • canHandleInspect

      Boolean canHandleInspect(PersistencePackage persistencePackage)
      Is this persistence handler capable of dealing with an inspect request from the admin
      Parameters:
      persistencePackage - details about the inspect operation
      Returns:
      whether or not this handler supports inspects
    • canHandleFetch

      Boolean canHandleFetch(PersistencePackage persistencePackage)
      Is this persistence handler capable of dealing with an fetch request from the admin
      Parameters:
      persistencePackage - details about the fetch operation
      Returns:
      whether or not this handler supports fetches
    • canHandleAdd

      Boolean canHandleAdd(PersistencePackage persistencePackage)
      Is this persistence handler capable of dealing with an add request from the admin
      Parameters:
      persistencePackage - details about the add operation
      Returns:
      whether or not this handler supports adds
    • canHandleRemove

      Boolean canHandleRemove(PersistencePackage persistencePackage)
      Is this persistence handler capable of dealing with a remove request from the admin
      Parameters:
      persistencePackage - details about the remove operation
      Returns:
      whether or not this handler supports remove
    • canHandleUpdate

      Boolean canHandleUpdate(PersistencePackage persistencePackage)
      Is this persistence handler capable of dealing with an update request from the admin
      Parameters:
      persistencePackage - details about the update operation
      Returns:
      whether or not this handler supports updatess
    • willHandleSecurity

      Boolean willHandleSecurity(PersistencePackage persistencePackage)
    • inspect

      DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • fetch

      DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • add

      Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • remove

      void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • update

      Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException