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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributeSpec
public 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()
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.
null
if there are noneAttributeLoaderContext.getDependencyValue(com.almworks.jira.structure.api.attribute.AttributeSpec<V>)
@Nullable public AttributeValue<T> loadValue(@NotNull DerivedAttributeContext context)
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
.
context
- loading context@Nullable protected T getValue(@NotNull X x, @NotNull Y y, DerivedAttributeContext context)
@Nullable public Set<AttributeContextDependency> getContextDependencies()
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.
null
if there are none@Nullable public AttributeCachingStrategy getCachingStrategy()
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.
null
has the same effect as AttributeCachingStrategy.MAY
@Nullable public TrailItemSet getGlobalTrail()
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.
null
if noneCopyright © 2024 Tempo Software. All Rights Reserved.