com.ibm.pdq.runtime.factory
Class DataFactory
- java.lang.Object
com.ibm.pdq.runtime.factory.DataFactory
public class DataFactory extends ObjectCreates and returns instances of implementations of the
Data
interface and of interfaces
that contain pureQuery annotated methods.
To use the pureQuery inline programming style, the DataFactory
can be used to create instances of
Data
, and then the various inline methods can be called on the returned instance. To use the pureQuery
annotated-method programming style, the user must first create an interface and generate an implementation class for
the interface by using the pureQuery Generator. Then, the DataFactory
interface can be used to create an
instance of the interface that uses the generated implementation. The returned instance also implements the
Data
interface. See the pureQuery Runtime documentation for more information on using the
inline programming style and the annotated-method programming style.
The Data
instances that are returned from DataFactory
methods can perform queries over a
particular data source. The data source can be specified explicitly when the DataFactory
method is
called by specifying a Connection
or a DataSource
. If no data source is specified, the
returned instance performs queries against in-memory collections (queries over collections). See the
pureQuery Runtime documentation for more information on running queries against databases and against
in-memory collections.
A Data
instance that is returned from a DataFactory
method can be assigned a
Hook
object that implements the Hook
interface, if the
Hook
object is specified as a parameter to the DataFactory
method. Doing so causes the
Hook
object's
Hook.pre
and
Hook.post
methods to bracket the execution of the inline or annotated methods that are called on the returned
Data
instance.
A Data
instance that is returned from a DataFactory
method can be assigned a
Map
of SQL overrides to be used for overriding the SQL statements that are executed by the methods
of the Data
interface. This can be done by specifying the Map
as a parameter to the
DataFactory
method. The specified Map
needs to have SQL expressions as keys and as values.
When methods of the Data
interface are called, if the SQL statement exactly matches one of the keys in
the Map
of SQL overrides, then the SQL expression that is the value for that key is executed instead.
The SQL keys must exactly match the SQL to be executed by a method, including identical capitalization and
white space.
Constructor Summary
Constructor and Description |
---|
DataFactory()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getData()
Returns an instance of a class that implements the
Data interface for queries over
collections.
|
|
getData(Class<T> interfaceClass)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface for queries over collections.
|
|
getData(Class<T> interfaceClass,Connection connection)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Connection connection,Hook hook)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Connection connection,Hook hook,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Connection connection,Hook hook,Properties properties)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Connection connection,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Connection connection,Properties properties)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Class<T> interfaceClass,Data data)
Returns an instance of a class that implements the two interfaces
interfaceClass and Data .
|
|
getData(Class<T> interfaceClass,DataSource ds)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,DataSource ds,Hook hook)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,DataSource ds,Hook hook,Map<Object,Object> sqlOverrides)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,DataSource ds,Hook hook,Properties properties)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,DataSource ds,Map<Object,Object> sqlOverrides)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,DataSource ds,Properties properties)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements both the
interfaceClass interface and the Data interface, with an implementation
that is based on whether the execution mode is dynamic or static.
|
|
getData(Class<T> interfaceClass,Hook hook)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface for queries over collections.
|
|
getData(Class<T> interfaceClass,Hook hook,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements both the
interfaceClass interface and the Data interface for queries over collections.
|
|
getData(Connection connection)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(Connection connection,Hook hook)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(Connection connection,Hook hook,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(Connection connection,Hook hook,Properties properties)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(Connection connection,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(Connection connection,Properties properties)
Returns an instance of a class that implements the
Data interface, with an
implementation that is based on whether the execution mode is dynamic or static.
|
|
getData(DataSource ds)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(DataSource ds,Hook hook)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(DataSource ds,Hook hook,Map<Object,Object> sqlOverrides)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(DataSource ds,Hook hook,Properties properties)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(DataSource ds,Map<Object,Object> sqlOverrides)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(DataSource ds,Properties properties)
Establishes a
Connection to the DataSource ds , if possible, and if
a Connection is established, returns an instance of a class that implements the Data interface, with an implementation that is based on whether the execution mode is
dynamic or static.
|
|
getData(Hook hook)
Returns an instance of a class that implements the
Data interface for queries over
collections.
|
|
getData(Hook hook,Map<Object,Object> sqlOverrides)
Returns an instance of a class that implements the
Data interface for queries over
collections.
|
|
processRepositoryDataFactoryX(com.ibm.pdq.runtime.internal.CentralStoreKey centralStoreKey)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
DataFactory
public DataFactory()
Method Detail
getData
public static Data getData()
Data
interface for queries over
collections getData
public static <T> T getData(Class<T> interfaceClass)
interfaceClass
interface and the
Data
interface for queries over collections.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. interfaceClass
interface and the
Data
interface for queries over collections getData
public static <T> T getData(Class<T> interfaceClass, Connection connection)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Connection connection, Hook hook)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Connection connection, Hook hook, Map<Object,Object> sqlOverrides)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Connection connection, Hook hook, Properties properties)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Connection connection, Map<Object,Object> sqlOverrides)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Connection connection, Properties properties)
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
connection
is the Connection
of the
new instance.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. connection
- the Connection
to the database to use for queries, updates, and so on properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Data data)
interfaceClass
and
Data
. The passed-in instance data
will be used for the implementation of
Data
.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. data
- an implementtion of the Data
interface that is used for the implementation
of Data
in the instance to return interfaceClass
and
Data
. The passed-in instance data
will be used for the
implementation of Data
. getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds, Hook hook)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds, Hook hook, Map<Object,Object> sqlOverrides)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds, Hook hook, Properties properties)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds, Map<Object,Object> sqlOverrides)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, DataSource ds, Properties properties)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements both the
interfaceClass
interface and the Data
interface, with an implementation
that is based on whether the execution mode is dynamic or static. The Connection
is the
Connection
of the new instance. If a Connection
cannot be established, then a
RuntimeException
will be thrown.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. ds
- the DataSource
against which the SQL statements are performed properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. interfaceClass
interface and the
Data
interface, with an implementation that is based on whether the execution
mode is dynamic or static getData
public static <T> T getData(Class<T> interfaceClass, Hook hook)
interfaceClass
interface and the
Data
interface for queries over collections.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
interfaceClass
interface and the
Data
interface for queries over collections getData
public static <T> T getData(Class<T> interfaceClass, Hook hook, Map<Object,Object> sqlOverrides)
interfaceClass
interface and the
Data
interface for queries over collections.
If the pureQuery Generator is not used to create an implementation class for the interface
interfaceClass
, or if the implementation class is not accessible and instantiable, an
Exception
occurs because instantiating the class is impossible.
T
- the interface that is specified as interfaceClass
. The returned class instance implements
this interface. interfaceClass
- the interface for which an instance of an implementation class is created. The pureQuery
Generator must be used to create an implementation class for this interface, and the generated
implementation class must be accessible and instantiable. If this is not the case, an
Exception
occurs because instantiating the class is impossible. hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. interfaceClass
interface and the
Data
interface for queries over collections getData
public static Data getData(Connection connection)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Connection connection, Hook hook)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Connection connection, Hook hook, Map<Object,Object> sqlOverrides)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Connection connection, Hook hook, Properties properties)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Connection connection, Map<Object,Object> sqlOverrides)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Connection connection, Properties properties)
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static. The Connection
connection
is the Connection
of the new instance.
connection
- the Connection
to the database to use for queries, updates, and so on properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds, Hook hook)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds, Hook hook, Map<Object,Object> sqlOverrides)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds, Hook hook, Properties properties)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds, Map<Object,Object> sqlOverrides)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(DataSource ds, Properties properties)
Connection
to the DataSource
ds
, if possible, and if
a Connection
is established, returns an instance of a class that implements the
Data
interface, with an implementation that is based on whether the execution mode is
dynamic or static. The Connection
is the Connection
of the new instance. If a
Connection
cannot be established, then a RuntimeException
will be thrown.
ds
- the DataSource
against which the SQL statements are performed properties
- An instance of Properties
that can provide values of one or more of the
properties pdq.executionMode
, pdq.queryTimeoutInSeconds
, and
pdq.maxResultRows
for the created instance of Data
. Any values specified for
these properties here override any other values specified for these properties elsewhere. See the
pureQuery Runtime documentation for information on how to set these properties. Data
interface, with an
implementation that is based on whether the execution mode is dynamic or static getData
public static Data getData(Hook hook)
Data
interface for queries over
collections.
hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
Data
interface for queries over
collections getData
public static Data getData(Hook hook, Map<Object,Object> sqlOverrides)
Data
interface for queries over
collections.
hook
- an implementation of the Hook
interface to assign to the created
instance of an implementation of Data
sqlOverrides
- a Map
of overrides, with SQL expressions as keys and the expressions to use
instead of the original SQL expressions as values. When this method is used with the Data API, all of the
SQL strings that are passed in as parameters are checked against the Map
and are replaced
when they are found in the Map
. The purpose of the comparison is to see whether the
String
keys exactly match the SQL String
s. Any difference between two
String
s, including a difference in white space or a difference in capitalization, results in
the two String
s not matching each other. Data
interface for queries over
collections processRepositoryDataFactoryX
public static void processRepositoryDataFactoryX( com.ibm.pdq.runtime.internal.CentralStoreKey centralStoreKey)
Data
interface for queries over collections.