Package io.jmix.core.impl
Class CachingLoadedPropertiesInfo
java.lang.Object
io.jmix.core.impl.CachingLoadedPropertiesInfo
- All Implemented Interfaces:
LoadedPropertiesInfo,Serializable
Implementation of
LoadedPropertiesInfo that caches information about loaded properties to avoid
expensive operations for the same instance and property.
Used by default for JPA entities.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()booleanisLoaded(Object entity, String property, PersistentAttributesLoadChecker checker) Checks whether the property is loaded from the data store.isLoadedSafe(Object entity, String property, PersistentAttributesLoadChecker checker) Checks whether the property is loaded from the data store without risking fetching it.voidregisterProperty(String name, boolean loaded)
-
Constructor Details
-
CachingLoadedPropertiesInfo
public CachingLoadedPropertiesInfo()
-
-
Method Details
-
isLoaded
Description copied from interface:LoadedPropertiesInfoChecks whether the property is loaded from the data store. This may trigger fetching of the property if its state cannot be determined using standard mechanisms.- Specified by:
isLoadedin interfaceLoadedPropertiesInfo- See Also:
-
isLoadedSafe
public EntityStates.PropertyLoadedState isLoadedSafe(Object entity, String property, PersistentAttributesLoadChecker checker) Description copied from interface:LoadedPropertiesInfoChecks whether the property is loaded from the data store without risking fetching it.- Specified by:
isLoadedSafein interfaceLoadedPropertiesInfo- See Also:
-
registerProperty
- Specified by:
registerPropertyin interfaceLoadedPropertiesInfo
-
copy
- Specified by:
copyin interfaceLoadedPropertiesInfo
-