Class PromptQueryListModel
java.lang.Object
de.xima.fc.gui.common.utils.msg.I18nUtils
de.xima.fc.gui.common.utils.msg.MessageUtils
de.xima.fc.gui.common.utils.msg.AMessaging
de.xima.fc.gui.common.model.data.ItemListModel<PromptQueryViewModel, UUID>
de.xima.fc.gui.common.model.data.ItemListModelSelectByView<PromptQueryViewModel, UUID>
de.xima.fc.prompt.mgmt.gui.model.PromptQueryListModel
- All Implemented Interfaces:
IItemListModel<PromptQueryViewModel>, IUpdatable, Serializable
public final class PromptQueryListModel
extends ItemListModelSelectByView<PromptQueryViewModel, UUID>
- See Also:
-
Field Summary
Fields inherited from class ItemListModel
all, filtered, globalFilter, hasAddNewEntity, marked, selected -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNew()Sets the currently selected model to a new model.protected PromptQueryViewModelprotected voidprotected PromptQueryViewModelprotected PromptQueryViewModelprotected List<PromptQueryViewModel> fetchAll()Fetches all available entities.protected StringfindName(PromptQueryViewModel item) protected UUIDgetId(PromptQueryViewModel item) protected PromptQueryViewModelgetNew()protected Stringprotected booleanprotected booleanprotected voidonSelectionChanged(PromptQueryViewModel newSelected) Called when the selection changes, e.g. when a new item is selected or the selection is cleared.voidrefreshSelectionModel(boolean reload) Refreshes the selection model for the currently selected query.Methods inherited from class ItemListModelSelectByView
getAllowedViewsForSelection, getCurrentViewBean, getSelectionBean, putSelectionToStore, readSelectionFromStore, retrieveSelection, selectDefault, setSelected, storeSelectionMethods inherited from class ItemListModel
addMarked, castTo, create, delete, deleteEntity, deleteEntity, deleteMarkedEntities, getAll, getAllPlusNew, getFiltered, getGlobalFilter, getMarked, getSelected, hasEntity, isEmptyList, isHasAddNewEntity, isMarkedDeletable, isNew, loadLazyData, onRowSelect, onRowSelectCheckbox, onRowUnselectCheckbox, onToggleSelect, performDelete, removeMarked, save, save, setFiltered, setGlobalFilter, setHasAddNewEntity, setMarked, setSelectedFromMarked, update, updateData, updateSelectedMethods inherited from class MessageUtils
addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsg, addErrorMsgFromString, addErrorMsgFromString, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addErrorMsgToComponent, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsg, addInfoMsgFromString, addInfoMsgFromString, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addInfoMsgToComponent, addMsg, addMsg, addMsg, addMsg, addMsgs, addMsgs, addMsgToComponent, addMsgToComponent, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsg, addWarnMsgFromString, addWarnMsgFromString, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, addWarnMsgToComponent, cleanErrorMsg, errorMsg, errorMsg, getErrorMessage, getNewErrorMsg, getNewErrorMsg, getNewErrorMsg, getNewInfoMsg, getNewInfoMsg, getNewMsg, getNewWarnMsg, getNewWarnMsg, msgMethods inherited from class I18nUtils
getFacesContext, getLocale, rbValue, rbValue, rbValue, rbValueOrDefault, rbValueOrDefault
-
Constructor Details
-
PromptQueryListModel
-
-
Method Details
-
addNew
public void addNew()Description copied from interface:IItemListModelSets the currently selected model to a new model. A new model is not yet persisted in the database and exists only in memory.- Specified by:
addNewin interfaceIItemListModel<PromptQueryViewModel>- Overrides:
addNewin classItemListModel<PromptQueryViewModel, UUID>
-
getTestModel
-
refreshSelectionModel
public void refreshSelectionModel(boolean reload) Refreshes the selection model for the currently selected query.- Parameters:
reload- Whether to reload the query from the database. If false, preserves the existing data from the query and the selection model.
-
selectionModel
-
updateTestModel
-
crudCreate
- Specified by:
crudCreatein classItemListModel<PromptQueryViewModel, UUID>- Throws:
FcPromptException
-
crudDelete
- Specified by:
crudDeletein classItemListModel<PromptQueryViewModel, UUID>- Throws:
FcPromptException
-
crudRead
- Specified by:
crudReadin classItemListModel<PromptQueryViewModel, UUID>- Throws:
FcPromptException
-
crudUpdate
- Specified by:
crudUpdatein classItemListModel<PromptQueryViewModel, UUID>- Throws:
FcPromptException
-
fetchAll
Description copied from class:ItemListModelFetches all available entities. By default, this simple reads all entities matching theQueryCriteriaManagerprovided in the constructor. Override this for custom logic. If you choose to override this, you may providenullfor theQueryCriteriaManager, if you do not call this super method and do not attempt to use it yourself.- Specified by:
fetchAllin classItemListModel<PromptQueryViewModel, UUID>- Returns:
- A list with all available entities. The order of the returned list is preserved.
- Throws:
FcPromptException
-
findName
- Specified by:
findNamein classItemListModel<PromptQueryViewModel, UUID>
-
getId
- Specified by:
getIdin classItemListModel<PromptQueryViewModel, UUID>
-
getNew
- Specified by:
getNewin classItemListModel<PromptQueryViewModel, UUID>
-
getSelectionTypeKey
- Specified by:
getSelectionTypeKeyin classItemListModelSelectByView<PromptQueryViewModel, UUID>
-
isDetached
- Specified by:
isDetachedin classItemListModel<PromptQueryViewModel, UUID>
-
isPersisted
- Specified by:
isPersistedin classItemListModel<PromptQueryViewModel, UUID>
-
onSelectionChanged
Description copied from class:ItemListModelCalled when the selection changes, e.g. when a new item is selected or the selection is cleared.- Overrides:
onSelectionChangedin classItemListModel<PromptQueryViewModel, UUID>- Parameters:
newSelected- The currently selected item, or null if no item is selected.
-