Class AbstractFieldCacheItem

    • Constructor Detail

      • AbstractFieldCacheItem

        public AbstractFieldCacheItem​(FieldProvider provider)
        Initializes the cache.
        Parameters:
        provider - the field provider
    • Method Detail

      • getFieldProvider

        public FieldProvider getFieldProvider()
        Returns the underlying field provider.
        Returns:
        the field provider
      • clear

        public void clear()
        Clears the cache.
      • isInitialized

        public boolean isInitialized()
        Checks whether the cache is initialized.
        Returns:
        true if initialized
      • getValues

        public List<AbstractField> getValues​(FieldType fieldType)
        Returns the cached values for the specified field type.
        Parameters:
        fieldType - the field type to get the values for
        Returns:
        the cached values
      • getValues

        public List<AbstractField> getValues​(FieldType fieldType,
                                             DataType dataType)
        Returns the cached values for the specified field/data type.
        Parameters:
        fieldType - the field type to get the values for
        dataType - the data type to get the values for
        Returns:
        the cached values
      • newField

        protected abstract AbstractField newField​(AbstractField field)
        Creates a new field.
        Parameters:
        field - the field to transform
        Returns:
        the transformed field
      • newSuffixField

        protected abstract AbstractField newSuffixField​(AbstractField field)
        Creates a new suffix field.
        Parameters:
        field - the field to transform
        Returns:
        the suffix field
      • newPrefixField

        protected abstract AbstractField newPrefixField​(AbstractField field)
        Creates a new prefix field.
        Parameters:
        field - the field to transform
        Returns:
        the prefix field
      • initCache

        protected void initCache()
        Initializes the cache, if necessary (i.e., m_Cache is null). Notifies all listeners about the update.
      • addCacheListener

        public void addCacheListener​(FieldType fieldtype,
                                     FieldCacheUpdateListener l)
        Adds a cache listener.
        Parameters:
        fieldtype - the fieldtype to register the listener for
        l - the listener to add
      • removeCacheListener

        public void removeCacheListener​(FieldType fieldtype,
                                        FieldCacheUpdateListener l)
        Removes a cache listener.
        Parameters:
        fieldtype - the fieldtype to unregister the listener for
        l - the listener to remove
      • removeCacheListeners

        public void removeCacheListeners()
        Removes all cache listeners.