Package com._1c.g5.v8.dt.qw.ui.utils
Class QueryTextResultProcessing
java.lang.Object
com._1c.g5.v8.dt.qw.ui.utils.QueryTextResultProcessing
Generate code for text module with query result processing
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static class
Presentation for expressionstatic enum
static class
Parameters for generating query text with result processing -
Constructor Summary
ConstructorsConstructorDescriptionQueryTextResultProcessing
(QueryWizardSource source, String lineFormatter, String lineSeparator, QueryTextResultProcessing.ResultProcessingParams params, org.eclipse.emf.ecore.EObject mdObject, String editingLanguageCode) -
Method Summary
Modifier and TypeMethodDescriptionstatic QuerySchemaExpression
findPresentation
(QuerySchemaExpression field, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Find field presentationgetAllPresentations
(QueryWizardSource source, List<QuerySchemaExpression> fields) Find all presentation fieldsstatic QuerySchemaExpression
getExpressionPresentation
(QuerySchemaExpression field, List<QuerySchemaExpression> fields, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Get expression presentationstatic String
getMdObjectFullName
(MdObject mdObject, ScriptVariant scriptVariant) Get full name of MdObjectgetQueryTextResult
(String queryText, boolean isReplaceTemplate) Get query text with result processingstatic String
getText
(String text, String textRu, ScriptVariant scriptVariant) Get text depending of script variantstatic String
getTotalName
(QueryWizardSource source, QuerySchemaTotalControlPoint total) Get total namestatic String
getTotalPresentation
(QueryWizardSource source, QuerySchemaTotalControlPoint total, List<QuerySchemaExpression> fields, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations, Map<String, QuerySchemaExpression> allAliases) Get total presentation
-
Constructor Details
-
QueryTextResultProcessing
public QueryTextResultProcessing(QueryWizardSource source, String lineFormatter, String lineSeparator, QueryTextResultProcessing.ResultProcessingParams params, org.eclipse.emf.ecore.EObject mdObject, String editingLanguageCode) - Parameters:
source
- - query wizard sourcelineFormatter
- - line formatterlineSeparator
- - line separatorparams
- - result processing parametersmdObject
- - parent MDObject, used for generate templateeditingLanguageCode
- current editing language code, can benull
-
-
Method Details
-
getAllPresentations
public static List<QueryTextResultProcessing.ExpressionPresentation> getAllPresentations(QueryWizardSource source, List<QuerySchemaExpression> fields) Find all presentation fields- Parameters:
source
- - query wizard sourcefields
- - fields collection- Returns:
- fields presentations
-
getTotalPresentation
public static String getTotalPresentation(QueryWizardSource source, QuerySchemaTotalControlPoint total, List<QuerySchemaExpression> fields, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations, Map<String, QuerySchemaExpression> allAliases) Get total presentation- Parameters:
source
- - query wizard sourcetotal
- - total control pointfields
- - all fields collection. Can be nullallPresentations
- - all presentationallAliases
- - all aliases- Returns:
- total presentation
-
getExpressionPresentation
public static QuerySchemaExpression getExpressionPresentation(QuerySchemaExpression field, List<QuerySchemaExpression> fields, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Get expression presentation- Parameters:
field
- - expressionfields
- - all fields collection. Can be null.allPresentations
- - all presentation- Returns:
- field presentation and remove it from fields collection, or null
-
findPresentation
public static QuerySchemaExpression findPresentation(QuerySchemaExpression field, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Find field presentation- Parameters:
field
- - fieldsallPresentations
- - all presentations- Returns:
- field presentation or null
-
getTotalName
Get total name- Parameters:
source
- - query wizard sourcetotal
- - total- Returns:
- total name
-
getText
Get text depending of script variant- Parameters:
text
- - English texttextRu
- - Russian textscriptVariant
- - script variant- Returns:
- text depending of script variant
-
getMdObjectFullName
Get full name of MdObject- Parameters:
mdObject
- - MdObjectscriptVariant
- - script variant- Returns:
- MdObject full name
-
getQueryTextResult
Get query text with result processing- Parameters:
queryText
- - query textisReplaceTemplate
- - replace template if exist- Returns:
- query text with result processing
-