Package com._1c.g5.v8.dt.ql.dcs.resource
Interface IDependentQuerySchemaProvider
-
public interface IDependentQuerySchemaProvider
The service allows to load dependentQuerySchema
model from source text feature of some object and can hold model mapped to parent object and feature. This prevents to load dependent model multiple times for each purpose of callers.As examples,
StringLiteral
in module contains feature "lines" with text of Query schema which can be parsed by Xtext in separate resource. Also, DCS contains DataSet with query text, as well some other object contains expression text feature that loads into Expression Language object.
WARNING!
- This dependent model should be use as read-only model, otherwise the link to parent will be removed and dependent resource will be unloaded.
- If source text feature or source object has changed the link to dependent model will be removed and dependent resource will be unloaded.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.emf.ecore.EObject
getParent(QuerySchema dependent)
Gets the parent object of theQuerySchema
model object.org.eclipse.emf.ecore.EStructuralFeature
getParentFeature(QuerySchema dependent)
Gets the parent containing text feature of theQuerySchema
model object.QuerySchema
getQuerySchema(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, BiFunction<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature,String> textProvider, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
Gets theQuerySchema
model by the source object and it's text feature provided.QuerySchema
getQuerySchema(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
Gets theQuerySchema
model by the source object and it's text feature.void
unload(QuerySchema root)
Explicitly unloadQuerySchema
model object from resource and remove linkage to the parent object.
-
-
-
Method Detail
-
getQuerySchema
QuerySchema getQuerySchema(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
Gets theQuerySchema
model by the source object and it's text feature.- Parameters:
source
- the source object, cannot benull
.textFeature
- the text feature of the source object, cannot benull
.cancelIndicator
- the cancel indicator, cannot benull
.- Returns:
- the dependent
QuerySchema
model, may returnnull
if cannot load .
-
getQuerySchema
QuerySchema getQuerySchema(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, BiFunction<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EStructuralFeature,String> textProvider, org.eclipse.xtext.util.CancelIndicator cancelIndicator)
Gets theQuerySchema
model by the source object and it's text feature provided.- Parameters:
source
- the source object, cannot benull
.textFeature
- the text feature of the source object, cannot benull
.textProvider
- the text provider of the dependent model, cannot benull
.cancelIndicator
- the cancel indicator, cannot benull
.- Returns:
- the dependent
QuerySchema
model, may benull
.
-
getParent
org.eclipse.emf.ecore.EObject getParent(QuerySchema dependent)
Gets the parent object of theQuerySchema
model object.- Parameters:
dependent
- the dependentQuerySchema
model object, cannot benull
.- Returns:
- the parent object of dependent model, may return
null
if the model is not linked to it's parent.
-
getParentFeature
org.eclipse.emf.ecore.EStructuralFeature getParentFeature(QuerySchema dependent)
Gets the parent containing text feature of theQuerySchema
model object.- Parameters:
dependent
- the dependent model object, cannot benull
.- Returns:
- the parent text feature, may return
null
if the model is not linked to it's parent.
-
unload
void unload(QuerySchema root)
Explicitly unloadQuerySchema
model object from resource and remove linkage to the parent object.- Parameters:
root
- the root of dependentQuerySchema
model, cannot benull
.
-
-