Package io.jmix.dynattr.impl
Class DynAttrManagerImpl
java.lang.Object
io.jmix.dynattr.impl.DynAttrManagerImpl
- All Implemented Interfaces:
- DynAttrManager
@Component("dynat_DynamicModelManager")
public class DynAttrManagerImpl
extends Object
implements DynAttrManager
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected Stringprotected DynAttrMetadataprotected EntityStatesprotected ExtendedEntitiesprotected FetchPlanRepositoryprotected FetchPlansstatic final intprotected Metadataprotected MetadataToolsprotected ReferenceToEntitySupportprotected StoreAwareLocator
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDynamicAttributesState(Collection<Object> entities, FetchPlan fetchPlan) Adds extra state for each entity and related entities based on thefetchPlancollectEntitiesToLoad(Collection<Object> entities, FetchPlan fetchPlan) collectEntityClasses(FetchPlan fetchPlan, Set<FetchPlan> visited) protected voiddoFetchValues(MetaClass metaClass, Collection<Object> entities, Collection<AccessConstraint<?>> accessConstraints) protected voiddoStoreCollectionValue(CategoryAttributeValue collectionAttributeValue) Removes nestedCategoryAttributeValueentities for items that were removed from the collection value and creates new childCategoryAttributeValueinstances for just added collection value items.protected voiddoStoreValues(Object entity, Collection<AccessConstraint<?>> accessConstraints) protected List<CategoryAttributeValue>protected voidfetchEntityValues(Collection<AccessConstraint<?>> accessConstraints, List<CategoryAttributeValue> values) Method loads entity values for CategoryAttributeValues of entity type and sets entity values to the corresponding property of theCategoryAttributeValueentity.protected List<CategoryAttributeValue>findValuesByEntityIds(MetaClass metaClass, List<Object> entityIds) protected List<CategoryAttributeValue>loadValues(MetaClass metaClass, Collection<AccessConstraint<?>> accessConstraints, List<Object> entityIds) voidloadValues(Collection<Object> entities, FetchPlan fetchPlan, Collection<AccessConstraint<?>> accessConstraints) Fetch dynamic attributes from dynamic attributes store for each entityprotected voidvoidstoreValues(Collection<Object> entities, Collection<AccessConstraint<?>> accessConstraints) Store dynamic attributes from the entity to store
- 
Field Details- 
MAX_ENTITIES_FOR_ATTRIBUTE_VALUES_BATCHpublic static final int MAX_ENTITIES_FOR_ATTRIBUTE_VALUES_BATCH- See Also:
 
- 
storeAwareLocator
- 
metadata
- 
metadataTools
- 
extendedEntities
- 
referenceToEntitySupport
- 
entityStates
- 
dynAttrMetadata
- 
fetchPlanRepository
- 
fetchPlans
- 
accessManager
- 
dynamicAttributesStore
 
- 
- 
Constructor Details- 
DynAttrManagerImplpublic DynAttrManagerImpl()
 
- 
- 
Method Details- 
storeValuespublic void storeValues(Collection<Object> entities, Collection<AccessConstraint<?>> accessConstraints) Description copied from interface:DynAttrManagerStore dynamic attributes from the entity to store- Specified by:
- storeValuesin interface- DynAttrManager
 
- 
loadValuespublic void loadValues(Collection<Object> entities, @Nullable FetchPlan fetchPlan, Collection<AccessConstraint<?>> accessConstraints) Description copied from interface:DynAttrManagerFetch dynamic attributes from dynamic attributes store for each entity- Specified by:
- loadValuesin interface- DynAttrManager
 
- 
addDynamicAttributesStateDescription copied from interface:DynAttrManagerAdds extra state for each entity and related entities based on thefetchPlan- Specified by:
- addDynamicAttributesStatein interface- DynAttrManager
 
- 
doStoreValues
- 
doStoreCollectionValueRemoves nestedCategoryAttributeValueentities for items that were removed from the collection value and creates new childCategoryAttributeValueinstances for just added collection value items.- Parameters:
- collectionAttributeValue-
 
- 
doFetchValuesprotected void doFetchValues(MetaClass metaClass, Collection<Object> entities, Collection<AccessConstraint<?>> accessConstraints) 
- 
loadValuesprotected List<CategoryAttributeValue> loadValues(MetaClass metaClass, Collection<AccessConstraint<?>> accessConstraints, List<Object> entityIds) 
- 
findValuesByEntityIdsprotected List<CategoryAttributeValue> findValuesByEntityIds(MetaClass metaClass, List<Object> entityIds) 
- 
fetchEntityValuesprotected void fetchEntityValues(Collection<AccessConstraint<?>> accessConstraints, List<CategoryAttributeValue> values) Method loads entity values for CategoryAttributeValues of entity type and sets entity values to the corresponding property of theCategoryAttributeValueentity.
- 
fetchCollectionValues
- 
collectEntitiesToLoadprotected com.google.common.collect.Multimap<MetaClass,Object> collectEntitiesToLoad(Collection<Object> entities, @Nullable FetchPlan fetchPlan) 
- 
collectEntityClasses
- 
setValueToCategoryAttributeValue
 
-