Class CompositeAttributeLoader<T,L extends AttributeLoader<T>>
- All Implemented Interfaces:
AttributeLoader<T>
-
Field Summary
Fields inherited from class AbstractAttributeLoader
mySpec -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompositeAttributeLoader(AttributeSpec<T> spec, Collection<L> loaders) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AttributeLoader<T>create(AttributeSpec<T> spec, List<AttributeLoader<T>> loaders) Set<AttributeSpec<?>>Returns attributes that need to be loaded prior to calling this loader's loading function.Indicates how the values provided by this loader should be cached.static <L extends AttributeLoader<?>>
AttributeCachingStrategygetCompositeCachingStrategy(AttributeSpec<?> spec, Collection<L> loaders) static <L extends AttributeLoader<?>>
Set<AttributeContextDependency>getCompositeContextDependencies(Collection<L> loaders) static <L extends AttributeLoader<?>>
Set<AttributeSpec<?>>getCompositeDependencies(Collection<L> loaders) static <L extends AttributeLoader<?>>
TrailItemSetgetCompositeGlobalTrail(Collection<L> loaders) Indicates which context values are used to calculate the value of the attribute.Returns global trail.getLoaderClasses(AttributeLoader<?> loader) Methods inherited from class AbstractAttributeLoader
getAttributeSpec, toString
-
Constructor Details
-
CompositeAttributeLoader
-
-
Method Details
-
create
public static <T> AttributeLoader<T> create(AttributeSpec<T> spec, List<AttributeLoader<T>> loaders) -
getCachingStrategy
Description copied from interface:AttributeLoaderIndicates how the values provided by this loader should be cached.
The returned value must be the same throughout the lifetime of the object.
- Returns:
- caching strategy,
nullhas the same effect asAttributeCachingStrategy.MAY
-
getAttributeDependencies
Description copied from interface: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.
- Returns:
- the set of attribute dependencies, or
nullif there are none - See Also:
-
getContextDependencies
Description copied from interface: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.
- Returns:
- the set of context dependencies or
nullif there are none
-
getGlobalTrail
Description copied from interface: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.
- Returns:
- global trail set, or
nullif none
-
getCompositeCachingStrategy
public static <L extends AttributeLoader<?>> AttributeCachingStrategy getCompositeCachingStrategy(AttributeSpec<?> spec, Collection<L> loaders) -
getCompositeDependencies
public static <L extends AttributeLoader<?>> Set<AttributeSpec<?>> getCompositeDependencies(Collection<L> loaders) -
getCompositeContextDependencies
public static <L extends AttributeLoader<?>> Set<AttributeContextDependency> getCompositeContextDependencies(Collection<L> loaders) -
getCompositeGlobalTrail
public static <L extends AttributeLoader<?>> TrailItemSet getCompositeGlobalTrail(Collection<L> loaders) -
getLoaderClasses
-