0

add JdbcTemplate

like Spring Data
This commit is contained in:
2021-01-02 20:27:11 +03:00
parent 5f2e208453
commit c0c1ede462
9 changed files with 320 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
package ghast.database;
import java.util.List;
import java.util.Map;
public interface JdbcOperations {
void execute(String sql) throws DataAccessException;
<T> T query(String sql, ResultSetExtractor<T> rse) throws DataAccessException;
<T> List<T> query(String sql, RowMapper<T> rowMapper) throws DataAccessException;
<T> T queryForObject(String sql, RowMapper<T> rowMapper) throws DataAccessException;
Map<String, Object> queryForMap(String sql) throws DataAccessException;
List<Map<String, Object>> queryForList(String sql) throws DataAccessException;
int update(String sql) throws DataAccessException;
int delete(String sql) throws DataAccessException;
}