Package com._1c.g5.v8.dt.ql.scoping
Class InnerFieldsFromSourceSectionFinder
- java.lang.Object
-
- com._1c.g5.v8.dt.ql.scoping.InnerFieldsFromSourceSectionFinder
-
- All Implemented Interfaces:
IInnerFieldsFromSourceSectionFinder
- Direct Known Subclasses:
DcsInnerFieldsFromSourceSectionFinder
public class InnerFieldsFromSourceSectionFinder extends Object implements IInnerFieldsFromSourceSectionFinder
Default implementation of IInnerFieldsFromSourceSectionFinder
-
-
Field Summary
Fields Modifier and Type Field Description protected IDynamicDbViewFieldComputerdbViewFieldComputerprotected org.eclipse.xtext.naming.IQualifiedNameConverterqualifiedNameConverter
-
Constructor Summary
Constructors Constructor Description InnerFieldsFromSourceSectionFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> Collection<T>collectItems(QuerySchemaSource source, com.google.common.base.Function<DbViewElement,T> func)Collects items fromQuerySchemaSourceand transform it to typeTprotected Collection<CaseInsensitiveString>collectSourceAlias(QuerySchemaSource source)Collects alias ofQuerySchemaSourceprotected org.eclipse.xtext.resource.IEObjectDescriptioncreateEObjectDescriptionByField(DbViewElement field)Creates index item byDbViewElementCollection<org.eclipse.xtext.resource.IEObjectDescription>getInnerFieldsDescription(QuerySchemaOperator operator)Gets descriptions of all inner fields from source section ofoperatorCollection<org.eclipse.xtext.resource.IEObjectDescription>getInnerFieldsDescription(org.eclipse.emf.ecore.EObject context, List<QuerySchemaSource> sources)Gets descriptions of all inner fields from list ofQuerySchemaSourceCollection<CaseInsensitiveString>getSourceAlias(QuerySchemaOperator operator)Gets all alias fromQuerySchemaOperatorCollection<org.eclipse.xtext.resource.IEObjectDescription>getTableParameterFields(org.eclipse.emf.ecore.EObject context)Gets descriptions of all fields for parameter of source tablebooleanisAmbiguousField(QuerySchemaOperator operator, DbViewElement field)Checks that source section of theoperatorhas another (not equals tofield) field with the same namebooleanisInnerField(QuerySchemaOperator operator, DbViewElement field)Checks that source section of theoperatorhas inner field equals tofield
-
-
-
Field Detail
-
dbViewFieldComputer
@Inject protected IDynamicDbViewFieldComputer dbViewFieldComputer
-
qualifiedNameConverter
@Inject protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter
-
-
Method Detail
-
getInnerFieldsDescription
public Collection<org.eclipse.xtext.resource.IEObjectDescription> getInnerFieldsDescription(QuerySchemaOperator operator)
Description copied from interface:IInnerFieldsFromSourceSectionFinderGets descriptions of all inner fields from source section ofoperator- Specified by:
getInnerFieldsDescriptionin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
operator-QuerySchemaOperatorwith source section, cannot benull- Returns:
- collection of the
IEObjectDescriptionof inner fields from source section
-
getInnerFieldsDescription
public Collection<org.eclipse.xtext.resource.IEObjectDescription> getInnerFieldsDescription(org.eclipse.emf.ecore.EObject context, List<QuerySchemaSource> sources)
Description copied from interface:IInnerFieldsFromSourceSectionFinderGets descriptions of all inner fields from list ofQuerySchemaSource- Specified by:
getInnerFieldsDescriptionin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
context- abstract object containing list ofQuerySchemaSource, cannot benull- Returns:
- collection of the
IEObjectDescriptionof inner fields from source section
-
isAmbiguousField
public boolean isAmbiguousField(QuerySchemaOperator operator, DbViewElement field)
Description copied from interface:IInnerFieldsFromSourceSectionFinderChecks that source section of theoperatorhas another (not equals tofield) field with the same name- Specified by:
isAmbiguousFieldin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
operator-QuerySchemaOperatorwith source section, cannot benullfield- checking field, cannot benull- Returns:
trueif source section of theoperatorhas another (not equals tofield) field with the same name,falseotherwise
-
isInnerField
public boolean isInnerField(QuerySchemaOperator operator, DbViewElement field)
Description copied from interface:IInnerFieldsFromSourceSectionFinderChecks that source section of theoperatorhas inner field equals tofield- Specified by:
isInnerFieldin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
operator-QuerySchemaOperatorwith source section, cannot benullfield- checking field, cannot benull- Returns:
truethat source section of theoperatorhas inner field equals tofield,falseotherwise
-
getSourceAlias
public Collection<CaseInsensitiveString> getSourceAlias(QuerySchemaOperator operator)
Description copied from interface:IInnerFieldsFromSourceSectionFinderGets all alias fromQuerySchemaOperator- Specified by:
getSourceAliasin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
operator-QuerySchemaOperatorfor getting alias, cannot benull- Returns:
- collection of alias from
QuerySchemaOperator, nevernull
-
getTableParameterFields
public Collection<org.eclipse.xtext.resource.IEObjectDescription> getTableParameterFields(org.eclipse.emf.ecore.EObject context)
Description copied from interface:IInnerFieldsFromSourceSectionFinderGets descriptions of all fields for parameter of source table- Specified by:
getTableParameterFieldsin interfaceIInnerFieldsFromSourceSectionFinder- Parameters:
context- context object from parameter of source table, each parameter has own set of allowed fields, cannot benull- Returns:
- collection of the
IEObjectDescriptionfields for parameter of source table, nevernull
-
collectSourceAlias
protected Collection<CaseInsensitiveString> collectSourceAlias(QuerySchemaSource source)
Collects alias ofQuerySchemaSource- Parameters:
source-QuerySchemaSourcefor getting alias, can't benull- Returns:
- collection of alias, never
null
-
collectItems
protected <T> Collection<T> collectItems(QuerySchemaSource source, com.google.common.base.Function<DbViewElement,T> func)
Collects items fromQuerySchemaSourceand transform it to typeT- Parameters:
source- actualQuerySchemaSourcefor getting inner elements, can't benullfunc- specialFunctionfor transforming elements to typeT, can't benull- Returns:
- collection of inner
QuerySchemaSourcetransformed byfunc, nevernull
-
createEObjectDescriptionByField
protected org.eclipse.xtext.resource.IEObjectDescription createEObjectDescriptionByField(DbViewElement field)
Creates index item byDbViewElement- Parameters:
field- indexed item, cannot benull- Returns:
- created index item for
IScope, nevernull
-
-