lucee.Componentcoldbox.system.cache.store.indexers.MetadataIndexer
Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This is a utility object that helps object stores keep their elements indexed and stored nicely. It is also a nice way to give back metadata results.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
fields
The fields this indexer is tracking.
|
true
|
false
|
|
any
|
indexID
The human id of this indexer.
|
true
|
false
|
|
any<java.util.concurrent.ConcurrentHashMap>
|
poolMetadata
The metadata pool.
|
true
|
false
|
Constructor Summary | |
---|---|
init(any fields)
Constructor. |
Method Summary | |
---|---|
MetadataIndexer
|
clear(any objectKey)
Clears an object from the storage. |
MetadataIndexer
|
clearAll()
Clear all the elements in the store. |
string
|
getFields()
|
string
|
getIndexID()
|
array
|
getKeys()
Get all the store's object keys array. |
struct
|
getObjectMetadata(any objectKey)
Get a metadata entry for a specific entry. |
any
|
getObjectMetadataProperty(any objectKey, any property, [any defaultValue])
Get a metadata entry for a specific entry. |
string
|
getPoolMetadata()
|
numeric
|
getSize()
Get the size of the store. |
array
|
getSortedKeys(any property, [any sortType='text'], [any sortOrder='asc'])
Get an array of sorted keys for this indexer according to parameters. |
boolean
|
objectExists(any objectKey)
Check if the metadata entry exists for an object. |
MetadataIndexer
|
setFields(any fields)
Fancy setter for fields. |
any
|
setIndexID(any indexID)
|
MetadataIndexer
|
setObjectMetadata(any objectKey, struct metadata)
Set the metadata entry for a specific entry. |
MetadataIndexer
|
setObjectMetadataProperty(any objectKey, any property, any value)
Set a metadata property for a specific entry. |
any
|
setPoolMetadata(any poolMetadata)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
fields
- The list or array of fields to bind this index onProperty Detail |
---|
The fields this indexer is tracking
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe human id of this indexer
access
- publicrequired
- falsereturntype
- anyserializable
- trueThe metadata pool
access
- publicrequired
- falsereturntype
- anydoc_generic
- java.util.concurrent.ConcurrentHashMapserializable
- trueMethod Detail |
---|
Clears an object from the storage
objectKey
- The object key to clearClear all the elements in the store
Get all the store's object keys array
Get a metadata entry for a specific entry. Exception if key not found
objectKey
- The key to getGet a metadata entry for a specific entry. Exception if key not found
objectKey
- The key to getproperty
- The metadata property to getdefaultValue
- The default value if property doesn't existGet the size of the store
Get an array of sorted keys for this indexer according to parameters
property
- truesortType
sortOrder
Check if the metadata entry exists for an object
objectKey
- The key to getFancy setter for fields
fields
- The fields list or arrayindexID
Set the metadata entry for a specific entry
objectKey
- The key to getmetadata
- The metadata struct to storeSet a metadata property for a specific entry
objectKey
- The key to setproperty
- The metadata property to setvalue
- The value to setpoolMetadata