Class SqlDetailFetchMapper<R,​I,​DQ extends FlexibleRelationalPathBase<DR>,​DR>

  • Type Parameters:
    R - type of master row
    I - type of row-PK/detail-FK
    DQ - detail Q-type, this will be the base of the select
    DR - 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 to execute 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.