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 Summary
Modifier and TypeMethodDescriptionadd
(PersistencePackage persistencePackage) This will throw aValidationException
and not attempt to swallow them and wrap any other exceptions within aServiceException
that might have resulted in adding the given package.fetch
(PersistencePackage persistencePackage, CriteriaTransferObject cto) inspect
(PersistencePackage persistencePackage) Builds all of the metadata associated with a particular request for an entity.nonTransactionalAdd
(PersistencePackage persistencePackage) The exact same asadd(PersistencePackage)
except this is not bound to a transaction.nonTransactionalFetch
(PersistencePackage persistencePackage, CriteriaTransferObject cto) nonTransactionalInspect
(PersistencePackage persistencePackage) nonTransactionalRemove
(PersistencePackage persistencePackage) The exact same asremove(PersistencePackage)
except this is not bound to a transaction.nonTransactionalUpdate
(PersistencePackage persistencePackage) The exact same asupdate(PersistencePackage)
except this is not bound to a transaction.remove
(PersistencePackage persistencePackage) update
(PersistencePackage persistencePackage)
-
Method Details
-
inspect
@PreAuthorize("isAuthenticated()") PersistenceResponse inspect(PersistencePackage persistencePackage) throws ServiceException Builds all of the metadata associated with a particular request for an entity. The resultingPersistenceResponse
that is returned will not have thePersistenceResponse.getEntity()
property set and this will return null. Instead, this will populatePersistenceResponse.getDynamicResultSet()
.- Parameters:
persistencePackage
- the package that should be passed through the admin pipeline to build the metadata- Returns:
- a
PersistenceResponse
with thePersistenceResponse.getDynamicResultSet()
set with the metadata of the built properties for this particular entity - Throws:
ServiceException
- wraps whatever internal exception that might have occurred as a result of the inspect
-
nonTransactionalInspect
@PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalInspect(PersistencePackage persistencePackage) throws ServiceException - Throws:
ServiceException
-
fetch
@PreAuthorize("isAuthenticated()") PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Throws:
ServiceException
-
nonTransactionalFetch
@PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalFetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Throws:
ServiceException
-
add
@PreAuthorize("isAuthenticated()") PersistenceResponse add(PersistencePackage persistencePackage) throws ServiceException This will throw aValidationException
and not attempt to swallow them and wrap any other exceptions within aServiceException
that might have resulted in adding the given package.- Parameters:
persistencePackage
-- Returns:
- Throws:
ServiceException
-
nonTransactionalAdd
@PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalAdd(PersistencePackage persistencePackage) throws ServiceException The exact same asadd(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:
ServiceException
-
update
@PreAuthorize("isAuthenticated()") PersistenceResponse update(PersistencePackage persistencePackage) throws ServiceException - Throws:
ServiceException
-
nonTransactionalUpdate
@PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalUpdate(PersistencePackage persistencePackage) throws ServiceException The exact same asupdate(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:
ServiceException
-
remove
@PreAuthorize("isAuthenticated()") PersistenceResponse remove(PersistencePackage persistencePackage) throws ServiceException - Throws:
ServiceException
-
nonTransactionalRemove
@PreAuthorize("isAuthenticated()") PersistenceResponse nonTransactionalRemove(PersistencePackage persistencePackage) throws ServiceException The exact same asremove(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:
ServiceException
-