public class JdbcLookup extends Lookup
| Constructor and Description |
|---|
JdbcLookup(Connection connection,
String query)
Creates a new instance with the
autoCloseConnection property set to false. |
JdbcLookup(Connection connection,
String query,
int... jdbcTypes)
Creates a new instance with the
autoCloseConnection property set to false. |
JdbcLookup(JdbcConnectionFactory factory,
String query)
Creates a new instance with the
autoCloseConnection property set to true. |
JdbcLookup(JdbcConnectionFactory factory,
String query,
int... jdbcTypes)
Creates a new instance with the
autoCloseConnection property set to true. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close() |
RecordList |
get(Object... args) |
boolean |
isAutoCloseConnection()
Indicates if the database connection in this lookup should be closed when the lookup is closed by the
LookupTransformer via
a TransformingReader or TransformingWriter. |
JdbcLookup |
setAutoCloseConnection(boolean autoCloseConnection)
Indicates if the database connection in this lookup should be closed when the lookup is closed by the
LookupTransformer via
a TransformingReader or TransformingWriter. |
String |
toString() |
public JdbcLookup(Connection connection, String query, int... jdbcTypes)
autoCloseConnection property set to false.connection - query - jdbcTypes - jdbcTypes tells the JDBC driver the SQL type of data to expect for any query params
that are specified as question marks and sent with statement.setObject(...); or statement.setNull(...),
otherwise, the driver will have to guess. For example java.util.Date can be DATE, TIME, TIMESTAMP,
DATETIME, etc., on the SQL side.public JdbcLookup(Connection connection, String query)
autoCloseConnection property set to false.connection - query - public JdbcLookup(JdbcConnectionFactory factory, String query, int... jdbcTypes)
autoCloseConnection property set to true.factory - query - jdbcTypes - jdbcTypes tells the JDBC driver the SQL type of data to expect for any query params
that are specified as question marks and sent with statement.setObject(...); or statement.setNull(...),
otherwise, the driver will have to guess. For example java.util.Date can be DATE, TIME, TIMESTAMP,
DATETIME, etc., on the SQL side.public JdbcLookup(JdbcConnectionFactory factory, String query)
autoCloseConnection property set to true.factory - query - public RecordList get(Object... args)
public boolean isAutoCloseConnection()
LookupTransformer via
a TransformingReader or TransformingWriter. The default is false if this instance was constructed with a Connection
or true if constructed with a JdbcConnectionFactory.public JdbcLookup setAutoCloseConnection(boolean autoCloseConnection)
LookupTransformer via
a TransformingReader or TransformingWriter. The default is false if this instance was constructed with a Connection
or true if constructed with a JdbcConnectionFactory.Copyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.