ENTITY
- the type of object this runner supportsBUILDER
- the type of object that can construct new ENTITY
instancespublic class SqlRunner<ENTITY,BUILDER> extends Object
Statement
s,
executing SQL, and parsing ResultSet
s.
Most users of hrorm will have no need to directly use this.
Modifier | Constructor and Description |
---|---|
|
SqlRunner(Connection connection,
KeylessDaoDescriptor<ENTITY,BUILDER> daoDescriptor) |
protected |
SqlRunner(Connection connection,
List<Column<ENTITY,BUILDER>> allColumns) |
Modifier and Type | Method and Description |
---|---|
<T,X> T |
foldingSelect(String sql,
Supplier<BUILDER> supplier,
SelectColumnList selectColumnList,
Map<String,? extends Column<ENTITY,?>> columnNameMap,
List<? extends ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors,
ENTITY template,
Function<BUILDER,X> buildFunction,
T identity,
BiFunction<T,X,T> accumulator) |
void |
insert(String sql,
Envelope<ENTITY> envelope) |
List<BUILDER> |
select(String sql,
Supplier<BUILDER> supplier,
List<ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors) |
List<BUILDER> |
selectByColumns(String sql,
Supplier<BUILDER> supplier,
SelectColumnList selectColumnList,
Map<String,? extends Column<ENTITY,?>> columnNameMap,
List<? extends ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors,
ENTITY item) |
void |
update(String sql,
Envelope<ENTITY> envelope) |
protected SqlRunner(Connection connection, List<Column<ENTITY,BUILDER>> allColumns)
public SqlRunner(Connection connection, KeylessDaoDescriptor<ENTITY,BUILDER> daoDescriptor)
public List<BUILDER> select(String sql, Supplier<BUILDER> supplier, List<ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors)
public List<BUILDER> selectByColumns(String sql, Supplier<BUILDER> supplier, SelectColumnList selectColumnList, Map<String,? extends Column<ENTITY,?>> columnNameMap, List<? extends ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors, ENTITY item)
public <T,X> T foldingSelect(String sql, Supplier<BUILDER> supplier, SelectColumnList selectColumnList, Map<String,? extends Column<ENTITY,?>> columnNameMap, List<? extends ChildrenDescriptor<ENTITY,?,BUILDER,?>> childrenDescriptors, ENTITY template, Function<BUILDER,X> buildFunction, T identity, BiFunction<T,X,T> accumulator)
Copyright © 2019. All rights reserved.