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 classDefines actual state ofDbViewVirtualFieldProcessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddefineState(DbViewSelectDef virtualTable) Defines actual state byvirtualTableGets actualDbViewVirtualFieldProcessor.StategetExpectedType(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 parametersQuerySchemaTableParametervalidate(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 benullparameters- 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 benullparameters- list ofQuerySchemaTableParameter, can't benull- Returns:
- results of validation (see
IExpressionTypeChecker.CheckResult).
Return results can benullif validator forvirtualTablewasn't found
-
getCurrentState
Gets actualDbViewVirtualFieldProcessor.State- Returns:
- current
DbViewVirtualFieldProcessor.Stateornullif 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:IExpectedTypesComputerGets expected type for feature of expression- Specified by:
getExpectedTypein interfaceIExpectedTypesComputer- Parameters:
expression- expression, can't benullfeature- feature of the expression, can benullfeatureIndex- index of feature- Returns:
- expected type for feature of expression, empty
TypeDescriptioncorresponding to anything type - See Also:
-
defineState
Defines actual state byvirtualTable- Parameters:
virtualTable- current virtual table, can't benull
-