Package org.joinfaces.primefaces
Class SpringDataLazyDataModel<T,ID,R extends CrudRepository<T,ID> & PagingAndSortingRepository<T,ID>>
java.lang.Object
jakarta.faces.model.DataModel<E>
jakarta.faces.model.ListDataModel<T>
org.primefaces.model.LazyDataModel<T>
org.joinfaces.primefaces.SpringDataLazyDataModel<T,ID,R>
- Type Parameters:
T
- the domain type the repository managesID
- the type of the id of the entity the repository managesR
-
- All Implemented Interfaces:
Serializable
,Iterable<T>
,org.primefaces.model.SelectableDataModel<T>
- Direct Known Subclasses:
SpringDataJpaLazyDataModel
public class SpringDataLazyDataModel<T,ID,R extends CrudRepository<T,ID> & PagingAndSortingRepository<T,ID>>
extends org.primefaces.model.LazyDataModel<T>
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
protected Pageable
getPageable
(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy) protected Pageable
getPageable
(int first, int pageSize, Sort sort) protected ID
getPrimaryKey
(T entity) getRowData
(String rowKey) protected Sort
load
(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy, Map<String, org.primefaces.model.FilterMeta> filterBy) protected void
registerResult
(Page<T> page) void
setEntityConverter
(Converter<T> entityConverter) void
setEntityInformation
(EntityInformation<T, ID> entityInformation) void
setIdClass
(Class<ID> idClass) void
setPrimaryKeyDeserializer
(Function<String, ID> primaryKeyDeserializer) void
setPrimaryKeySerializer
(Function<ID, String> primaryKeySerializer) Methods inherited from class org.primefaces.model.LazyDataModel
getConverter, getMessage, getPageSize, getRowCount, getRowData, getRowData, getRowIndex, getWrappedData, isRowAvailable, iterator, iterator, recalculateFirst, setConverter, setPageSize, setRowCount, setRowIndex, setWrappedData
Methods inherited from class jakarta.faces.model.DataModel
addDataModelListener, getDataModelListeners, removeDataModelListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SpringDataLazyDataModel
-
-
Method Details
-
load
public List<T> load(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy, Map<String, org.primefaces.model.FilterMeta> filterBy) - Specified by:
load
in classorg.primefaces.model.LazyDataModel<T>
-
count
- Specified by:
count
in classorg.primefaces.model.LazyDataModel<T>
-
registerResult
-
getPageable
-
getPageable
-
getSort
-
getRowKey
-
getRowData
-
getPrimaryKey
-
getEntityInformation
-
setEntityInformation
-
getEntityConverter
-
setEntityConverter
-
getIdClass
-
setIdClass
-
setPrimaryKeyDeserializer
-
setPrimaryKeySerializer
-