Class GenericSqlQuery<T>

    • Constructor Detail

      • GenericSqlQuery

        public GenericSqlQuery()
    • Method Detail

      • setRowMapper

        public void setRowMapper(RowMapper<T> rowMapper)
        Set a specific RowMapper instance to use for this query.
      • setRowMapperClass

        public void setRowMapperClass(java.lang.Class<? extends RowMapper> rowMapperClass)
        Set a RowMapper class for this query, creating a fresh RowMapper instance per execution.
      • newRowMapper

        protected RowMapper<T> newRowMapper(@Nullable
                                            java.lang.Object[] parameters,
                                            java.util.Map<?,?> context)
        Description copied from class: SqlQuery
        Subclasses must implement this method to extract an object per row, to be returned by the execute method as an aggregated List.
        Specified by:
        newRowMapper in class SqlQuery<T>
        parameters - the parameters to the execute() method, in case subclass is interested; may be null if there were no parameters.
        context - contextual information passed to the mapRow callback method. The JDBC operation itself doesn't rely on this parameter, but it can be useful for creating the objects of the result list.
        See Also:
        SqlQuery.execute(java.lang.Object[], java.util.Map<?, ?>)