Class PredefinableTypeCache
java.lang.Object
de.hybris.platform.datahubbackoffice.dataaccess.PredefinableTypeCache
A cache for data access
DataTypes.
The type names can be predefined before the actual DataTypes placed into the cache-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(com.hybris.cockpitng.dataaccess.facades.type.DataType type) Adds a data type to this cache.protected PredefinableTypeCacheDefines type(s) that may be added to the cache.define(Collection<String> codes) Defines types that may be added to the cache.protected voiddefineType(String code) com.hybris.cockpitng.dataaccess.facades.type.DataTypeRetrieves item from the cache.booleanDetermines whether the type code has be defined in this cache.booleanisEmpty()Determines whether this cache was defined or contains already some elements
-
Constructor Details
-
PredefinableTypeCache
public PredefinableTypeCache()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Determines whether this cache was defined or contains already some elements- Returns:
true, if there is not type known by this cache;false, if types were defined or already added.
-
add
Adds a data type to this cache.- Parameters:
type- type to add- Returns:
- the cache with the type added
-
addType
protected PredefinableTypeCache addType(String code, com.hybris.cockpitng.dataaccess.facades.type.DataType value) -
get
Retrieves item from the cache.- Parameters:
code- code of the type to retrieve- Returns:
- the item type corresponding to the code or
null, if the type was never added to this cache.
-
isDefined
Determines whether the type code has be defined in this cache.- Parameters:
code- a type code to check- Returns:
true, if the code has be defined or the data type was added;false, otherwise.
-
define
Defines type(s) that may be added to the cache.- Parameters:
codes- type codes to define in this cache- Returns:
- this cache with the type codes defined
-
define
Defines types that may be added to the cache.- Parameters:
codes- type codes to define in this cache- Returns:
- this cache with the type codes defined
-
defineType
-
definedCodes
-