Class DriverConfiguration

  • All Implemented Interfaces:
    org.tentackle.validate.ScopeConfigurator, org.tentackle.validate.Validateable

    public class DriverConfiguration
    extends AbstractSessionConfiguration
    Configuration for a backend driver.
    The configuration is stored via the standard Preferences and provides the paramaters necessary to load the a driver.

    Notice that the implementation does not depend on the tentackle-database or tentackle-sql module!

    • Constructor Detail

      • DriverConfiguration

        public DriverConfiguration​(java.lang.String name,
                                   java.lang.String driver,
                                   java.lang.String url)
        Creates a driver configuration.
        Parameters:
        name - the symbolic driver name
        driver - the driver's classname
        url - the url to load the driver
    • Method Detail

      • getDriverConfigurations

        public static java.util.Map<java.lang.String,​DriverConfiguration> getDriverConfigurations​(boolean system)
        Loads all driver configurations.
        Parameters:
        system - true if load from system preferences, else user preferences
        Returns:
        the driver configurations
      • removeDriverConfigurations

        public static void removeDriverConfigurations​(boolean system)
        Removes all driver configurations.
        Parameters:
        system - true if load from system preferences, else user preferences
      • getDriver

        @Bindable
        @NotNull
        public java.lang.String getDriver()
        Sets the driver's classname.
        Returns:
        the classname
      • setDriver

        @Bindable
        public void setDriver​(java.lang.String driver)
        Gets the driver's classname.
        Parameters:
        driver - the classname
      • getUrl

        @Bindable
        @NotNull
        public java.lang.String getUrl()
        Gets the url to load the driver.
        Returns:
        the url
      • setUrl

        @Bindable
        public void setUrl​(java.lang.String url)
        Sets the url to load the driver.
        Parameters:
        url - the url
      • persist

        public void persist​(boolean system)
        Persists this configuration.
        Parameters:
        system - true if store in system preferences (requires extra permission), else user preferences
      • remove

        public void remove​(boolean system)
        Removes this configuration.
        Parameters:
        system - true if store in system preferences (requires extra permission), else user preferences
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object