Package com._1c.g5.v8.dt.ql.dcs.resource
Interface IDependentQuerySchemaProvider
-
public interface IDependentQuerySchemaProviderThe service allows to load dependentQuerySchemamodel 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,
StringLiteralin 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.EObjectgetParent(QuerySchema dependent)Gets the parent object of theQuerySchemamodel object.org.eclipse.emf.ecore.EStructuralFeaturegetParentFeature(QuerySchema dependent)Gets the parent containing text feature of theQuerySchemamodel object.QuerySchemagetQuerySchema(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 theQuerySchemamodel by the source object and it's text feature provided.QuerySchemagetQuerySchema(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EStructuralFeature textFeature, org.eclipse.xtext.util.CancelIndicator cancelIndicator)Gets theQuerySchemamodel by the source object and it's text feature.voidunload(QuerySchema root)Explicitly unloadQuerySchemamodel 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 theQuerySchemamodel 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
QuerySchemamodel, may returnnullif 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 theQuerySchemamodel 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
QuerySchemamodel, may benull.
-
getParent
org.eclipse.emf.ecore.EObject getParent(QuerySchema dependent)
Gets the parent object of theQuerySchemamodel object.- Parameters:
dependent- the dependentQuerySchemamodel object, cannot benull.- Returns:
- the parent object of dependent model, may return
nullif 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 theQuerySchemamodel object.- Parameters:
dependent- the dependent model object, cannot benull.- Returns:
- the parent text feature, may return
nullif the model is not linked to it's parent.
-
unload
void unload(QuerySchema root)
Explicitly unloadQuerySchemamodel object from resource and remove linkage to the parent object.- Parameters:
root- the root of dependentQuerySchemamodel, cannot benull.
-
-