public class QueryUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
formatBold(String original,
String bold)
Turns sub strings within the original bold
|
static String |
generateUrl(Mandant client,
EDatenabfrageTyp type,
String queryName,
List<IParameterModel> params) |
static String |
genreateUrl(Datenquelle source)
Generate the servlet URL for the given source
|
static String[] |
getNonEmptyArray(List<GenericStringModel> strings)
|
static Serializable[] |
getParameterValueArray(List<IParameterModel> parameters)
Generates an array from the given list of parameters containing the parameter values
|
static org.primefaces.model.TreeNode |
getTreeNode(com.alibaba.fastjson.JSONArray jsonArray,
Object data)
Generates a
TreeNode from the given JSONArray |
static org.primefaces.model.TreeNode |
getTreeNode(com.alibaba.fastjson.JSON json,
Object data)
Generates a
TreeNode from the given JSON |
static org.primefaces.model.TreeNode |
getTreeNode(com.alibaba.fastjson.JSONObject jsonObject,
Object data)
Generates a
TreeNode from the given JSONObject |
static List<IParameterModel> |
getUpdatedParameters(List<IParameterModel> params,
String query,
String placeholder)
Updates the given list of parameters if new parameters have been added to the query
String |
static String |
replaceWithNumbers(String original,
String replaceString,
int start)
replaces all occurrences of a given substring in the original
String with running numbers |
static String |
setParamValues(String original,
String replaceStr,
List<IParameterModel> params,
boolean withQuotes)
Replaces all occurrences of the placeholder with the consecutive values of the parameter list
|
public static final Serializable[] getParameterValueArray(List<IParameterModel> parameters)
parameters - List of IParameterModelspublic static final String[] getNonEmptyArray(List<GenericStringModel> strings)
strings - List of GenericStringModelsString arraypublic static final String replaceWithNumbers(String original, String replaceString, int start)
String with running numberspublic static final String formatBold(String original, String bold)
public static final org.primefaces.model.TreeNode getTreeNode(com.alibaba.fastjson.JSON json,
Object data)
TreeNode from the given JSONjson - JSON containing tree informationTreeNode of the given JSONpublic static final org.primefaces.model.TreeNode getTreeNode(com.alibaba.fastjson.JSONArray jsonArray,
Object data)
TreeNode from the given JSONArrayjsonArray - JSONArray containing tree informationTreeNode of the given JSONArraypublic static final org.primefaces.model.TreeNode getTreeNode(com.alibaba.fastjson.JSONObject jsonObject,
Object data)
TreeNode from the given JSONObjectjsonObject - JSONObject containing tree informationTreeNode of the given JSONObjectpublic static final List<IParameterModel> getUpdatedParameters(List<IParameterModel> params, String query, String placeholder)
Stringparams - List of IParameterModelsquery - Stringplaceholder - String for the parameters within the queryList of parameterspublic static String setParamValues(String original, String replaceStr, List<IParameterModel> params, boolean withQuotes)
public static final String genreateUrl(Datenquelle source)
source - Datenquelle to generate servlet URL forString servlet URLNullPointerException - if source is nullIllegalArgumentException - if ID of source is invalidpublic static final String generateUrl(Mandant client, EDatenabfrageTyp type, String queryName, List<IParameterModel> params)
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.