Package de.xima.fc.gui.model.lazydata
Class LazyEntityListModel<T extends ITransferableEntity>
- java.lang.Object
-
- javax.faces.model.DataModel<E>
-
- javax.faces.model.ListDataModel<T>
-
- org.primefaces.model.LazyDataModel<T>
-
- de.xima.fc.gui.model.lazydata.LazyEntityListModel<T>
-
- All Implemented Interfaces:
ILazyEntityListModel<T>
,ILazyListModel<T>
,Serializable
,Iterable<T>
,org.primefaces.model.SelectableDataModel<T>
public class LazyEntityListModel<T extends ITransferableEntity> extends org.primefaces.model.LazyDataModel<T> implements ILazyEntityListModel<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LazyEntityListModel(Class<T> entityClass)
LazyEntityListModel(Class<T> entityClass, Mandant mandant)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCustomFilter(de.xima.cmn.criteria.FilterCriterion customFilter)
void
addCustomFilters(List<de.xima.cmn.criteria.FilterCriterion> customFilters)
void
clearCustomFilters()
int
count(Map<String,org.primefaces.model.FilterMeta> filterBy)
int
getPage(ITransferableEntity entity, int pageSize)
de.xima.cmn.criteria.QueryCriteriaManager
getQcm()
Deprecated.Let this class handler the database access, access the fetched data instead.T
getRowData(String rowKey)
String
getRowKey(T object)
T
getSelected()
List<T>
load(int first, int pageSize, Map<String,org.primefaces.model.SortMeta> sortBy, Map<String,org.primefaces.model.FilterMeta> filterBy)
void
setCustomFilters(List<de.xima.cmn.criteria.FilterCriterion> customFilters)
void
setQcm(de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.If you need to add custom filters, useaddCustomFilter(FilterCriterion)
.void
setSelected(T selected)
void
updateRowCount()
-
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 javax.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
-
-
-
-
Method Detail
-
count
public int count(Map<String,org.primefaces.model.FilterMeta> filterBy)
- Specified by:
count
in classorg.primefaces.model.LazyDataModel<T extends ITransferableEntity>
-
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 interfaceILazyListModel<T extends ITransferableEntity>
- Specified by:
load
in classorg.primefaces.model.LazyDataModel<T extends ITransferableEntity>
-
getPage
public int getPage(ITransferableEntity entity, int pageSize)
-
getRowData
public T getRowData(String rowKey)
- Specified by:
getRowData
in interfaceILazyListModel<T extends ITransferableEntity>
- Specified by:
getRowData
in interfaceorg.primefaces.model.SelectableDataModel<T extends ITransferableEntity>
- Overrides:
getRowData
in classorg.primefaces.model.LazyDataModel<T extends ITransferableEntity>
-
getRowKey
public String getRowKey(T object)
- Specified by:
getRowKey
in interfaceILazyListModel<T extends ITransferableEntity>
- Specified by:
getRowKey
in interfaceorg.primefaces.model.SelectableDataModel<T extends ITransferableEntity>
- Overrides:
getRowKey
in classorg.primefaces.model.LazyDataModel<T extends ITransferableEntity>
-
setSelected
public void setSelected(T selected)
- Specified by:
setSelected
in interfaceILazyListModel<T extends ITransferableEntity>
-
getSelected
public T getSelected()
- Specified by:
getSelected
in interfaceILazyListModel<T extends ITransferableEntity>
-
getQcm
@Deprecated public de.xima.cmn.criteria.QueryCriteriaManager getQcm()
Deprecated.Let this class handler the database access, access the fetched data instead.- Returns:
- The query criteria manager for all entities, without filters or sorting criteria.
-
setQcm
@Deprecated public void setQcm(de.xima.cmn.criteria.QueryCriteriaManager qcm)
Deprecated.If you need to add custom filters, useaddCustomFilter(FilterCriterion)
.- Parameters:
qcm
- Only the filters from the given query criteria manager are added viaaddCustomFilter(FilterCriterion)
.
-
clearCustomFilters
public void clearCustomFilters()
-
addCustomFilter
public void addCustomFilter(de.xima.cmn.criteria.FilterCriterion customFilter)
-
addCustomFilters
public void addCustomFilters(List<de.xima.cmn.criteria.FilterCriterion> customFilters)
-
setCustomFilters
public void setCustomFilters(List<de.xima.cmn.criteria.FilterCriterion> customFilters)
-
updateRowCount
public void updateRowCount()
-
-