Cumulus4j API
(1.2.0-SNAPSHOT)

org.cumulus4j.store.model
Class IndexEntryFactory

java.lang.Object
  extended by org.cumulus4j.store.model.IndexEntryFactory
Direct Known Subclasses:
DefaultIndexEntryFactory

public abstract class IndexEntryFactory
extends Object

Factory for creating (or looking up) specific IndexEntry implementations.

It is optional to implement a specific factory. For most use cases, it is sufficient to use the DefaultIndexEntryFactory (which is used, if the extension specifies the attribute index-entry-type), but you can alternatively specify a custom factory via the extension-attribute index-entry-factory-type.

If you specify a custom factory, you must omit (or leave empty) the index-entry-type!

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Constructor Summary
IndexEntryFactory()
           
 
Method Summary
 IndexEntry createIndexEntry(CryptoContext cryptoContext, PersistenceManager pmIndex, FieldMeta fieldMeta, ClassMeta classMeta, Object indexKey)
          Get an existing IndexEntry just like getIndexEntry(CryptoContext, PersistenceManager, FieldMeta, ClassMeta, Object) or create one, if it does not yet exist.
 List<IndexEntry> getIndexEntries(CryptoContext cryptoContext, PersistenceManager pmIndex, FieldMeta fieldMeta, List<ClassMeta> classMetas, Object indexKey)
           
 List<IndexEntry> getIndexEntriesIncludingSubClasses(CryptoContext cryptoContext, PersistenceManager pmIndex, FieldMeta fieldMeta, ClassMeta classMeta, Object indexKey)
           
 IndexEntry getIndexEntry(CryptoContext cryptoContext, PersistenceManager pmIndex, FieldMeta fieldMeta, ClassMeta classMeta, Object indexKey)
          Get an IndexEntry for the specified unique key fields or null, if no such instance exists.
abstract  Class<? extends IndexEntry> getIndexEntryClass()
          Get the concrete implementation class (sub-class) of IndexEntry managed by this factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexEntryFactory

public IndexEntryFactory()
Method Detail

getIndexEntryClass

public abstract Class<? extends IndexEntry> getIndexEntryClass()
Get the concrete implementation class (sub-class) of IndexEntry managed by this factory.

Returns:
the concrete implementation class of IndexEntry managed by this factory.

getIndexEntriesIncludingSubClasses

public List<IndexEntry> getIndexEntriesIncludingSubClasses(CryptoContext cryptoContext,
                                                           PersistenceManager pmIndex,
                                                           FieldMeta fieldMeta,
                                                           ClassMeta classMeta,
                                                           Object indexKey)

getIndexEntries

public List<IndexEntry> getIndexEntries(CryptoContext cryptoContext,
                                        PersistenceManager pmIndex,
                                        FieldMeta fieldMeta,
                                        List<ClassMeta> classMetas,
                                        Object indexKey)

getIndexEntry

public IndexEntry getIndexEntry(CryptoContext cryptoContext,
                                PersistenceManager pmIndex,
                                FieldMeta fieldMeta,
                                ClassMeta classMeta,
                                Object indexKey)
Get an IndexEntry for the specified unique key fields or null, if no such instance exists.

Parameters:
cryptoContext - the crypto-context.
pmIndex - the backend-PersistenceManager. Must not be null.
fieldMeta - the meta-data of the field to query. Must not be null.
classMeta - TODO
indexKey - the indexed value to search for. Might be null (null can be indexed).
Returns:
the matching IndexEntry or null.

createIndexEntry

public IndexEntry createIndexEntry(CryptoContext cryptoContext,
                                   PersistenceManager pmIndex,
                                   FieldMeta fieldMeta,
                                   ClassMeta classMeta,
                                   Object indexKey)
Get an existing IndexEntry just like getIndexEntry(CryptoContext, PersistenceManager, FieldMeta, ClassMeta, Object) or create one, if it does not yet exist.

Parameters:
cryptoContext - TODO
pmIndex - the backend-PersistenceManager. Must not be null.
fieldMeta - the meta-data of the field to query. Must not be null.
classMeta - TODO
indexKey - the indexed value to search for. Might be null (null can be indexed).
Returns:
the matching IndexEntry (never null).

Cumulus4j API
(1.2.0-SNAPSHOT)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.