return Optional.ofNullable(mapper(dbSession).selectByKey(key));
}
+ public List<PortfolioDto> selectByKeys(DbSession dbSession, Set<String> portfolioDbKeys) {
+ return executeLargeInputs(portfolioDbKeys, input -> mapper(dbSession).selectByKeys(input));
+ }
+
public Optional<PortfolioDto> selectByUuid(DbSession dbSession, String uuid) {
return Optional.ofNullable(mapper(dbSession).selectByUuid(uuid));
}
private static PortfolioMapper mapper(DbSession session) {
return session.getMapper(PortfolioMapper.class);
}
+
}
@CheckForNull
PortfolioDto selectByKey(String key);
+ List<PortfolioDto> selectByKeys(@Param("keys")List<String> keys);
+
@CheckForNull
PortfolioDto selectByUuid(String uuid);
List<PortfolioProjectDto> selectAllPortfolioProjects();
List<ReferenceDto> selectAllReferencesInHierarchy(String rootUuid);
+
+
}
p.kee=#{kee,jdbcType=VARCHAR}
</select>
+ <select id="selectByKeys" parameterType="String" resultType="Portfolio">
+ SELECT
+ <include refid="portfolioColumns"/>
+ FROM portfolios p
+ where
+ p.kee in
+ <foreach collection="keys" open="(" close=")" item="key" separator=",">
+ #{key,jdbcType=VARCHAR}
+ </foreach>
+ </select>
+
<select id="selectAll" resultType="Portfolio">
SELECT
<include refid="portfolioColumns"/>