public abstract class SimpleDerivedAttributeLoader<T,D> extends AbstractDerivedAttributeLoader<T>
| Modifier and Type | Field and Description |
|---|---|
protected AttributeSpec<? extends D> |
myDependency |
mySpec| Modifier | Constructor and Description |
|---|---|
protected |
SimpleDerivedAttributeLoader(AttributeSpec<T> spec,
AttributeSpec<? extends D> dependency) |
protected |
SimpleDerivedAttributeLoader(AttributeSpec<T> spec,
AttributeSpec<? extends D> dependency,
boolean yield) |
| Modifier and Type | Method and Description |
|---|---|
Set<AttributeSpec<?>> |
getAttributeDependencies()
Returns attributes that need to be loaded prior to calling this loader's loading function.
|
protected abstract T |
getValue(D value,
DerivedAttributeContext context) |
static <T> AttributeLoader<T> |
idLoader(AttributeSpec<T> spec,
AttributeSpec<T> dependency) |
AttributeValue<T> |
loadValue(DerivedAttributeContext context)
Performs the loading.
|
getAttributeSpec, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeSpec, getCachingStrategy, getContextDependencies, getGlobalTrailprotected final AttributeSpec<? extends D> myDependency
protected SimpleDerivedAttributeLoader(AttributeSpec<T> spec, AttributeSpec<? extends D> dependency)
protected SimpleDerivedAttributeLoader(AttributeSpec<T> spec, AttributeSpec<? extends D> dependency, boolean yield)
spec - dependency - yield - if true, then error and null values will be returned as null, thus allowing other loaders
to provide other values for the attribute; if false, this method will always return somethingpublic final 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>)public AttributeValue<T> loadValue(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 abstract T getValue(@NotNull D value, DerivedAttributeContext context)
value - context - public static <T> AttributeLoader<T> idLoader(AttributeSpec<T> spec, AttributeSpec<T> dependency)
Copyright © 2021 ALM Works. All Rights Reserved.