public interface CRUDServiceLocal<E extends BaseEntity,DTO extends EntityDTO,D extends EntityData<DTO>,DP> extends CRUDService<DTO,D,DP>
CRUDService, allowing working directly with the entities| Modifier and Type | Method and Description |
|---|---|
<T extends E> |
find(java.lang.Long id)
Finds the entity with the given id
|
<T extends E> |
findAll(java.lang.Iterable<java.lang.Long> ids)
Finds all entities with the given ids.
|
java.lang.Class<E> |
getEntityClass()
It returns the entity with which this service operates.
|
E |
newEntity(DP params)
Instantiates a new, empty entity.
|
void |
remove(E entity)
Removes the given entity
|
void |
removeAll(java.lang.Iterable<E> entities)
Removes all the given entities
|
DTO |
toDTO(E entity)
Converts the given entity to DTO
|
E |
toEntity(DTO dto)
Converts the given DTO to entity
|
void |
validate(DTO dto)
Validates the given DTO without saving it
|
getData, getDataForNew, load, remove, removeAll, save<T extends E> T find(java.lang.Long id)
<T extends E> java.util.Set<T> findAll(java.lang.Iterable<java.lang.Long> ids)
EntityNotFoundException will be thrown if any of the given ids are
invalidjava.lang.Class<E> getEntityClass()
E newEntity(DP params)
void remove(E entity)
void removeAll(java.lang.Iterable<E> entities)
void validate(DTO dto)
ValidationException - When the given DTO was invalid