Class GeneratedQueryDetailsController

All Implemented Interfaces:
javafx.fxml.Initializable

public class GeneratedQueryDetailsController extends DetailsWindow<GeneratedQuery>
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
  • Constructor Details

    • GeneratedQueryDetailsController

      public GeneratedQueryDetailsController(GeneratedQuery object)
      Creates a details controller bound to the given GeneratedQuery.
      Parameters:
      object - the generated query to display and edit; expected non-null
  • Method Details

    • initialize

      public void initialize(URL location, ResourceBundle resources)
      Initializes the generated query details view: delegates to super.initialize, enables contextual help, and populates the prompt and LLM combo boxes.
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Overrides:
      initialize in class DetailsWindow<GeneratedQuery>
      Parameters:
      location - FXML location (may be null)
      resources - localization bundle (may be null)
      Implementation Note:
      Invoked by the FXML loader on the JavaFX Application Thread.
    • getService

      protected GeneratedQueryService getService()
      Returns the service used to load and persist generated query objects.
      Specified by:
      getService in class BDOWindow<GeneratedQuery>
      Returns:
      the GeneratedQueryService instance
    • getTitle

      public String getTitle()
      Returns the fixed title for the generated query details window.
      Specified by:
      getTitle in class TitledInitializableWindow
      Returns:
      the string "Generated query"
    • refresh

      protected void refresh()
      Loads the bound GeneratedQuery into the controls (SQL text, generator LLM, and prompt).
      Specified by:
      refresh in class BDOWindow<GeneratedQuery>
      Implementation Note:
      Invoke on the JavaFX Application Thread.
    • saveChecks

      protected List<String> saveChecks()
      Validates the generated query form and returns human-readable errors. Checks: selected prompt and selected generator LLM.
      Overrides:
      saveChecks in class DetailsWindow<GeneratedQuery>
      Returns:
      list of validation messages; empty if saving is allowed
    • insertValues

      protected void insertValues()
      Writes the current UI values into the bound GeneratedQuery (SQL text, generator LLM, and prompt). Does not persist.
      Specified by:
      insertValues in class DetailsWindow<GeneratedQuery>