Package com._1c.g5.v8.dt.ql.resource
Class DbViewVirtualFieldProcessor
java.lang.Object
com._1c.g5.v8.dt.ql.resource.DbViewVirtualFieldProcessor
- All Implemented Interfaces:
IExpectedTypesComputer
Special class for processing virtual table (see
This class implements pattern "State"
The state defines by the processing virtual table (see
SelectDbView
) in Ql language This class implements pattern "State"
The state defines by the processing virtual table (see
SelectDbView
)-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Defines actual state ofDbViewVirtualFieldProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
defineState
(DbViewSelectDef virtualTable) Defines actual state byvirtualTable
Gets actualDbViewVirtualFieldProcessor.State
getExpectedType
(org.eclipse.emf.ecore.EObject expression, org.eclipse.emf.ecore.EStructuralFeature feature, int featureIndex) Gets expected type for feature of expressionList<? extends DbViewElement>
getVirtualFields
(DbViewSelectDef virtualTable, List<QuerySchemaTableParameter> parameters) Computes fields for virtual table by list of parametersQuerySchemaTableParameter
validate
(DbViewSelectDef virtualTable, List<QuerySchemaTableParameter> parameters) Validates parameters for current virtual table
-
Constructor Details
-
DbViewVirtualFieldProcessor
public DbViewVirtualFieldProcessor()
-
-
Method Details
-
getVirtualFields
public List<? extends DbViewElement> getVirtualFields(DbViewSelectDef virtualTable, List<QuerySchemaTableParameter> parameters) Computes fields for virtual table by list of parametersQuerySchemaTableParameter
- Parameters:
virtualTable
- current virtual table, can't benull
parameters
- list ofQuerySchemaTableParameter
- Returns:
- list of computed fields. You should always return empty list if errors was detected.
Return results can't benull
-
validate
public IExpressionTypeChecker.CheckResult validate(DbViewSelectDef virtualTable, List<QuerySchemaTableParameter> parameters) Validates parameters for current virtual table- Parameters:
virtualTable
- current virtual table, can't benull
parameters
- list ofQuerySchemaTableParameter
, can't benull
- Returns:
- results of validation (see
IExpressionTypeChecker.CheckResult
).
Return results can benull
if validator forvirtualTable
wasn't found
-
getCurrentState
Gets actualDbViewVirtualFieldProcessor.State
- Returns:
- current
DbViewVirtualFieldProcessor.State
ornull
if state hasn't been initialized yet
-
getExpectedType
public TypeDescriptionSource getExpectedType(org.eclipse.emf.ecore.EObject expression, org.eclipse.emf.ecore.EStructuralFeature feature, int featureIndex) Description copied from interface:IExpectedTypesComputer
Gets expected type for feature of expression- Specified by:
getExpectedType
in interfaceIExpectedTypesComputer
- Parameters:
expression
- expression, can't benull
feature
- feature of the expression, can benull
featureIndex
- index of feature- Returns:
- expected type for feature of expression, empty
TypeDescription
corresponding to anything type - See Also:
-
defineState
Defines actual state byvirtualTable
- Parameters:
virtualTable
- current virtual table, can't benull
-