org.imemex.componentmappings.tuple
Class AbstractTupleComponentIndex
java.lang.Object
org.imemex.componentmappings.tuple.AbstractTupleComponentIndex
- All Implemented Interfaces:
- ComponentIndex<Tuple>, ComponentKeywordIndex<Tuple>, ComponentMapping<Tuple>, TupleComponentIndex
- Direct Known Subclasses:
- AbstractDBMSTupleComponentIndex, InMemoryTupleComponentIndex
public abstract class AbstractTupleComponentIndex
- extends java.lang.Object
- implements TupleComponentIndex
This abstract class provides common functionality for DBMS-based implementations of tuple component indexes.
This class implements the query(Predicate) method.
- Author:
- marcos
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTupleComponentIndex
public AbstractTupleComponentIndex()
queryByPredicate
public PullOperator<Mapping<Tuple>>[] queryByPredicate(Predicate filterCondition,
java.lang.String[] returnAttributes)
throws InvalidPredicateException
- Description copied from interface:
TupleComponentIndex
- TODO: discuss returnAttributes and their relationship to
ComponentReplicas. Maybe this method should be moved to a
TupleComponentReplica interface. Returns all entries of the given
attribute attributeNameRegExp that qualify for the given operator.
- Specified by:
queryByPredicate in interface TupleComponentIndex
returnAttributes - the attributes to return in the tuple componet of
the returned RV instances.
- Returns:
- PullOperator of matching RV instances
- Throws:
InvalidPredicateException
query
public final PullOperator<Mapping<Tuple>>[] query(Predicate queryPredicate)
throws InvalidPredicateException
- Description copied from interface:
ComponentIndex
- Central method for providing query functionality on an index.
Returns an array of PullOperators that contain the result to a query
specified by the query predicate. The Query Optimizer will then retrieve
the exstimated costs for each PullOperator and chose one of the returned
PullOperators for execution.
- Specified by:
query in interface ComponentIndex<Tuple>
- Parameters:
queryPredicate - the predicate specifying the query
- Returns:
- an array of PullOperators reporesenting different alternative
query plans is returned
- Throws:
InvalidPredicateException - TODO
isEmpty
public boolean isEmpty()
- Description copied from interface:
ComponentMapping
- Returns true if this instance does not contain any entries.
- Specified by:
isEmpty in interface ComponentMapping<Tuple>
- Returns:
finalize
public void finalize()
- On destruction, releases all resources allocated by this instance.
- Overrides:
finalize in class java.lang.Object