/** * Return all normalized containers where key is the identifier. Note the result does not use cache, so reflect the * current state of internal representation and implies a poor performance. Cache manager is not involved. * * @return the whole set of containers. Key is the normalized identifier. Value is the corresponding LDAP container * containing real CN, DN and normalized UID members. * * @since 3.0.2 */ default Map<String, T> findAllNoCache() { return findAll(); }
/** * Return the container corresponding to the given identifier using the user cache. * * @param id * The container's identifier. Case is sensitive. Corresponds to the normalized container's name. * @return The container corresponding to the given identifier. May be <code>null</code> */ default T findById(final String id) { return findAll().get(id); }
/** * Return the internal representation of the container set. Not existing * cache items are removed. * * @param cacheItems * The database base cache containers to convert. * @return The internal representation of container set. Ordered is kept. */ protected Set<T> toInternal(final Collection<C> cacheItems) { return cacheItems.stream().map(CacheContainer::getId).map(getRepository().findAll()::get).filter(Objects::nonNull) .collect(Collectors.toCollection(LinkedHashSet::new)); }