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 IDynamicDbViewFieldComputer
dbViewFieldComputer
-
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 fromQuerySchemaSource
and transform it to typeT
protected Collection<CaseInsensitiveString>
collectSourceAlias(QuerySchemaSource source)
Collects alias ofQuerySchemaSource
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
Collection<CaseInsensitiveString>
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 Detail
-
dbViewFieldComputer
@Inject protected IDynamicDbViewFieldComputer dbViewFieldComputer
-
-
Method Detail
-
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
public boolean isAmbiguousField(QuerySchemaOperator operator, DbViewElement field)
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
public boolean isInnerField(QuerySchemaOperator operator, DbViewElement field)
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
public Collection<CaseInsensitiveString> getSourceAlias(QuerySchemaOperator operator)
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
protected Collection<CaseInsensitiveString> collectSourceAlias(QuerySchemaSource source)
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
-
-