Package org.joinfaces.primefaces
Class SpringDataJpaLazyDataModel<T,ID,R extends org.springframework.data.jpa.repository.JpaRepository<T,ID> & org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>>
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>
org.joinfaces.primefaces.SpringDataJpaLazyDataModel<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>
public class SpringDataJpaLazyDataModel<T,ID,R extends org.springframework.data.jpa.repository.JpaRepository<T,ID> & org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>>
extends SpringDataLazyDataModel<T,ID,R>
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
jakarta.persistence.EntityManager
getPrimaryKey
(T entity) protected org.springframework.data.jpa.domain.Specification<T>
getSpecification
(Map<String, org.primefaces.model.FilterMeta> filterBy) protected org.springframework.data.jpa.domain.Specification<T>
getSpecification
(org.primefaces.model.FilterMeta filterMeta) load
(int first, int pageSize, Map<String, org.primefaces.model.SortMeta> sortBy, Map<String, org.primefaces.model.FilterMeta> filterBy) void
setEntityManager
(jakarta.persistence.EntityManager entityManager) Methods inherited from class org.joinfaces.primefaces.SpringDataLazyDataModel
getEntityConverter, getEntityInformation, getIdClass, getPageable, getPageable, getRowData, getRowKey, getSort, registerResult, setEntityConverter, setEntityInformation, setIdClass, setPrimaryKeyDeserializer, setPrimaryKeySerializer
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
-
SpringDataJpaLazyDataModel
-
-
Method Details
-
load
-
count
-
getSpecification
-
getSpecification
protected org.springframework.data.jpa.domain.Specification<T> getSpecification(org.primefaces.model.FilterMeta filterMeta) -
getPrimaryKey
- Overrides:
getPrimaryKey
in classSpringDataLazyDataModel<T,
ID, R extends org.springframework.data.jpa.repository.JpaRepository<T, ID> & org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>>
-
getEntityManager
public jakarta.persistence.EntityManager getEntityManager() -
setEntityManager
public void setEntityManager(jakarta.persistence.EntityManager entityManager)
-