Package org.qubership.nifi.service
Interface PreparedStatementProvider
- All Superinterfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService
public interface PreparedStatementProvider
extends org.apache.nifi.controller.ControllerService
Controller service providing PreparedStatement and setting parameters in it.
-
Method Summary
Modifier and TypeMethodDescriptioncreatePreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con) Creates PreparedStatement with specified query and sets ids as string array parametercreatePreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, int numberOfBinds, int bindsOffset) Creates PreparedStatement with specified query and sets ids as string array parameter specified number of timescreatePreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type) Creates PreparedStatement with specified query and sets ids as array parameter with specified element type.createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type, int numberOfBinds, int bindsOffset) Creates PreparedStatement with specified query and sets ids as array parameter with specified element type specified number of times.Methods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful
-
Method Details
-
createPreparedStatement
PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con) throws SQLException Creates PreparedStatement with specified query and sets ids as string array parameter- Parameters:
query- SQL querycontext- NiFI ProcessContext to useids- a collection of idscon- Connection to DB- Returns:
- PreparedStatement
- Throws:
SQLException
-
createPreparedStatement
PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type) throws SQLException Creates PreparedStatement with specified query and sets ids as array parameter with specified element type.- Parameters:
query- SQL querycontext- NiFI ProcessContext to useids- a collection of idscon- Connection to DBtype- type of array element to convert to- Returns:
- PreparedStatement
- Throws:
SQLException
-
createPreparedStatement
PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, int numberOfBinds, int bindsOffset) throws SQLException Creates PreparedStatement with specified query and sets ids as string array parameter specified number of times- Parameters:
query- SQL querycontext- NiFI ProcessContext to useids- a collection of idscon- Connection to DBnumberOfBinds- number of binds to addbindsOffset- offset for binds indexes- Returns:
- PreparedStatement
- Throws:
SQLException
-
createPreparedStatement
PreparedStatement createPreparedStatement(String query, org.apache.nifi.processor.ProcessContext context, Collection<String> ids, Connection con, DBElementType type, int numberOfBinds, int bindsOffset) throws SQLException Creates PreparedStatement with specified query and sets ids as array parameter with specified element type specified number of times.- Parameters:
query- SQL querycontext- NiFI ProcessContext to useids- a collection of idscon- Connection to DBtype- type of array element to convert tonumberOfBinds- number of binds to addbindsOffset- offset for binds indexes- Returns:
- PreparedStatement
- Throws:
SQLException
-