public static class BiDerivedAttributeLoaderBuilder.BuiltBiDerivedLoader<T,X,Y> extends AbstractDerivedAttributeLoader<T>
mySpec| Constructor and Description |
|---|
BuiltBiDerivedLoader(AttributeSpec<T> spec,
AttributeSpec<? extends X> xDependency,
AttributeSpec<? extends Y> yDependency,
boolean yield,
BiFunction<X,Y,T> derivationFunction,
Function<X,ItemIdentity> xTrailFunction,
Function<Y,ItemIdentity> yTrailFunction,
Set<AttributeContextDependency> contextDependencies,
AttributeCachingStrategy cachingStrategy,
TrailItemSet globalTrail) |
| Modifier and Type | Method and Description |
|---|---|
Set<AttributeSpec<?>> |
getAttributeDependencies()
Returns attributes that need to be loaded prior to calling this loader's loading function.
|
AttributeCachingStrategy |
getCachingStrategy()
Indicates how the values provided by this loader should be cached.
|
Set<AttributeContextDependency> |
getContextDependencies()
Indicates which context values are used to calculate the value of the attribute.
|
TrailItemSet |
getGlobalTrail()
Returns global trail.
|
protected T |
getValue(X x,
Y y,
DerivedAttributeContext context) |
AttributeValue<T> |
loadValue(DerivedAttributeContext context)
Performs the loading.
|
getAttributeSpec, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeSpecpublic BuiltBiDerivedLoader(AttributeSpec<T> spec, AttributeSpec<? extends X> xDependency, AttributeSpec<? extends Y> yDependency, boolean yield, BiFunction<X,Y,T> derivationFunction, Function<X,ItemIdentity> xTrailFunction, Function<Y,ItemIdentity> yTrailFunction, Set<AttributeContextDependency> contextDependencies, AttributeCachingStrategy cachingStrategy, TrailItemSet globalTrail)
@Nullable public Set<AttributeSpec<?>> getAttributeDependencies()
AttributeLoaderReturns 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.
null if there are noneAttributeLoaderContext.getDependencyValue(com.almworks.jira.structure.api.attribute.AttributeSpec<V>)@Nullable public AttributeValue<T> loadValue(@NotNull DerivedAttributeContext context)
DerivedAttributeLoaderPerforms 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.
context - loading context@Nullable protected T getValue(@NotNull X x, @NotNull Y y, DerivedAttributeContext context)
@Nullable public Set<AttributeContextDependency> getContextDependencies()
AttributeLoaderIndicates 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.
null if there are none@Nullable public AttributeCachingStrategy getCachingStrategy()
AttributeLoaderIndicates how the values provided by this loader should be cached.
The returned value must be the same throughout the lifetime of the object.
null has the same effect as AttributeCachingStrategy.MAY@Nullable public TrailItemSet getGlobalTrail()
AttributeLoaderReturns 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.
null if noneCopyright © 2022 ALM Works. All Rights Reserved.