Module de.seggebaeing.sqlanalyzer
Class GeneratedQueryDetailsController
java.lang.Object
de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow<GeneratedQuery>
de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow<GeneratedQuery>
de.seggebaeing.sqlanalyzer.presentation.controller.details.GeneratedQueryDetailsController
- All Implemented Interfaces:
javafx.fxml.Initializable
Details/edit window controller for a single
GeneratedQuery
.
Initializes prompt and LLM selectors (custom cells, sorted), loads values into
controls, validates selections, and writes changes back on save. Includes help.- Since:
- 1.0
- Author:
- Felix Seggebäing
-
Field Summary
Fields inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow
deleteBtn, lastEditedLabel, root, saveBtn
Fields inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow
headerLabel, refreshBtn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GeneratedQueryService
Returns the service used to load and persist generated query objects.getTitle()
Returns the fixed title for the generated query details window.void
initialize
(URL location, ResourceBundle resources) Initializes the generated query details view: delegates tosuper.initialize
, enables contextual help, and populates the prompt and LLM combo boxes.protected void
Writes the current UI values into the boundGeneratedQuery
(SQL text, generator LLM, and prompt).protected void
refresh()
Loads the boundGeneratedQuery
into the controls (SQL text, generator LLM, and prompt).Validates the generated query form and returns human-readable errors.Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.DetailsWindow
deleteBtnClick, getObject, saveBtnClick
Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.BDOWindow
requestDeletion, setHeaderText
Methods inherited from class de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
closeWindow, enableHelp, getRoot, getStage
-
Constructor Details
-
GeneratedQueryDetailsController
Creates a details controller bound to the givenGeneratedQuery
.- Parameters:
object
- the generated query to display and edit; expected non-null
-
-
Method Details
-
initialize
Initializes the generated query details view: delegates tosuper.initialize
, enables contextual help, and populates the prompt and LLM combo boxes.- Specified by:
initialize
in interfacejavafx.fxml.Initializable
- Overrides:
initialize
in classDetailsWindow<GeneratedQuery>
- Parameters:
location
- FXML location (may benull
)resources
- localization bundle (may benull
)- Implementation Note:
- Invoked by the FXML loader on the JavaFX Application Thread.
-
getService
Returns the service used to load and persist generated query objects.- Specified by:
getService
in classBDOWindow<GeneratedQuery>
- Returns:
- the
GeneratedQueryService
instance
-
getTitle
Returns the fixed title for the generated query details window.- Specified by:
getTitle
in classTitledInitializableWindow
- Returns:
- the string
"Generated query"
-
refresh
protected void refresh()Loads the boundGeneratedQuery
into the controls (SQL text, generator LLM, and prompt).- Specified by:
refresh
in classBDOWindow<GeneratedQuery>
- Implementation Note:
- Invoke on the JavaFX Application Thread.
-
saveChecks
Validates the generated query form and returns human-readable errors. Checks: selected prompt and selected generator LLM.- Overrides:
saveChecks
in classDetailsWindow<GeneratedQuery>
- Returns:
- list of validation messages; empty if saving is allowed
-
insertValues
protected void insertValues()Writes the current UI values into the boundGeneratedQuery
(SQL text, generator LLM, and prompt). Does not persist.- Specified by:
insertValues
in classDetailsWindow<GeneratedQuery>
-