Class StoredConnections.StoredConnectionBuilder

java.lang.Object
com.invirgance.convirgance.jdbc.StoredConnections.StoredConnectionBuilder
Enclosing class:
StoredConnections

public static class StoredConnections.StoredConnectionBuilder extends Object
A Builder for creating and StoredConnections. Typically a connection would be configured for the driver or for the datasource, but not both. If both are configured, datasource will take precedence when attempting to connect. Example: Creating a new StoredConnection for a Driver that was retrieved with AutomaticDrivers.getDriverByName().
  • Method Details

    • build

      public StoredConnection build()
      Builds and finalizes the StoredConnection. At this point you could call 'save()' to preserve it or simply use the StoredConnection within the current run-time.
      Returns:
      The StoredConnection.
    • driver

      Returns a DriverConfigBuilder for configuring a Driver. This builder can be used to setup the Driver configuration of a StoredConnection. Example: Used to set the username, URL and password for the StoredConnection's driver.
      Returns:
      DriverConfigBuilder.
    • datasource

      Returns a builder to setup Driver specific DataSource properties. Example: setting the 'explicitCachingEnabled' property for the Oracle Thin Driver.
      Returns:
      The DataSourceConfigBuilder.