}
if(searchString!=null && searchString.length()>0 && !searchString.equals("%")) {
- if(pageNo == -2) query.append(" WHERE ");
+ if(pageNo == -2){
+ query.append(" WHERE ");
+ }
else query.append(" and ");
query.append("name like '"+ searchString +"'");
}
posFormField = sql.indexOf(fieldDisplay);
int posSelectField = sql.lastIndexOf("SELECT ", posFormField);
int andField = 0;
- int whereField = 0, whenField = 0;
+ int whereField = 0;
+ int whenField = 0;
andField = sql.lastIndexOf(" AND ", posFormField);
whereField = sql.indexOf(" WHERE", posSelectField);
whenField = sql.indexOf(" WHEN", posSelectField);
// reportSQL = reportSQL.replaceAll("[\\s]*\\(", "(");
colName = colName.replaceAll(",[\\s]*\\(", ",(");
StringBuffer colNameBuf = new StringBuffer(colName);
- int pos = 0, posFormatStart = 0, posFormatEnd = 0;
+ int pos = 0;
+ int posFormatStart = 0;
+ int posFormatEnd = 0;
String format = "";
if (colNameBuf.indexOf("999") == -1 && colNameBuf.indexOf("990") == -1) {
logger.debug(EELFLoggerDelegate.debugLogger, (" return colName " + colNameBuf.toString()));
break;
}
}
- if(flag == 1) return javascriptItemType;
+ if(flag == 1)
+ return javascriptItemType;
else {
javascriptItemType = objFactory.createJavascriptItemType();
getJavascriptList().getJavascriptItem().add(javascriptItemType);
String extracted = null;
nextToken = getNextCYMBALSQLParseToken(sql,true);
while (nextToken.length() > 0) {
- if (lastToken == null) lastToken = nextToken;
+ if (lastToken == null)
+ lastToken = nextToken;
if( lastToken.toUpperCase().startsWith("DO DISPLAY")) {
re = Pattern.compile("each(.*)\\[.(.*?)\\]"); //\\[(.*?)\\]
String extracted = null;
nextToken = getNextCYMBALSQLParseToken(sql,true);
while (nextToken.length() > 0) {
- if (lastToken == null) lastToken = nextToken;
+ if (lastToken == null)
+ lastToken = nextToken;
if( lastToken.toUpperCase().startsWith("DO DISPLAY")) {
re = Pattern.compile("each(.*)\\[.(.*?)\\]"); //\\[(.*?)\\]
paramValue = Utils.replaceInString(paramValue, "''", "'");
ds = ConnectionUtils.getDataSet(paramValue, dbInfo);
- if (ds.getRowCount() > 0) paramValue = ds.getString(0, 0);
+ if (ds.getRowCount() > 0){
+ paramValue = ds.getString(0, 0);
+ }
}
logger.debug(EELFLoggerDelegate.debugLogger, ("SQLSQLBASED B4^^^^^^^^^ " + sql + " " + fft.getValidationType() + " " + fft.getFieldName() + " " + fft.getFieldId()));
if(fft!=null && (fft.getValidationType()!=null && (fft.getValidationType().equals(FormField.VT_TIMESTAMP_HR) || fft.getValidationType().equals(FormField.VT_TIMESTAMP_MIN) ||fft.getValidationType().equals(FormField.VT_TIMESTAMP_SEC) ||fft.getValidationType().equals(FormField.VT_DATE) ))) {
re1 = Pattern.compile("(^[\r\n]|[\\s]|[^0-9a-zA-Z])AND(.*?[^\r\n]*)"+ "\\["+fft.getFieldName()+ "\\](.*?)\\s", Pattern.DOTALL);
posFormField = sql.indexOf(fieldDisplay);
posAnd = sql.lastIndexOf(" AND ", posFormField);
- if(posAnd < 0) posAnd = 0;
- else if (posAnd > 2) posAnd = posAnd - 2;
+ if(posAnd < 0)
+ posAnd = 0;
+ else if (posAnd > 2)
+ posAnd = posAnd - 2;
matcher = re1.matcher(sql);
if (matcher.find(posAnd)) {
sql = sql.replace(matcher.group(), "");
re1 = Pattern.compile("(^[\r\n]|[\\s]|[^0-9a-zA-Z])AND(.*?[^\r\n]*)"+ "\\["+fft.getFieldName()+ "\\](.*?)\\s", Pattern.DOTALL); //+[\'\\)|\'|\\s]
posFormField = sql.indexOf(fieldDisplay);
posAnd = sql.lastIndexOf(" AND ", posFormField);
- if(posAnd < 0) posAnd = 0;
- else if (posAnd > 2) posAnd = posAnd - 2;
+ if(posAnd < 0)
+ posAnd = 0;
+ else if (posAnd > 2)
+ posAnd = posAnd - 2;
matcher = re1.matcher(sql);
if (matcher.find(posAnd)) {
sql = sql.replace(matcher.group(), " ");
}catch(NumberFormatException ex){
numInt = 0;
}
- if(numInt < 10) return "0"+numInt;
+ if(numInt < 10)
+ return "0"+numInt;
else return ""+numInt;
}