Interface IPromptQueryBean<ConnectionConfig, QueryConfig>
- Type Parameters:
QueryConfig- Type of the configuration object that is used to store the query's properties.
- All Superinterfaces:
Serializable
Base interface for GUI beans that manage prompt queries.
- Since:
- 8.5.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidCalled each time when a prompt query is selected, e.g. when the user clicks on a query in the list of queries.default IRetrieveQueryModelRetVal<QueryConfig> Called each time the query currently being edited needs to be retrieved, and possibly persisted.
-
Field Details
-
GENERIC_TYPE
-
-
Method Details
-
prepareViewForQuery
default void prepareViewForQuery(IPrepareViewForQueryParams<ConnectionConfig, QueryConfig> params) throws Exception Called each time when a prompt query is selected, e.g. when the user clicks on a query in the list of queries. This method is passed the query, and should perform whatever initialization is necessary in order for the user to start editing its properties.- Parameters:
params- The current query to be edited and its properties.- Throws:
Exception- When the initialization failed. If an exception is thrown, the user is shown an error indicating that the properties cannot be edited.
-
retrieveQueryModel
default IRetrieveQueryModelRetVal<QueryConfig> retrieveQueryModel(IRetrieveQueryModelParams<QueryConfig> params) Called each time the query currently being edited needs to be retrieved, and possibly persisted. Usually this is called when the user saves the query or changes the connection the query belongs to.Note, however, that you may not assume the editing process for the query is done. Do not perform any clean up work here. Use
PreDestroyfor cleanup.This method is passed the same properties model that was passed to
prepareViewForQuery. The default implementation returnsnull, which results in the same model being used. One possible use case for this method is when you need to store part of the state inside your bean, outside the model, and need to merge that state back into the model.- Parameters:
params- The parameters with the current model, the same instance that was passed toprepareViewForQuery.- Returns:
- The current model to use. You can reuse the current model instance, or create a new instance. If you return null, the current model instance is used.
-