Package org.joinfaces.primefaces
Class SpringDataLazyDataModel<T,ID,R extends org.springframework.data.repository.CrudRepository<T,ID> & org.springframework.data.repository.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 org.springframework.data.repository.CrudRepository<T,ID> & org.springframework.data.repository.PagingAndSortingRepository<T,ID>>
extends org.primefaces.model.LazyDataModel<T>
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
jakarta.faces.convert.Converter<T>
protected org.springframework.data.domain.Pageable
getPageable
(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy) protected org.springframework.data.domain.Pageable
getPageable
(int first, int pageSize, org.springframework.data.domain.Sort sort) protected ID
getPrimaryKey
(T entity) getRowData
(String rowKey) protected org.springframework.data.domain.Sort
load
(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy, Map<String, org.primefaces.model.FilterMeta> filterBy) protected void
registerResult
(org.springframework.data.domain.Page<T> page) void
setEntityConverter
(jakarta.faces.convert.Converter<T> entityConverter) void
setEntityInformation
(org.springframework.data.repository.core.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, 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
protected org.springframework.data.domain.Pageable getPageable(int first, int pageSize, org.springframework.data.domain.Sort sort) -
getSort
-
getRowKey
-
getRowData
-
getPrimaryKey
-
getEntityInformation
-
setEntityInformation
-
getEntityConverter
-
setEntityConverter
-
getIdClass
-
setIdClass
-
setPrimaryKeyDeserializer
-
setPrimaryKeySerializer
-