Class PdoFinder<T extends org.tentackle.pdo.PersistentDomainObject<T>>

  • Type Parameters:
    T - the pdo type
    All Implemented Interfaces:
    org.tentackle.fx.FxController, org.tentackle.pdo.DomainContextProvider, org.tentackle.pdo.PdoHolder<T>, org.tentackle.validate.ScopeConfigurator
    Direct Known Subclasses:
    DefaultPdoFinder

    public abstract class PdoFinder<T extends org.tentackle.pdo.PersistentDomainObject<T>>
    extends org.tentackle.fx.AbstractFxController
    implements org.tentackle.pdo.PdoHolder<T>, org.tentackle.pdo.DomainContextProvider
    FxController to search for PDOs.
    Holds the view of the selection criteria and runs the query.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      PdoFinder()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.collections.ObservableList<T> createTotals​(javafx.collections.ObservableList<T> items)
      Creates the optional totals from the search results.
      By default, all numeric columns are candidates for being summed up.
      org.tentackle.fx.table.TotalsTableView<T> createTotalsTableView()
      Creates the totals table view.
      Will be invoked only if createTotals(javafx.collections.ObservableList<T>) returned a non-empty list.
      org.tentackle.pdo.DomainContext getDomainContext()  
      abstract javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> getSearchActionProperty()
      Gets the search action property.
      boolean isSearchRunningImmediately()
      Returns whether to run the search immediately without any futher user interaction.
      boolean isSearchRunningInBackground()
      Returns whether the query might block the client for alonger time.
      boolean isVisible()
      Returns whether the finder is visible.
      abstract void requestInitialFocus()
      Requests the initial focus after stage is shown.
      abstract javafx.collections.ObservableList<T> runSearch()
      Runs the search.
      void setSearchRunningImmediately​(boolean searchRunningImmediately)
      Defines whether to run the search immediately without any futher user interaction.
      void setSearchRunningInBackground​(boolean searchRunningInBackground)
      Defines whether the query might block the client for alonger time.
      void setVisible​(boolean visible)
      Sets the visibility of the finder's view.
      • Methods inherited from class org.tentackle.fx.AbstractFxController

        configure, createBinder, getBinder, getContainer, getDefaultScopes, getFXMLFields, getFXMLMethods, getStage, getView, setView, validateInjections
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.tentackle.pdo.DomainContextProvider

        on, op
      • Methods inherited from interface org.tentackle.pdo.PdoHolder

        getPdo, on, setPdo
    • Constructor Detail

      • PdoFinder

        public PdoFinder()
    • Method Detail

      • runSearch

        public abstract javafx.collections.ObservableList<T> runSearch()
        Runs the search.
        Returns:
        the search result
      • requestInitialFocus

        public abstract void requestInitialFocus()
        Requests the initial focus after stage is shown.
      • getSearchActionProperty

        public abstract javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> getSearchActionProperty()
        Gets the search action property.
        Returns:
        the search action property, null if there is no such property
      • getDomainContext

        public org.tentackle.pdo.DomainContext getDomainContext()
        Specified by:
        getDomainContext in interface org.tentackle.pdo.DomainContextProvider
      • isSearchRunningInBackground

        public boolean isSearchRunningInBackground()
        Returns whether the query might block the client for alonger time.
        Returns:
        true if better run in background, false if in event-thread (default)
      • setSearchRunningInBackground

        public void setSearchRunningInBackground​(boolean searchRunningInBackground)
        Defines whether the query might block the client for alonger time.
        Parameters:
        searchRunningInBackground - true if better run in background, false if in event-thread (default)
      • isSearchRunningImmediately

        public boolean isSearchRunningImmediately()
        Returns whether to run the search immediately without any futher user interaction.
        Returns:
        true if immediate search
      • setSearchRunningImmediately

        public void setSearchRunningImmediately​(boolean searchRunningImmediately)
        Defines whether to run the search immediately without any futher user interaction.
        Parameters:
        searchRunningImmediately - true if immediate search
      • isVisible

        public boolean isVisible()
        Returns whether the finder is visible.
        Returns:
        true if visible (default)
      • setVisible

        public void setVisible​(boolean visible)
        Sets the visibility of the finder's view.
        Parameters:
        visible - true if visible (default)
      • createTotals

        public javafx.collections.ObservableList<T> createTotals​(javafx.collections.ObservableList<T> items)
        Creates the optional totals from the search results.
        By default, all numeric columns are candidates for being summed up. If a primitive numeric column must not be shown in the totals view, its column configurator must return isSummable() = false.
        Parameters:
        items - the items to create the totals from
        Returns:
        the totals (usually one item), null or empty if no totals (default)
      • createTotalsTableView

        public org.tentackle.fx.table.TotalsTableView<T> createTotalsTableView()
        Creates the totals table view.
        Will be invoked only if createTotals(javafx.collections.ObservableList<T>) returned a non-empty list.
        Returns:
        the totals table view