public final class EMFQueryMetaContext extends AbstractQueryMetaContext
The runtime context may specialize answers with a given scope.
In a static context, a conservative default version (DEFAULT
) can be used instead.
TODO generics?
Modifier and Type | Field and Description |
---|---|
static EMFQueryMetaContext |
DEFAULT
Default static instance that only makes conservative assumptions that are valid for any scope.
|
static EMFQueryMetaContext |
INSTANCE
Deprecated.
use
DEFAULT |
Modifier and Type | Method and Description |
---|---|
boolean |
canLeadOutOfScope(IInputKey key)
Tells whether the given
IInputKey is an edge and may lead out of scope. |
void |
ensureValidKey(IInputKey key) |
org.eclipse.emf.ecore.EReference |
featureOpposite(org.eclipse.emf.ecore.EStructuralFeature typeObject) |
org.eclipse.emf.ecore.EClass |
featureSourceType(org.eclipse.emf.ecore.EStructuralFeature feature) |
org.eclipse.emf.ecore.EClassifier |
featureTargetType(org.eclipse.emf.ecore.EStructuralFeature typeObject) |
com.google.common.collect.SetMultimap<InputKeyImplication,InputKeyImplication> |
getConditionalImplications(IInputKey implyingKey)
Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).
|
java.util.Map<java.util.Set<java.lang.Integer>,java.util.Set<java.lang.Integer>> |
getFunctionalDependencies(IInputKey key)
Returns functional dependencies of the input key expressed in terms of column indices.
|
java.util.Collection<InputKeyImplication> |
getImplications(IInputKey implyingKey)
Returns known direct implications, e.g.
|
java.util.Comparator<IInputKey> |
getSuggestedEliminationOrdering()
For query normalizing, this is the order suggested for trying to eliminate input keys.
|
java.util.Collection<InputKeyImplication> |
getWeakenedAlternatives(IInputKey implyingKey)
Returns a set of implications (weakened alternatives),
with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.
|
void |
illegalInputKey(IInputKey key) |
boolean |
isEnumerable(IInputKey key)
Returns true iff instance tuples of the given key can be enumerated.
|
boolean |
isFeatureMultiplicityOneTo(org.eclipse.emf.ecore.EStructuralFeature typeObject) |
boolean |
isFeatureMultiplicityToOne(org.eclipse.emf.ecore.EStructuralFeature feature) |
boolean |
isStateless(IInputKey key)
Returns true iff the set of instance tuples of the given key is immutable.
|
getPosetComparator, isPosetKey
public static final EMFQueryMetaContext DEFAULT
@Deprecated public static final EMFQueryMetaContext INSTANCE
DEFAULT
public boolean isEnumerable(IInputKey key)
IQueryMetaContext
If false, the runtime can only test tuple membership in the extensional relation identified by the key, but not enumerate member tuples in general.
Equivalent to IInputKey.isEnumerable()
.
public boolean canLeadOutOfScope(IInputKey key)
IQueryMetaContext
IInputKey
is an edge and may lead out of scope.canLeadOutOfScope
in interface IQueryMetaContext
canLeadOutOfScope
in class AbstractQueryMetaContext
public boolean isStateless(IInputKey key)
IQueryMetaContext
If false, the runtime provides notifications upon change.
public java.util.Map<java.util.Set<java.lang.Integer>,java.util.Set<java.lang.Integer>> getFunctionalDependencies(IInputKey key)
IQueryMetaContext
Each entry of the map is a functional dependency rule, where the entry key specifies source columns and the entry value specifies target columns.
public java.util.Collection<InputKeyImplication> getImplications(IInputKey implyingKey)
IQueryMetaContext
Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
public com.google.common.collect.SetMultimap<InputKeyImplication,InputKeyImplication> getConditionalImplications(IInputKey implyingKey)
IQueryMetaContext
Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).
Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.
getConditionalImplications
in interface IQueryMetaContext
getConditionalImplications
in class AbstractQueryMetaContext
public java.util.Collection<InputKeyImplication> getWeakenedAlternatives(IInputKey implyingKey)
IQueryMetaContext
Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
Must follow directly or transitively from implications of IQueryMetaContext.getImplications(IInputKey)
.
getWeakenedAlternatives
in interface IQueryMetaContext
getWeakenedAlternatives
in class AbstractQueryMetaContext
public void ensureValidKey(IInputKey key)
public void illegalInputKey(IInputKey key)
public boolean isFeatureMultiplicityToOne(org.eclipse.emf.ecore.EStructuralFeature feature)
public boolean isFeatureMultiplicityOneTo(org.eclipse.emf.ecore.EStructuralFeature typeObject)
public org.eclipse.emf.ecore.EClass featureSourceType(org.eclipse.emf.ecore.EStructuralFeature feature)
public org.eclipse.emf.ecore.EClassifier featureTargetType(org.eclipse.emf.ecore.EStructuralFeature typeObject)
public org.eclipse.emf.ecore.EReference featureOpposite(org.eclipse.emf.ecore.EStructuralFeature typeObject)
public java.util.Comparator<IInputKey> getSuggestedEliminationOrdering()
IQueryMetaContext
getSuggestedEliminationOrdering
in interface IQueryMetaContext
getSuggestedEliminationOrdering
in class AbstractQueryMetaContext