coldbox.system.cache.store.indexers

Class JDBCMetadataIndexer

lucee.Component
    extended by coldbox.system.cache.store.indexers.MetadataIndexer
      extended by coldbox.system.cache.store.indexers.JDBCMetadataIndexer

This is a utility object that helps object stores keep their items indexed and pretty

Class Attributes:
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(any fields, any config, any store)
          Constructor.
    Method Summary
    any getFields()
         Get the bounded fields list.
    any getObjectMetadata(any objectKey)
         Get a metadata entry for a specific entry.
    any getObjectMetadataProperty(any objectKey, any property)
         Get a specific metadata property for a specific entry.
    any getPoolMetadata()
         Get the entire pool reference.
    any getSize()
         Get the size of the elements indexed.
    any getSortedKeys(any property, [any sortType='text'], [any sortOrder='asc'])
         Get an array of sorted keys for this indexer according to parameters.
    any objectExists(any objectKey)
         Check if the metadata entry exists for an object.
    void setFields(any fields)
         Override the constructed metadata fields this index is binded to.
    private void validateField(any target)
         Validate or thrown an exception on an invalid field.
     
    Methods inherited from class coldbox.system.cache.store.indexers.MetadataIndexer
    clear, clearAll, getKeys, setObjectMetadata, setObjectMetadataProperty
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any fields, any config, any store)

    Constructor

    Parameters:
    fields - The list or array of fields to bind this index on
    config - JDBC Configuration structure
    store - The associated storage

    Method Detail

    getFields

    public any getFields()

    Get the bounded fields list

    Overrides:
    getFields in class MetadataIndexer

    getObjectMetadata

    public any getObjectMetadata(any objectKey)

    Get a metadata entry for a specific entry. Exception if key not found

    Overrides:
    getObjectMetadata in class MetadataIndexer
    Parameters:
    objectKey - The key of the object

    getObjectMetadataProperty

    public any getObjectMetadataProperty(any objectKey, any property)

    Get a specific metadata property for a specific entry

    Overrides:
    getObjectMetadataProperty in class MetadataIndexer
    Parameters:
    objectKey - The key of the object
    property - The property of the metadata to retrieve, must exist in the binded fields or exception is thrown

    getPoolMetadata

    public any getPoolMetadata()

    Get the entire pool reference

    Overrides:
    getPoolMetadata in class MetadataIndexer

    getSize

    public any getSize()

    Get the size of the elements indexed

    Overrides:
    getSize in class MetadataIndexer

    getSortedKeys

    public any getSortedKeys(any property, [any sortType='text'], [any sortOrder='asc'])

    Get an array of sorted keys for this indexer according to parameters

    Overrides:
    getSortedKeys in class MetadataIndexer
    Parameters:
    property - The property field to sort the index on. It must exist in the binded fields or exception
    sortType - The sort ordering: numeric, text or textnocase
    sortOrder - The sort order: asc or desc

    objectExists

    public any objectExists(any objectKey)

    Check if the metadata entry exists for an object

    Overrides:
    objectExists in class MetadataIndexer
    Parameters:
    objectKey - The key of the object

    setFields

    public void setFields(any fields)

    Override the constructed metadata fields this index is binded to

    Overrides:
    setFields in class MetadataIndexer
    Parameters:
    fields - The list or array of fields to bind this index on

    validateField

    private void validateField(any target)

    Validate or thrown an exception on an invalid field

    Overrides:
    validateField in class MetadataIndexer
    Parameters:
    target - The target field to validate