T
- public abstract class AbstractScanningLoader<T> extends AbstractAttributeLoader<T> implements ScanningAttributeLoader<T>
mySpec
Modifier | Constructor and Description |
---|---|
protected |
AbstractScanningLoader(AttributeSpec<T> spec) |
Modifier and Type | Method and Description |
---|---|
protected AttributeValue<T> |
carryPrecedingValueForSkippedRow(AttributeValue<T> precedingValue) |
protected Integer |
getBaseLevel() |
protected IntList |
getLevelsSorted() |
protected boolean |
isAboveBaseLevel(ScanningAttributeContext context) |
protected boolean |
isLevelSkipped(ScanningAttributeContext context) |
protected boolean |
isRowSkipped(AttributeValue<T> precedingValue,
ScanningAttributeContext context) |
AttributeValue<T> |
loadValue(AttributeValue<T> precedingValue,
ScanningAttributeContext context)
Performs scanning loading.
|
protected abstract T |
loadValueForPassingRow(T precedingValue,
ScanningAttributeContext context) |
getAttributeSpec, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCachingStrategy
isWholeForestDependent, preload
getAttributeDependencies, getAttributeSpec, getContextDependencies, getGlobalTrail
protected AbstractScanningLoader(@NotNull AttributeSpec<T> spec)
protected boolean isLevelSkipped(ScanningAttributeContext context)
protected boolean isAboveBaseLevel(ScanningAttributeContext context)
@Nullable protected Integer getBaseLevel()
@Nullable protected IntList getLevelsSorted()
@Nullable public AttributeValue<T> loadValue(@NotNull AttributeValue<T> precedingValue, @NotNull ScanningAttributeContext context)
ScanningAttributeLoader
Performs scanning loading. Must be a pure function - see ScanningAttributeLoader
.
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
. (Note, however, that if multiple scanning loaders work on the same
attribute, it could be tricky and lead to unexpected results.)
loadValue
in interface ScanningAttributeLoader<T>
precedingValue
- the value of this attribute for the immediately preceding row, or AttributeValue.undefined()
for the very first rowcontext
- loading context@Nullable protected abstract T loadValueForPassingRow(@Nullable T precedingValue, ScanningAttributeContext context)
protected boolean isRowSkipped(AttributeValue<T> precedingValue, ScanningAttributeContext context)
protected AttributeValue<T> carryPrecedingValueForSkippedRow(AttributeValue<T> precedingValue)
Copyright © 2024 Tempo Software. All Rights Reserved.