类 JdbcNumericBetweenParametersProvider

  • 所有已实现的接口:
    JdbcParameterValuesProvider

    public class JdbcNumericBetweenParametersProvider
    extends Object
    implements JdbcParameterValuesProvider
    This query parameters generator is an helper class to parameterize from/to queries on a numeric column. The generated array of from/to values will be equally sized to fetchSize (apart from the last one), ranging from minVal up to maxVal.

    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.

    • 构造器详细资料

      • JdbcNumericBetweenParametersProvider

        public JdbcNumericBetweenParametersProvider​(BigDecimal minVal,
                                                    BigDecimal maxVal)
        NumericBetweenParametersProviderJdbc constructor.
        参数:
        minVal - the lower bound of the produced "from" values
        maxVal - the upper bound of the produced "to" values
      • JdbcNumericBetweenParametersProvider

        public JdbcNumericBetweenParametersProvider​(long fetchSize,
                                                    BigDecimal minVal,
                                                    BigDecimal maxVal)
        NumericBetweenParametersProviderJdbc constructor.
        参数:
        fetchSize - the max distance between the produced from/to pairs
        minVal - the lower bound of the produced "from" values
        maxVal - the upper bound of the produced "to" values