Class CrudService<Entity,ID,Dto extends DataTransferObject<Entity>,Pageable extends PaginatedListRequest,Repository extends org.springframework.data.jpa.repository.JpaRepository<Entity,ID> & QuerydslFastPagingRepository<Entity,ID>>

java.lang.Object
biz.devstack.springframework.boot.jpa.crud.CrudService<Entity,ID,Dto,Pageable,Repository>

public abstract class CrudService<Entity,ID,Dto extends DataTransferObject<Entity>,Pageable extends PaginatedListRequest,Repository extends org.springframework.data.jpa.repository.JpaRepository<Entity,ID> & QuerydslFastPagingRepository<Entity,ID>> extends Object
  • Constructor Details

    • CrudService

      public CrudService()
  • Method Details

    • getPaginatedList

      public org.springframework.data.domain.Page<Entity> getPaginatedList(Pageable pageable)
    • getById

      public Entity getById(ID id)
    • create

      public Entity create(Dto dto)
    • updateById

      public Entity updateById(ID id, Dto dto)
    • deleteById

      public void deleteById(ID id)
    • hookCreate

      protected Entity hookCreate(Entity entity, Dto dto)
    • hookUpdate

      protected Entity hookUpdate(Entity entity, Dto dto)
    • buildPaginatedListPredicate

      protected com.querydsl.core.types.Predicate buildPaginatedListPredicate(Pageable pageable)
    • injectRepository

      protected abstract Repository injectRepository()