Interface SingleRowAttributeLoader<T>
- Type Parameters:
T- type of the loaded value
- All Superinterfaces:
AttributeLoader<T>,RowAttributeLoader<T>
- All Known Implementing Classes:
AbstractSingleRowAttributeLoader,BaseSingleRowAttributeLoader
A single row attribute loader provides an attribute value based on a single forest row. The value must not depend on where this row is in the forest.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionloadValue(StructureRow row, SingleRowAttributeContext context) The loading function.Methods inherited from interface AttributeLoader
getAttributeDependencies, getAttributeSpec, getCachingStrategy, getContextDependencies, getGlobalTrailMethods inherited from interface RowAttributeLoader
isWholeForestDependent, preload
-
Method Details
-
loadValue
@Nullable AttributeValue<T> loadValue(@NotNull StructureRow row, @NotNull SingleRowAttributeContext context) The loading function. The implementation is expected to take
rowand provide a value.Before this method is called,
RowAttributeLoader.preload(com.almworks.integers.LongSet, com.almworks.jira.structure.api.forest.item.ItemForest, com.almworks.jira.structure.api.attribute.loader.AttributeContext)has been called for a set of rows that included this row, and that was a part of the same loading process, sharing the same context (so all values put into the context are still there).The exception to this rule is the super-root row, which is not included in the preload call. See
SuperRootRowfor more information about the super-root.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 returnnull.- Parameters:
row- the row to load the value forcontext- loading context- Returns:
- attribute value, or
nullto pass on loading a value for this item
-