Class BiDerivedAttributeLoaderBuilder.BuiltBiDerivedLoader<T,X,Y>

All Implemented Interfaces:
AttributeLoader<T>, DerivedAttributeLoader<T>
Enclosing class:
BiDerivedAttributeLoaderBuilder<T,X,Y>

public static class BiDerivedAttributeLoaderBuilder.BuiltBiDerivedLoader<T,X,Y> extends AbstractDerivedAttributeLoader<T>
  • Constructor Details

  • Method Details

    • getAttributeDependencies

      @Nullable public Set<AttributeSpec<?>> getAttributeDependencies()
      Description copied from interface: AttributeLoader

      Returns attributes that need to be loaded prior to calling this loader's loading function.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      the set of attribute dependencies, or null if there are none
      See Also:
    • loadValue

      @Nullable public AttributeValue<T> loadValue(@NotNull DerivedAttributeContext context)
      Description copied from interface: DerivedAttributeLoader

      Performs the loading.

      If the value is missing or empty, the loader should return AttributeValue.undefined(). If for some reason this loader is not applicable for the given row, it should return null.

      Parameters:
      context - loading context
      Returns:
      the calculated value
    • getValue

      @Nullable protected T getValue(@NotNull X x, @NotNull Y y, DerivedAttributeContext context)
    • getContextDependencies

      @Nullable public Set<AttributeContextDependency> getContextDependencies()
      Description copied from interface: AttributeLoader

      Indicates which context values are used to calculate the value of the attribute.

      For example, if the calculated value depends on the current user, the return value from this method must include AttributeContextDependency.USER.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      the set of context dependencies or null if there are none
    • getCachingStrategy

      @Nullable public AttributeCachingStrategy getCachingStrategy()
      Description copied from interface: AttributeLoader

      Indicates how the values provided by this loader should be cached.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      caching strategy, null has the same effect as AttributeCachingStrategy.MAY
    • getGlobalTrail

      @Nullable public TrailItemSet getGlobalTrail()
      Description copied from interface: AttributeLoader

      Returns global trail. When an item from a global trail changes, all values calculated for this attribute will be invalidated and will need to be recalculated.

      The returned value must be the same throughout the lifetime of the object.

      Returns:
      global trail set, or null if none