public interface EObjectQueryStepBuilder<S> extends QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>
| Modifier and Type | Method and Description |
|---|---|
EObjectQueryStepBuilder<S> |
allReferencingEObjects()
Navigates from an
EObject to all other EObjects that reference it. |
default EObjectQueryStepBuilder<S> |
closure(org.eclipse.emf.ecore.EReference eReference)
Calculates the transitive closure of the current
EObject that is created by repeatedly following the given (outgoing) EReference. |
EObjectQueryStepBuilder<S> |
closure(org.eclipse.emf.ecore.EReference eReference,
Direction direction)
Calculates the transitive closure of the current
EObject that is created by repeatedly following the given (outgoing) EReference. |
EObjectQueryStepBuilder<S> |
distinct()
Eliminates all duplicated values from the current result.
|
EObjectQueryStepBuilder<S> |
eAllContents()
Navigates from an
EObject to its eAllContents. |
EObjectQueryStepBuilder<S> |
eContainer()
Navigates from an
EObject to its eContainer. |
EObjectQueryStepBuilder<S> |
eContents()
Navigates from an
EObject to its eContents. |
UntypedQueryStepBuilder<S,java.lang.Object> |
eGet(org.eclipse.emf.ecore.EAttribute eAttribute)
Performs a
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method. |
EObjectQueryStepBuilder<S> |
eGet(org.eclipse.emf.ecore.EReference eReference)
Performs a
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method. |
UntypedQueryStepBuilder<S,java.lang.Object> |
eGet(java.lang.String eStructuralFeatureName)
Performs a
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method. |
EObjectQueryStepBuilder<S> |
eGetInverse(org.eclipse.emf.ecore.EReference eReference)
Navigates along the incoming
EReferences of the given type and forwards the EObjects on
the other end of the reference. |
EObjectQueryStepBuilder<S> |
eGetInverse(java.lang.String referenceName)
Navigates along the incoming
EReferences with the given name and forwards the EObjects on
the other end of the reference. |
EObjectQueryStepBuilder<S> |
filter(java.util.function.Predicate<org.eclipse.emf.ecore.EObject> predicate)
Applies the given filter predicate to all elements in the current result.
|
EObjectQueryStepBuilder<S> |
has(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature,
java.lang.Object value)
Filters all EObjects in the result set that have the given feature set to the given value.
|
EObjectQueryStepBuilder<S> |
has(java.lang.String eStructuralFeatureName,
java.lang.Object value)
Filters all EObjects in the result set that have the given feature set to the given value.
|
EObjectQueryStepBuilder<S> |
isInstanceOf(org.eclipse.emf.ecore.EClass eClass)
Filters all
EObjects that are an instance of the given EClass. |
EObjectQueryStepBuilder<S> |
isInstanceOf(org.eclipse.emf.ecore.EClass eClass,
boolean allowSubclasses)
Filters all
EObjects that are an instance of the given EClass. |
EObjectQueryStepBuilder<S> |
isInstanceOf(java.lang.String eClassName)
Filters all
EObjects that are a (direct or indirect) instance of an EClass with the given name. |
EObjectQueryStepBuilder<S> |
isInstanceOf(java.lang.String eClassName,
boolean allowSubclasses)
Filters all
EObjects that are a (direct or indirect) instance of an EClass with the given name. |
EObjectQueryStepBuilder<S> |
limit(long limit)
Limits the number of elements in the result set to the given number.
|
EObjectQueryStepBuilder<S> |
named(java.lang.String name)
Assigns the given name to this
QueryStepBuilder. |
EObjectQueryStepBuilder<S> |
notNull()
Filters out and discards all
null values from the current result set. |
EObjectQueryStepBuilder<S> |
orderBy(java.util.Comparator<org.eclipse.emf.ecore.EObject> comparator)
Sorts the current result set by applying the given comparator.
|
EObjectQueryStepBuilder<S> |
orderBy(org.eclipse.emf.ecore.EAttribute eAttribute,
Order order) |
EObjectQueryStepBuilder<S> orderBy(org.eclipse.emf.ecore.EAttribute eAttribute, Order order)
EObjectQueryStepBuilder<S> limit(long limit)
QueryStepBuilder
Please note that the order of elements is in general arbitrary. Therefore, usually a QueryStepBuilder.limit(long) is
preceded by a QueryStepBuilder.orderBy(Comparator).
limit in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>limit - The limit to apply. Must not be negative.null.EObjectQueryStepBuilder<S> notNull()
QueryStepBuildernull values from the current result set.
This is the same as:
query.filter(element -> element != null)
notNull in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>null.QueryStepBuilder.filter(Predicate)EObjectQueryStepBuilder<S> has(java.lang.String eStructuralFeatureName, java.lang.Object value)
Any EObject that is an instance of an EClass which does not define any EAttribute or
EReference with the given name will be discarded and filtered out.
For determining the feature, EClass.getEStructuralFeature(String) is used per EObject
individually.
The value will be compared via Objects.equals(Object, Object).
eStructuralFeatureName - The name of the EStructuralFeature to filter by. Must not be null.value - The value to filter by. May be null.null.EObjectQueryStepBuilder<S> has(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, java.lang.Object value)
Any EObject that belongs to an EClass that does not support the given feature will be discarded
and filtered out.
The value will be compared via Objects.equals(Object, Object).
eStructuralFeature - The feature to filter by. Must not be null.value - The value to filter by. Must not be null.null.EObjectQueryStepBuilder<S> isInstanceOf(org.eclipse.emf.ecore.EClass eClass)
EObjects that are an instance of the given EClass.
This method also considers polymorphism, i.e. instances of Sub-EClasses will pass this filter as well.
This operation is null-safe. Any null values will be discarded and filtered out.
eClass - The EClass to filter by. Must not be null.null.EObjectQueryStepBuilder<S> isInstanceOf(org.eclipse.emf.ecore.EClass eClass, boolean allowSubclasses)
EObjects that are an instance of the given EClass.
This operation is null-safe. Any null values will be discarded and filtered out.
eClass - The EClass to filter by. Must not be null.allowSubclasses - Whether or not subclasses are allowed. If false, any EObject that passes the filter must
be a direct instance of the given EClass. If true, EObjects that pass the filter can be a
direct or transitive instance of the given EClass.null.EObjectQueryStepBuilder<S> isInstanceOf(java.lang.String eClassName)
EObjects that are a (direct or indirect) instance of an EClass with the given name.
This operation is null-safe. Any null values will be discarded and filtered out.
eClassName - The name of the EClass to search for. Must not be null.null.EObjectQueryStepBuilder<S> isInstanceOf(java.lang.String eClassName, boolean allowSubclasses)
EObjects that are a (direct or indirect) instance of an EClass with the given name.
This operation is null-safe. Any null values will be discarded and filtered out.
eClassName - The name of the EClass to search for. Must not be null.allowSubclasses - Whether or not subclasses are allowed. If false, any EObject that passes the filter must
be a direct instance of the given EClass. If true, EObjects that pass the filter can be a
direct or transitive instance of the given EClass.null.UntypedQueryStepBuilder<S,java.lang.Object> eGet(java.lang.String eStructuralFeatureName)
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method.
If a given EObject does not have the EStructuralFeature set (i.e.
EObject.eIsSet(EStructuralFeature) returns false), then no value will be passed onwards. In
any other case, the returned value is passed onwards, even if that value is null.
eStructuralFeatureName - The name of the EStructuralFeature to get the value(s) for. Must not be null.null.EObjectQueryStepBuilder<S> eGet(org.eclipse.emf.ecore.EReference eReference)
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method.
If a given EObject does not have the EStructuralFeature set (i.e.
EObject.eIsSet(EStructuralFeature) returns false), then no value will be passed onwards. In
any other case, the returned value is passed onwards, even if that value is null.
eReference - The EReference to get the value(s) for. Must not be null.null.EObjectQueryStepBuilder<S> eGetInverse(org.eclipse.emf.ecore.EReference eReference)
EReferences of the given type and forwards the EObjects on
the other end of the reference.eReference - The EReference to follow backwards. Must not be null.null.EObjectQueryStepBuilder<S> eGetInverse(java.lang.String referenceName)
EReferences with the given name and forwards the EObjects on
the other end of the reference.referenceName - The name of the reference to follow backwards. Must not be null.null.UntypedQueryStepBuilder<S,java.lang.Object> eGet(org.eclipse.emf.ecore.EAttribute eAttribute)
EObject.eGet(EStructuralFeature) operation on all EObjects in the current result and
forwards the result of this method.
If a given EObject does not have the EStructuralFeature set (i.e.
EObject.eIsSet(EStructuralFeature) returns false), then no value will be passed onwards. In
any other case, the returned value is passed onwards, even if that value is null.
eAttribute - The EAttribute to get the value(s) for. Must not be null.null.EObjectQueryStepBuilder<S> eContainer()
EObject to its eContainer.null.EObjectQueryStepBuilder<S> eContents()
EObject to its eContents.null.EObjectQueryStepBuilder<S> eAllContents()
EObject to its eAllContents.null.EObjectQueryStepBuilder<S> allReferencingEObjects()
EObject to all other EObjects that reference it.
This means walking backwards all EReference instances that have the current EObject as target. This
method will include the eContainer.
null.EObjectQueryStepBuilder<S> named(java.lang.String name)
QueryStepBuilderQueryStepBuilder.
Note that only the step is named. When coming back to this step, the query result may be different than it was when it was first reached, depending on the traversal.
named in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>name - The name of the step. Must not be null. Must be unique within the query.null.QueryStepBuilder.back(String)EObjectQueryStepBuilder<S> filter(java.util.function.Predicate<org.eclipse.emf.ecore.EObject> predicate)
QueryStepBuilderfilter in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>predicate - The predicate to apply. Must not be null. All elements for which the predicate function
returns false will be filtered out and discarded.null.EObjectQueryStepBuilder<S> orderBy(java.util.Comparator<org.eclipse.emf.ecore.EObject> comparator)
QueryStepBuilder
This method requires full resolution of all elements and is therefore non-lazy.
orderBy in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>comparator - The comparator to use. Must not be null.null.EObjectQueryStepBuilder<S> distinct()
QueryStepBuilder
This method is lazy, but requires to keep track of the "already encountered" elements in a set. Therefore, RAM consumption on this method may be high if it is applied on very large result sets.
distinct in interface QueryStepBuilder<S,org.eclipse.emf.ecore.EObject>null.default EObjectQueryStepBuilder<S> closure(org.eclipse.emf.ecore.EReference eReference)
EObject that is created by repeatedly following the given (outgoing) EReference.
This method is safe to use in models that contain cyclic paths. Every EObject in the closure will only be returned once, even if multiple paths lead to it.
The EObject which is used to start the closure will not be part of the closure.
If an EObject is either of an EClass that does not own the given EReference, or the EObject itself does not have an instance of the EReference, the closure ends at this EObject.
eReference - The EReference to follow repeatedly. Must not be null.null.EObjectQueryStepBuilder<S> closure(org.eclipse.emf.ecore.EReference eReference, Direction direction)
EObject that is created by repeatedly following the given (outgoing) EReference.
This method is safe to use in models that contain cyclic paths. Every EObject in the closure will only be returned once, even if multiple paths lead to it.
The EObject which is used to start the closure will not be part of the closure.
If an EObject is either of an EClass that does not own the given EReference, or the EObject itself does not have an instance of the EReference, the closure ends at this EObject.
eReference - The EReference to follow repeatedly. Must not be null.direction - The direction to follow when calculating the closure. Must not be null.null.