Interface ItemAttributeLoader<T>

Type Parameters:
T - type of the loaded value
All Superinterfaces:
AttributeLoader<T>
All Known Implementing Classes:
AbstractItemAttributeLoader, BaseItemAttributeLoader, DelegatingItemAttributeLoader, IssueAttributeLoader, ItemClassAttributeLoader, ItemTypeAttributeLoader

@PublicSpi public interface ItemAttributeLoader<T> extends AttributeLoader<T>

Item loaders calculate attribute value for a particular item, based on ItemIdentity. The value loaded does not depend on a particular forest and generally will be the same for all structures (unless structure context dependency is declared, see below).

Values calculated by item loaders are stored in the per-item cache and shared between structures.

Item attributes may, but should not depend on row-based attributes. If that happens though, they will be stored in a per-forest cache. If you have such an attribute, consider splitting it into an item and derived attributes.

If an item attribute declares context dependency on structure (by including AttributeContextDependency.STRUCTURE in the result of AttributeLoader.getContextDependencies()), then, although it will still work as an item attribute, it will be able to return different values for the same item, depending on the current structure (retrieved via AttributeContext.getBaseStructureId()).

See Also: