use of org.compiere.util.CLogger in project adempiere by adempiere.
the class InfoPanel method getSQLText.
// getSQLText
/**
* Get SQL WHERE parameter
* @param s string
* @return Upper case text with wild cards as configured
*/
public static String getSQLText(String s) {
s = s.toUpperCase();
// Check the configuration for the wild card pattern to apply
// It can be "%*" for first-only, "*%" for last-only, "%*%" for both or "*" for none.
// The pattern string must start and/or end with a "%" symbol. The "*" symbol can be any string.
// The default is last-only. "%" or "%%" are valid and will be interpreted as both.
String wildCardPattern = MSysConfig.getValue(SYSCONFIG_INFO_AUTO_WILDCARD, "*%", Env.getAD_Client_ID(Env.getCtx()));
if (wildCardPattern.startsWith("%")) {
if (!s.startsWith("%"))
s = "%" + s;
}
if (wildCardPattern.endsWith("%")) {
if (!s.endsWith("%"))
s += "%";
}
// Need static logger
CLogger mlog = CLogger.get();
mlog.fine("String with wild cards: " + s);
return s;
}
Aggregations