Class AbstractProvider<K extends Identifiable,C extends FeignQuerySupport<K>,Q extends com.github.rutledgepaulv.qbuilders.builders.QBuilder<Q>>
- java.lang.Object
-
- cern.nxcals.api.extraction.metadata.AbstractProvider<K,C,Q>
-
- Type Parameters:
K
- Client data type.C
- Client service type.Q
- Condition (query) type
- All Implemented Interfaces:
Queryable<K,Q>
- Direct Known Subclasses:
GroupProvider
,HierarchyChangelogProvider
,HierarchyVariablesChangelogProvider
,PartitionResourceInfoProvider
public abstract class AbstractProvider<K extends Identifiable,C extends FeignQuerySupport<K>,Q extends com.github.rutledgepaulv.qbuilders.builders.QBuilder<Q>> extends java.lang.Object implements Queryable<K,Q>
Abstract class for data providers.
-
-
Constructor Summary
Constructors Constructor Description AbstractProvider(C httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<K>
findAll(@NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Searching for multiple values.java.util.Optional<K>
findOne(@NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
This implementation is never cached.protected com.github.benmanes.caffeine.cache.Cache<java.lang.String,K>
getCache()
-
-
-
Constructor Detail
-
AbstractProvider
public AbstractProvider(C httpClient)
-
-
Method Detail
-
findAll
public java.util.Set<K> findAll(@NonNull @NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
Description copied from interface:Queryable
Searching for multiple values.- Specified by:
findAll
in interfaceQueryable<K extends Identifiable,C extends FeignQuerySupport<K>>
- Returns:
-
findOne
public java.util.Optional<K> findOne(@NonNull @NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
This implementation is never cached. If you need a cache version please override it and use findOneWithCache implementation provided here.- Specified by:
findOne
in interfaceQueryable<K extends Identifiable,C extends FeignQuerySupport<K>>
- Parameters:
condition
-- Returns:
-
getCache
protected com.github.benmanes.caffeine.cache.Cache<java.lang.String,K> getCache()
-
-