T - the generic type of the implementing typepublic abstract class StatementDefinition<T extends StatementDefinition> extends QuerySettings
| Modifier and Type | Field and Description |
|---|---|
protected String |
sql
The text of the SQL query to be executed
|
| Constructor and Description |
|---|
StatementDefinition()
Creates a new instance of StatementDefinition
|
StatementDefinition(String sql,
List<ParameterType> parameterTypes,
int queryTimeout,
TimeUnit queryTimeoutUnit,
Integer fetchSize,
Integer maxRows)
Creates a new instance of StatementDefinition with the given arguments.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
copy()
Returns a shallow copy of
this instance. |
Optional<ParameterType> |
getParameterType(String paramName)
Returns the type for a given parameter
|
List<ParameterType> |
getParameterTypes() |
String |
getSql() |
void |
setSql(String sql) |
copyInto, getFetchSize, getMaxRows, getQueryTimeout, getQueryTimeoutUnit@Parameter @Text @DisplayName(value="SQL Query Text") @Placement(order=1) @MetadataKeyId protected String sql
public StatementDefinition()
public StatementDefinition(String sql, List<ParameterType> parameterTypes, int queryTimeout, TimeUnit queryTimeoutUnit, Integer fetchSize, Integer maxRows)
sql - The text of the SQL query to be executedparameterTypes - Allows to optionally specify the type of one or more of the parameters in the query. If provided,
you're not even required to reference all of the parameters, but you cannot reference a parameter not
present in the input valuesqueryTimeout - Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement.
No timeout is used by default.queryTimeoutUnit - A TimeUnit which qualifies the QuerySettings.queryTimeoutfetchSize - Indicates how many rows to fetch from the database when rows are read from a resultSet.maxRows - * Sets the limit for the maximum number of rows that any ResultSet object generated by this message
processor can contain for the given number. If the limit is exceeded, the excess rows are silently
dropped.protected T copy()
this instance.public Optional<ParameterType> getParameterType(String paramName)
paramName - the parameter's nameParameterTypepublic List<ParameterType> getParameterTypes()
public String getSql()
public void setSql(String sql)
Copyright © 2022. All rights reserved.