Interface DynamicEntityService

All Known Implementing Classes:
DynamicEntityRemoteService

public interface DynamicEntityService
Rather than using this clas directly, it might be more appropraite to utilize AdminEntityService instead. The methods in this class will not attempt to recover from things like validation problems whereas AdminEntityService will.
Author:
jfischer
  • Method Details

    • inspect

      @PreAuthorize("isAuthenticated()") PersistenceResponse inspect(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      Builds all of the metadata associated with a particular request for an entity. The resulting PersistenceResponse that is returned will not have the PersistenceResponse.getEntity() property set and this will return null. Instead, this will populate PersistenceResponse.getDynamicResultSet().
      Parameters:
      persistencePackage - the package that should be passed through the admin pipeline to build the metadata
      Returns:
      a PersistenceResponse with the PersistenceResponse.getDynamicResultSet() set with the metadata of the built properties for this particular entity
      Throws:
      org.broadleafcommerce.common.exception.ServiceException - wraps whatever internal exception that might have occurred as a result of the inspect
    • nonTransactionalInspect

      @PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalInspect(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • fetch

      @PreAuthorize("isAuthenticated()") PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • nonTransactionalFetch

      @PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalFetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • add

      @PreAuthorize("isAuthenticated()") PersistenceResponse add(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      This will throw a ValidationException and not attempt to swallow them and wrap any other exceptions within a ServiceException that might have resulted in adding the given package.
      Parameters:
      persistencePackage -
      Returns:
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • nonTransactionalAdd

      @PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalAdd(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      The exact same as add(PersistencePackage) except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple adds).
      Parameters:
      persistencePackage -
      Returns:
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • update

      @PreAuthorize("isAuthenticated()") PersistenceResponse update(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • nonTransactionalUpdate

      @PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalUpdate(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      The exact same as update(PersistencePackage) except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple updates).
      Parameters:
      persistencePackage -
      Returns:
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • remove

      @PreAuthorize("isAuthenticated()") PersistenceResponse remove(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • nonTransactionalRemove

      @PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalRemove(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException
      The exact same as remove(PersistencePackage) except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple removes).
      Parameters:
      persistencePackage -
      Returns:
      Throws:
      org.broadleafcommerce.common.exception.ServiceException