All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.jdbc.statements.SelectStatementDefault.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






SelectStatementDefault (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.jdbc.statements

Class SelectStatementDefault

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
    • Constructor Detail

      • SelectStatementDefault

        public SelectStatementDefault(Connection connection,
                                      JdbcUtils jdbcUtils)
    • Method Detail

      • getJdbcUtils

        protected JdbcUtils getJdbcUtils()
      • selectListAndTotal

        public <T> ItemsAndTotalCount<T> selectListAndTotal(ResultSetHandler<T> resultSetHandler)
        Description copied from interface: SelectStatement
        Executes the SELECT query but also returns the total of items. It will remove the LIMIT clause if there is one to compute the total. For the generated "total" query to work there are a couple of rules : - The original query MUST start with SELECT and contains a FROM. All conditions between this SELECT keyword and the FROM keyword will be removed and replaced by a COUNT(*). - If the query contains a LIMIT clause, the last occurence will be remove and everything after it too. If your query doesn't meet those rules, you'll have to retrieve the total another way...
        Specified by:
        selectListAndTotal in interface SelectStatement
      • getTotalFromSelectQuery

        protected long getTotalFromSelectQuery(Connection connection)
        Returns -1 to indicate the number of items should be taken instead of the total found by a generated query.

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy