Package io.easywalk.simply.serviceable
Class AbstractServiceable<T extends io.easywalk.simply.specification.serviceable.annotations.SimplyEntity,ID>
- java.lang.Object
-
- io.easywalk.simply.serviceable.AbstractServiceable<T,ID>
-
- All Implemented Interfaces:
io.easywalk.simply.specification.SimplySpec<T,ID>
public abstract class AbstractServiceable<T extends io.easywalk.simply.specification.serviceable.annotations.SimplyEntity,ID> extends java.lang.Object implements io.easywalk.simply.specification.SimplySpec<T,ID>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.data.jpa.repository.JpaRepository<T,ID>repository
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractServiceable(org.springframework.data.jpa.repository.JpaRepository<T,ID> repository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate(T entity)voiddelete(T entity)voiddeleteById(ID id)Tget(ID id)java.util.List<T>getAll()TreplaceById(ID id, T replace)TupdateById(ID id, java.util.Map<java.lang.String,java.lang.Object> fields)
-
-
-
Method Detail
-
create
public T create(T entity) throws javax.persistence.EntityExistsException, org.springframework.dao.DataIntegrityViolationException
-
updateById
public T updateById(ID id, java.util.Map<java.lang.String,java.lang.Object> fields) throws java.lang.Throwable
-
deleteById
public void deleteById(ID id)
-
delete
public void delete(T entity)
-
replaceById
public T replaceById(ID id, T replace) throws javax.persistence.EntityNotFoundException
-
-