Updated and fixed in pagination service impl
This commit is contained in:
parent
950f2efaaf
commit
9275a814b4
@ -1,9 +1,11 @@
|
|||||||
package com.cubetiqs.data.service;
|
package com.cubetiqs.data.service;
|
||||||
|
|
||||||
|
import com.cubetiqs.data.domain.BaseEntity;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,7 +18,9 @@ import java.util.List;
|
|||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
@NoServiceBean
|
@NoServiceBean
|
||||||
public class PagingCrudServiceImpl<T, ID> extends AbstractCrudServiceImpl<T, ID> implements PagingCrudService<T, ID> {
|
public abstract class AbstractPagingCrudServiceImpl<T extends BaseEntity<ID>, ID extends Serializable>
|
||||||
|
extends AbstractCrudServiceImpl<T, ID>
|
||||||
|
implements PagingCrudService<T, ID> {
|
||||||
@Override
|
@Override
|
||||||
public Page<T> findAll(Pageable pageable) {
|
public Page<T> findAll(Pageable pageable) {
|
||||||
return getRepository().findAll(pageable);
|
return getRepository().findAll(pageable);
|
@ -65,5 +65,11 @@ public interface CrudService<T, ID> extends BaseService<T, ID> {
|
|||||||
*/
|
*/
|
||||||
void deleteAll(List<ID> ids);
|
void deleteAll(List<ID> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check entity exists within ID
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
boolean existsById(ID id);
|
boolean existsById(ID id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user