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 enumstatic enumstatic classPresentation for expressionstatic enumstatic classParameters 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 QuerySchemaExpressionfindPresentation(QuerySchemaExpression field, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Find field presentationgetAllPresentations(QueryWizardSource source, List<QuerySchemaExpression> fields) Find all presentation fieldsstatic QuerySchemaExpressiongetExpressionPresentation(QuerySchemaExpression field, List<QuerySchemaExpression> fields, List<QueryTextResultProcessing.ExpressionPresentation> allPresentations) Get expression presentationstatic StringgetMdObjectFullName(MdObject mdObject, ScriptVariant scriptVariant) Get full name of MdObjectgetQueryTextResult(String queryText, boolean isReplaceTemplate) Get query text with result processingstatic StringgetText(String text, String textRu, ScriptVariant scriptVariant) Get text depending of script variantstatic StringgetTotalName(QueryWizardSource source, QuerySchemaTotalControlPoint total) Get total namestatic StringgetTotalPresentation(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
-