java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.J2eeConnection
All Implemented Interfaces:
IConnection, ISqlConnection

public class J2eeConnection extends Object implements ISqlConnection
SQL connection implementation for a J2EE environment.
Since:
6.3
Author:
O. Kerpershoek
  • Constructor Details

    • J2eeConnection

      public J2eeConnection(String name, DataSource datasource)
      Constructs the connection with a name and DataSource implementation.
      Parameters:
      name - The name of the connection.
      datasource - The datasource that should be used to connect to the database.
    • J2eeConnection

      public J2eeConnection(String name, String jndiName)
      Constructs the connection with a name and jndi-name.
      Parameters:
      name - The name of the connection.
      jndiName - The jndi name that should be used to locate the DataSource.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IConnection
      This method returns the name of the connection object. The name is used to uniquely identify the connection object.
      Specified by:
      getName in interface IConnection
      Returns:
      the name of the connection object.
    • getType

      public ConnectionType getType()
      Description copied from interface: IConnection
      This method returns the type of the connection object.
      Specified by:
      getType in interface IConnection
      Returns:
      the type of the connection object.
    • createQuery

      public IQuery createQuery(String queryStr)
      Description copied from interface: ISqlConnection
      This method may be used to create a query object for the SQL connection.
      Specified by:
      createQuery in interface ISqlConnection
      Parameters:
      queryStr - The query string that should be used by the query object.
      Returns:
      Query object for the provided query string.
    • createQuery

      public IQuery createQuery(String queryStr, String pk)
      Description copied from interface: ISqlConnection
      This method may be used to create an INSERT query from which an auto-generated value must be retrieved using IQuery.getIdentity().
      Specified by:
      createQuery in interface ISqlConnection
      Parameters:
      queryStr - the query string that should be used by the query object.
      pk - the name of the primary key column whose value is auto-generated by the database
      Returns:
      the query object for the provided query string.
    • getDataSource

      public DataSource getDataSource()