public abstract class AbstractCrudService<E extends PersistentObject,D extends GenericHibernateDao<E,Integer>> extends AbstractDaoService<E,D>
AbstractDaoServicedao, LOG| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCrudService(Class<E> entityClass)
Constructor that sets the concrete entity class for the service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(E e) |
List<E> |
findAll() |
E |
findById(Integer id)
Return the real object from the database.
|
E |
loadById(int id)
Return a proxy of the object (without hitting the database).
|
void |
saveOrUpdate(E e) |
E |
updatePartialWithJsonNode(E entity,
com.fasterxml.jackson.databind.JsonNode jsonObject,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
getDao, getEntityClass, setDao@PreAuthorize(value="hasRole(@configHolder.getSuperAdminRoleName()) or (#e.id == null and hasPermission(#e, \'CREATE\')) or (#e.id != null and hasPermission(#e, \'UPDATE\'))") public void saveOrUpdate(E e)
e - @PreAuthorize(value="hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#entity, \'UPDATE\')") public E updatePartialWithJsonNode(E entity, com.fasterxml.jackson.databind.JsonNode jsonObject, com.fasterxml.jackson.databind.ObjectMapper objectMapper) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
jsonObject - entity - IOExceptioncom.fasterxml.jackson.core.JsonProcessingException@PostAuthorize(value="hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(returnObject, \'READ\')") public E findById(Integer id)
id - @PostAuthorize(value="hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(returnObject, \'READ\')") public E loadById(int id)
id - @PostFilter(value="hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, \'READ\')") public List<E> findAll()
@PreAuthorize(value="hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#e, \'DELETE\')") public void delete(E e)
e - Copyright © 2016 terrestris GmbH & Co. KG. All rights reserved.