diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java index 9d94d7840e2f..98922c05315c 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/option/OptionService.java @@ -65,6 +65,15 @@ public interface OptionService { List getAllOptionSets(); + /** + * Initializes the {@link OptionSet#getOptions()} collections of the supplied managed option sets. + * Collections missing from the second-level cache are loaded together with one bulk query; + * collections present in the cache are initialized from it without SQL. + * + * @param optionSets managed option sets whose options collections should be initialized + */ + void preloadOptions(@Nonnull Collection optionSets); + List