1 package com.randomnoun.common.spring;
2
3 import org.springframework.jdbc.core.RowMapper;
4
5 /** A SelectFromRowMapper is pretty much the same as a RowMapper, except
6 * it knows what columns and tables to query (i.e. the 'SELECT' and 'FROM' clauses of the SQL),
7 * so the caller only needs to supply WHERE and ORDER BY SQL clauses
8 *
9 * @author knoxg
10 */
11 public interface SelectFromRowMapper<T> extends RowMapper<T> {
12
13 // cte can be used to set up common table expressions ('WITH' statements) before the SELECT
14
15 default public String getCte() { return null; }
16
17 public String getSelect();
18
19 public String getFrom();
20
21 // this might be a good place to add pagination constraints as well, once we add that to the API
22
23 }