Class DataSourceProxyFactory

java.lang.Object
org.hawaiiframework.sql.DataSourceProxyFactory

public class DataSourceProxyFactory extends Object
Factory to create a datasource proxy with listeners.

See OrderedQueryExecutionListeners.

  • Constructor Details

    • DataSourceProxyFactory

      public DataSourceProxyFactory(List<OrderedQueryExecutionListener> listeners)
      The constructor.
      Parameters:
      listeners - The listeners to use in the data source proxy.
  • Method Details

    • proxy

      public DataSource proxy(DataSource target)
      Creates a data source proxy for the target iff there are listeners. Otherwise it will return the target itself.
      Parameters:
      target - The data source to create a proxy for.
      Returns:
      The data source to use.