@Component(value="cuba_DynamicAttributesManager") public class DynamicAttributesManager extends java.lang.Object implements DynamicAttributesManagerAPI
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ENTITIES_FOR_ATTRIBUTE_VALUES_BATCH |
NAME
Constructor and Description |
---|
DynamicAttributesManager() |
Modifier and Type | Method and Description |
---|---|
<E extends BaseGenericIdEntity> |
fetchDynamicAttributes(java.util.List<E> entities,
java.util.Set<java.lang.Class> dependentClasses)
Fetch dynamic attributes from database for each entity
|
CategoryAttribute |
getAttributeForMetaClass(MetaClass metaClass,
java.lang.String code)
Get certain category attribute for metaClass by attribute code
|
java.util.Collection<CategoryAttribute> |
getAttributesForMetaClass(MetaClass metaClass)
Get all categories attributes for metaClass from cache
|
DynamicAttributesCache |
getCacheIfNewer(java.util.Date clientCacheDate) |
java.util.Collection<Category> |
getCategoriesForMetaClass(MetaClass metaClass)
Get all categories linked with metaClass from cache
|
void |
loadCache()
Reload dynamic attributes cache from database
|
void |
setClusterManager(ClusterManagerAPI clusterManager) |
void |
storeDynamicAttributes(BaseGenericIdEntity entity)
Store dynamic attributes from the entity to database
|
public static final int MAX_ENTITIES_FOR_ATTRIBUTE_VALUES_BATCH
@Inject public void setClusterManager(ClusterManagerAPI clusterManager)
public void loadCache()
DynamicAttributesManagerAPI
loadCache
in interface DynamicAttributesManagerAPI
public java.util.Collection<Category> getCategoriesForMetaClass(MetaClass metaClass)
DynamicAttributesManagerAPI
getCategoriesForMetaClass
in interface DynamicAttributesManagerAPI
public java.util.Collection<CategoryAttribute> getAttributesForMetaClass(MetaClass metaClass)
DynamicAttributesManagerAPI
getAttributesForMetaClass
in interface DynamicAttributesManagerAPI
@Nullable public CategoryAttribute getAttributeForMetaClass(MetaClass metaClass, java.lang.String code)
DynamicAttributesManagerAPI
getAttributeForMetaClass
in interface DynamicAttributesManagerAPI
public DynamicAttributesCache getCacheIfNewer(java.util.Date clientCacheDate)
getCacheIfNewer
in interface DynamicAttributesManagerAPI
public void storeDynamicAttributes(BaseGenericIdEntity entity)
DynamicAttributesManagerAPI
storeDynamicAttributes
in interface DynamicAttributesManagerAPI
public <E extends BaseGenericIdEntity> void fetchDynamicAttributes(java.util.List<E> entities, @Nonnull java.util.Set<java.lang.Class> dependentClasses)
DynamicAttributesManagerAPI
fetchDynamicAttributes
in interface DynamicAttributesManagerAPI