Class SqlDetailFetchMapper<R,I,DQ extends FlexibleRelationalPathBase<DR>,DR>
- java.lang.Object
-
- com.evolveum.midpoint.repo.sqlbase.mapping.SqlDetailFetchMapper<R,I,DQ,DR>
-
- Type Parameters:
R
- type of master rowI
- type of row-PK/detail-FKDQ
- detail Q-type, this will be the base of the selectDR
- detail row type (from result)
public class SqlDetailFetchMapper<R,I,DQ extends FlexibleRelationalPathBase<DR>,DR> extends Object
Mapper/fetcher of many detail records for one master record. Detail fetch/mapper know hows to fetch to-many details related to a master entity.To load the details for the provided list of data use
execute(SqlRepoContext, Supplier, List)
. To load the details for one master entity use#execute(SqlRepoContext, Supplier, R)
.SqlRepoContext
is provided toexecute
instead of constructor, because it is more practical (providing it to constructor is unwieldy).It is easier (and perhaps nicer) to contain all the parametrized types in a single class, that is why execution methods are here.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(SqlRepoContext sqlRepoContext, Supplier<com.querydsl.sql.SQLQuery<?>> querySupplier, List<R> data)
void
execute(SqlRepoContext sqlRepoContext, Supplier<com.querydsl.sql.SQLQuery<?>> querySupplier, R masterRow)
-
-
-
Method Detail
-
execute
public void execute(SqlRepoContext sqlRepoContext, Supplier<com.querydsl.sql.SQLQuery<?>> querySupplier, List<R> data) throws QueryException
- Throws:
QueryException
-
execute
public void execute(SqlRepoContext sqlRepoContext, Supplier<com.querydsl.sql.SQLQuery<?>> querySupplier, R masterRow) throws QueryException
- Throws:
QueryException
-
-