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
FieldsModifier and TypeFieldDescriptionprotected IDynamicDbViewFieldComputer
protected org.eclipse.xtext.naming.IQualifiedNameConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Collection<T>
collectItems
(QuerySchemaSource source, com.google.common.base.Function<DbViewElement, T> func) Collects items fromQuerySchemaSource
and transform it to typeT
protected Collection<CaseInsensitiveString>
collectSourceAlias
(QuerySchemaSource source) Collects alias ofQuerySchemaSource
protected org.eclipse.xtext.resource.IEObjectDescription
Creates index item byDbViewElement
Collection<org.eclipse.xtext.resource.IEObjectDescription>
getInnerFieldsDescription
(QuerySchemaOperator operator) Gets descriptions of all inner fields from source section ofoperator
Collection<org.eclipse.xtext.resource.IEObjectDescription>
getInnerFieldsDescription
(org.eclipse.emf.ecore.EObject context, List<QuerySchemaSource> sources) Gets descriptions of all inner fields from list ofQuerySchemaSource
getSourceAlias
(QuerySchemaOperator operator) Gets all alias fromQuerySchemaOperator
Collection<org.eclipse.xtext.resource.IEObjectDescription>
getTableParameterFields
(org.eclipse.emf.ecore.EObject context) Gets descriptions of all fields for parameter of source tableboolean
isAmbiguousField
(QuerySchemaOperator operator, DbViewElement field) Checks that source section of theoperator
has another (not equals tofield
) field with the same nameboolean
isInnerField
(QuerySchemaOperator operator, DbViewElement field) Checks that source section of theoperator
has inner field equals tofield
-
Field Details
-
dbViewFieldComputer
-
qualifiedNameConverter
@Inject protected org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter
-
-
Constructor Details
-
InnerFieldsFromSourceSectionFinder
public InnerFieldsFromSourceSectionFinder()
-
-
Method Details
-
getInnerFieldsDescription
public Collection<org.eclipse.xtext.resource.IEObjectDescription> getInnerFieldsDescription(QuerySchemaOperator operator) Description copied from interface:IInnerFieldsFromSourceSectionFinder
Gets descriptions of all inner fields from source section ofoperator
- Specified by:
getInnerFieldsDescription
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
operator
-QuerySchemaOperator
with source section, cannot benull
- Returns:
- collection of the
IEObjectDescription
of 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:IInnerFieldsFromSourceSectionFinder
Gets descriptions of all inner fields from list ofQuerySchemaSource
- Specified by:
getInnerFieldsDescription
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
context
- abstract object containing list ofQuerySchemaSource
, cannot benull
- Returns:
- collection of the
IEObjectDescription
of inner fields from source section
-
isAmbiguousField
Description copied from interface:IInnerFieldsFromSourceSectionFinder
Checks that source section of theoperator
has another (not equals tofield
) field with the same name- Specified by:
isAmbiguousField
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
operator
-QuerySchemaOperator
with source section, cannot benull
field
- checking field, cannot benull
- Returns:
true
if source section of theoperator
has another (not equals tofield
) field with the same name,false
otherwise
-
isInnerField
Description copied from interface:IInnerFieldsFromSourceSectionFinder
Checks that source section of theoperator
has inner field equals tofield
- Specified by:
isInnerField
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
operator
-QuerySchemaOperator
with source section, cannot benull
field
- checking field, cannot benull
- Returns:
true
that source section of theoperator
has inner field equals tofield
,false
otherwise
-
getSourceAlias
Description copied from interface:IInnerFieldsFromSourceSectionFinder
Gets all alias fromQuerySchemaOperator
- Specified by:
getSourceAlias
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
operator
-QuerySchemaOperator
for 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:IInnerFieldsFromSourceSectionFinder
Gets descriptions of all fields for parameter of source table- Specified by:
getTableParameterFields
in interfaceIInnerFieldsFromSourceSectionFinder
- Parameters:
context
- context object from parameter of source table, each parameter has own set of allowed fields, cannot benull
- Returns:
- collection of the
IEObjectDescription
fields for parameter of source table, nevernull
-
collectSourceAlias
Collects alias ofQuerySchemaSource
- Parameters:
source
-QuerySchemaSource
for 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 fromQuerySchemaSource
and transform it to typeT
- Parameters:
source
- actualQuerySchemaSource
for getting inner elements, can't benull
func
- specialFunction
for transforming elements to typeT
, can't benull
- Returns:
- collection of inner
QuerySchemaSource
transformed 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
-