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 IParameterModel
spublic static final String[] getNonEmptyArray(List<GenericStringModel> strings)
strings
- List
of GenericStringModel
sString
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 JSON
json
- JSON
containing tree informationTreeNode
of the given JSON
public static final org.primefaces.model.TreeNode getTreeNode(com.alibaba.fastjson.JSONArray jsonArray, Object data)
TreeNode
from the given JSONArray
jsonArray
- JSONArray
containing tree informationTreeNode
of the given JSONArray
public static final org.primefaces.model.TreeNode getTreeNode(com.alibaba.fastjson.JSONObject jsonObject, Object data)
TreeNode
from the given JSONObject
jsonObject
- JSONObject
containing tree informationTreeNode
of the given JSONObject
public static final List<IParameterModel> getUpdatedParameters(List<IParameterModel> params, String query, String placeholder)
String
params
- List
of IParameterModel
squery
- String
placeholder
- 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 null
IllegalArgumentException
- if ID of source is invalidpublic static final String generateUrl(Mandant client, EDatenabfrageTyp type, String queryName, List<IParameterModel> params)
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.