Class PredefinableTypeCache

java.lang.Object
de.hybris.platform.datahubbackoffice.dataaccess.PredefinableTypeCache

public class PredefinableTypeCache extends Object
A cache for data access DataTypes. The type names can be predefined before the actual DataTypes placed into the cache
  • 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

      public PredefinableTypeCache add(com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      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

      public com.hybris.cockpitng.dataaccess.facades.type.DataType get(String code)
      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

      public boolean isDefined(String code)
      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

      public PredefinableTypeCache define(String... codes)
      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

      public PredefinableTypeCache define(Collection<String> codes)
      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

      protected void defineType(String code)
    • definedCodes

      public Collection<String> definedCodes()