Class J2eeConnection
java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.J2eeConnection
- All Implemented Interfaces:
IConnection
,ISqlConnection
SQL connection implementation for a J2EE environment.
- Since:
- 6.3
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionJ2eeConnection
(String name, String jndiName) Constructs the connection with a name and jndi-name.J2eeConnection
(String name, DataSource datasource) Constructs the connection with a name and DataSource implementation. -
Method Summary
Modifier and TypeMethodDescriptioncreateQuery
(String queryStr) This method may be used to create a query object for the SQL connection.createQuery
(String queryStr, String pk) This method may be used to create an INSERT query from which an auto-generated value must be retrieved usingIQuery.getIdentity()
.getName()
This method returns the name of the connection object.getType()
This method returns the type of the connection object.
-
Constructor Details
-
J2eeConnection
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
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
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 interfaceIConnection
- Returns:
- the name of the connection object.
-
getType
Description copied from interface:IConnection
This method returns the type of the connection object.- Specified by:
getType
in interfaceIConnection
- Returns:
- the type of the connection object.
-
createQuery
Description copied from interface:ISqlConnection
This method may be used to create a query object for the SQL connection.- Specified by:
createQuery
in interfaceISqlConnection
- Parameters:
queryStr
- The query string that should be used by the query object.- Returns:
- Query object for the provided query string.
-
createQuery
Description copied from interface:ISqlConnection
This method may be used to create an INSERT query from which an auto-generated value must be retrieved usingIQuery.getIdentity()
.- Specified by:
createQuery
in interfaceISqlConnection
- 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
-