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, PartitionResourceHistoryProvider

public abstract class AbstractProvider<K extends Identifiable,C extends FeignQuerySupport<K>,Q extends com.github.rutledgepaulv.qbuilders.builders.QBuilder<Q>> extends Object implements Queryable<K,Q>
Abstract class for data providers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractProvider(C httpClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    findAll(@NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
    Searching for multiple values.
    findOne(@NonNull com.github.rutledgepaulv.qbuilders.conditions.Condition<Q> condition)
    This implementation is never cached.
    protected com.github.benmanes.caffeine.cache.Cache<String,K>
     
    protected void
    validate(com.github.rutledgepaulv.qbuilders.conditions.Condition<?> condition)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface cern.nxcals.api.extraction.metadata.Queryable

    findById
  • Constructor Details

    • AbstractProvider

      public AbstractProvider(C httpClient)
  • Method Details

    • validate

      protected void validate(com.github.rutledgepaulv.qbuilders.conditions.Condition<?> condition)
    • findAll

      public 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 interface Queryable<K extends Identifiable,C extends FeignQuerySupport<K>>
      Parameters:
      condition -
      Returns:
    • findOne

      public 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 interface Queryable<K extends Identifiable,C extends FeignQuerySupport<K>>
      Parameters:
      condition -
      Returns:
    • getCache

      protected com.github.benmanes.caffeine.cache.Cache<String,K> getCache()