public class NumericBetweenParametersProvider extends Object implements ParameterValuesProvider
For example, if there's a table BOOKS with a numeric PK id, using a query like:
SELECT * FROM BOOKS WHERE id BETWEEN ? AND ?
You can take advantage of this class to automatically generate the parameters of the BETWEEN clause, based on the passed constructor parameters.
| Constructor and Description |
|---|
NumericBetweenParametersProvider(long fetchSize,
long minVal,
long maxVal)
NumericBetweenParametersProvider constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Serializable[][] |
getParameterValues()
Returns the necessary parameters array to use for query in parallel a table.
|
public NumericBetweenParametersProvider(long fetchSize,
long minVal,
long maxVal)
fetchSize - the max distance between the produced from/to pairsminVal - the lower bound of the produced "from" valuesmaxVal - the upper bound of the produced "to" valuespublic Serializable[][] getParameterValues()
ParameterValuesProvidergetParameterValues in interface ParameterValuesProviderCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.