All Implemented Interfaces:
javafx.fxml.Initializable

public class SampleQueryDetailsController extends DetailsWindow<SampleQuery>
Details/edit window controller for a single SampleQuery. Loads values into UI controls, validates inputs (incl. SQL must start with SELECT and prompt context must contain exactly one §§§ placeholder), and writes changes back to the domain object on save. Includes contextual help.
Since:
1.0
Author:
Felix Seggebäing
  • Constructor Details

    • SampleQueryDetailsController

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

    • initialize

      public void initialize(URL location, ResourceBundle resources)
      Initializes the sample query details view: delegates to super.initialize, enables contextual help, and populates the complexity combo box with all enum values.
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Overrides:
      initialize in class DetailsWindow<SampleQuery>
      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 SampleQueryService getService()
      Returns the service used to load and persist sample query objects.
      Specified by:
      getService in class BDOWindow<SampleQuery>
      Returns:
      the SampleQueryService instance
    • getTitle

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

      protected void refresh()
      Loads the bound SampleQuery values into the UI controls (name, description, SQL, prompt context, complexity).
      Specified by:
      refresh in class BDOWindow<SampleQuery>
      Implementation Note:
      Invoke on the JavaFX Application Thread.
    • saveChecks

      protected List<String> saveChecks()
      Validates the sample query form and returns human-readable errors. Checks: non-empty name; non-empty SQL that starts with SELECT (case-insensitive, allowing a newline after SELECT); complexity selected; prompt context non-empty and containing exactly one §§§ placeholder.
      Overrides:
      saveChecks in class DetailsWindow<SampleQuery>
      Returns:
      list of validation messages; empty if saving is allowed
    • insertValues

      protected void insertValues()
      Writes the current UI values into the bound SampleQuery instance (name, description, SQL, prompt context, complexity). Does not persist.
      Specified by:
      insertValues in class DetailsWindow<SampleQuery>