Package de.esoco.process.ui.component
Klasse UiQueryTable<E extends Entity>
java.lang.Object
org.obrel.core.RelatedObject
de.esoco.process.param.ParameterWrapper<E,UiQueryTable<E>>
de.esoco.process.ui.UiComponent<E,UiQueryTable<E>>
de.esoco.process.ui.UiControl<E,UiQueryTable<E>>
de.esoco.process.ui.UiTableControl<E,UiQueryTable<E>>
de.esoco.process.ui.component.UiQueryTable<E>
- Alle implementierten Schnittstellen:
UiHasActionEvents<E,
,UiQueryTable<E>> UiHasFocusEvents<E,
,UiQueryTable<E>> UiHasUpdateEvents<E,
,UiQueryTable<E>> org.obrel.core.Relatable
public class UiQueryTable<E extends Entity>
extends UiTableControl<E,UiQueryTable<E>>
implements UiHasUpdateEvents<E,UiQueryTable<E>>, UiHasActionEvents<E,UiQueryTable<E>>
A table that displays the result of a database query.
-
Konstruktorübersicht
KonstruktorBeschreibungUiQueryTable
(UiContainer<?> container, Class<E> entityType) Creates a new instance. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal de.esoco.storage.QueryPredicate
<E> Returns the current storage query for this parameter, including the filter criteria that have been set by the user.Returns the currently selected entity.Registers an event handler that will be invoked on action events with the new component value.final UiQueryTable
<E> onSelection
(Consumer<E> eventHandler) Sets the event handler for selection events of this table.final UiQueryTable
<E> onSelectionConfirmed
(Consumer<E> eventHandler) Sets the event handler for selection confirmed events (e.g. by double click) of this table.Registers an event handler that will be invoked on update events with the new component value.orderBy
(org.obrel.core.RelationType<?> orderAttribute, boolean ascending) Sets the default query order for a single attribute.Sets the storage query criteria of this table.final void
setColumns
(de.esoco.lib.expression.Function<? super E, ?>... attributes) Sets the attributes to be displayed for entity queries.void
setColumns
(Collection<de.esoco.lib.expression.Function<? super E, ?>> columnAttributes) Sets the entity attributes to be displayed as the table columns.void
setOrderBy
(de.esoco.lib.expression.Predicate<? super Entity> order) Sets the default query order with a predicate that may contain multiple order criteria.void
setOrderBy
(org.obrel.core.RelationType<?> orderAttribute, boolean ascending) Sets the default query order for a single attribute.void
Sets the storage query criteria of this table.void
setSelection
(E value) Sets (or clears) the currently selected entity.Von Klasse geerbte Methoden de.esoco.process.ui.UiTableControl
setTableStyle, tableStyle
Von Klasse geerbte Methoden de.esoco.process.ui.UiControl
onFocusLost, validateFinally, validateInteractive, validateNow
Von Klasse geerbte Methoden de.esoco.process.ui.UiComponent
applyProperties, attachTo, cell, cell, getComponentStyleName, getImage, getParent, getRootView, getValueImpl, getView, height, icon, image, label, placeBefore, resid, setValueImpl, size, style, style, styleName, tooltip, toString, update, visibleOn, width
Von Klasse geerbte Methoden de.esoco.process.param.ParameterWrapper
clear, disable, enable, fragment, get, getParam, has, hide, id, initiateDownload, isEnabled, isVisible, remove, set, set, set, setEnabled, setFragment, setParam, setParameterEventHandler, setParameterType, setVisible, show, type
Von Klasse geerbte Methoden org.obrel.core.RelatedObject
deleteRelation, get, getRelation, getRelations, notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, set, transform, writeRelations
Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden org.obrel.core.Relatable
deleteRelation, deleteRelations, getAll, getOption, getRelationCount, getRelations, hasFlag, hasRelation, hasRelations, init, set, set, set, setOption, streamRelations
-
Konstruktordetails
-
UiQueryTable
Creates a new instance.- Siehe auch:
-
-
Methodendetails
-
getCurrentQuery
Returns the current storage query for this parameter, including the filter criteria that have been set by the user.- Gibt zurück:
- The current query
-
getSelection
Returns the currently selected entity.- Gibt zurück:
- The selected entity (NULL for none)
-
onAction
Registers an event handler that will be invoked on action events with the new component value.- Angegeben von:
onAction
in SchnittstelleUiHasActionEvents<E extends Entity,
UiQueryTable<E extends Entity>> - Parameter:
eventHandler
- The event handler to be invoked- Gibt zurück:
- The component the handler has been registered on
-
onSelection
Sets the event handler for selection events of this table.- Parameter:
eventHandler
- The event handler- Gibt zurück:
- This instance for concatenation
-
onSelectionConfirmed
Sets the event handler for selection confirmed events (e.g. by double click) of this table.- Parameter:
eventHandler
- The event handler- Gibt zurück:
- This instance for concatenation
-
onUpdate
Registers an event handler that will be invoked on update events with the new component value.- Angegeben von:
onUpdate
in SchnittstelleUiHasUpdateEvents<E extends Entity,
UiQueryTable<E extends Entity>> - Parameter:
eventHandler
- The event handler to be invoked- Gibt zurück:
- The component the handler has been registered on
-
orderBy
Sets the default query order for a single attribute. For complex order criteria seesetOrderBy(Predicate)
.- Parameter:
orderAttribute
- The entity attribute to order the query byascending
- TRUE for ascending, FALSE for descending ordering- Gibt zurück:
- This instance for fluent invocation
-
query
Sets the storage query criteria of this table.- Parameter:
criteria
- The query criteria to apply (NULL for none)- Gibt zurück:
- This instance for fluent invocation
-
setColumns
@SafeVarargs public final void setColumns(de.esoco.lib.expression.Function<? super E, ?>... attributes) Sets the attributes to be displayed for entity queries.- Siehe auch:
-
setColumns
Sets the entity attributes to be displayed as the table columns. The datatype of a column is a function that queries the attributes from an entity. This applies to standard relation types as these are also functions that can be applied to relatable objects (like entities). But that can also be compound functions that generate the attribute value to displayed in a result table on access. An example could be a function that extracts the name from an entity reference (e.g.NAME.from(OTHER_ENTITY)
).- Parameter:
columnAttributes
- The entity attribute access functions
-
setOrderBy
Sets the default query order with a predicate that may contain multiple order criteria. For ordering by a single entity attribute see methodsetOrderBy(RelationType, boolean)
.- Parameter:
order
- The sort order criteria (NULL for none)
-
setOrderBy
public void setOrderBy(org.obrel.core.RelationType<?> orderAttribute, boolean ascending) Sets the default query order for a single attribute. For complex order criteria seesetOrderBy(Predicate)
.- Parameter:
orderAttribute
- The entity attribute to order the query byascending
- TRUE for ascending, FALSE for descending ordering
-
setQuery
Sets the storage query criteria of this table.- Parameter:
criteria
- The query criteria to apply (NULL for none)
-
setSelection
Sets (or clears) the currently selected entity.- Parameter:
value
- The new selection or NULL for none
-