XSQLBluePrintNode other = (XSQLBluePrintNode) obj;
if (odlNode != null) {
return getBluePrintNodeName().equals(other.getBluePrintNodeName());
- } else if (this.odlTableName == null && other.odlTableName != null)
+ } else if (this.odlTableName == null && other.odlTableName != null) {
return false;
- if (this.odlTableName != null && other.odlTableName == null)
+ }
+ if (this.odlTableName != null && other.odlTableName == null) {
return false;
- else
+ }
+ else {
return this.odlTableName.equals(other.odlTableName);
+ }
}
@Override
}
public JDBCResultSet addSubQuery(String _sql,String logicalName) {
- if(subQueries == null)
+ if (subQueries == null) {
subQueries = new HashMap<String,JDBCResultSet>();
+ }
JDBCResultSet rs = new JDBCResultSet(_sql);
this.subQueries.put(logicalName,rs);
return rs;
}
public Map<String,JDBCResultSet> getSubQueries() {
- if(this.subQueries==null)
+ if (this.subQueries==null) {
this.subQueries = new HashMap<>();
+ }
return this.subQueries;
}
for (Object child : children) {
String odlNodeName = XSQLODLUtils.getNodeIdentiofier(child);
- if (odlNodeName == null)
+ if (odlNodeName == null) {
continue;
+ }
XSQLBluePrintNode eNodes[] = bluePrint
.getBluePrintNodeByODLTableName(odlNodeName);
- if (eNodes == null)
+ if (eNodes == null) {
continue;
+ }
boolean match = false;
for (XSQLBluePrintNode enode : eNodes) {
}
}
- if (!match)
+ if (!match) {
continue;
+ }
if (child.getClass().getName().endsWith("ImmutableContainerNode")) {
result.add(child);
for (XSQLBluePrintNode eNode : eNodes) {
bpn = this.tablesInQueryMap.get(eNode
.getBluePrintNodeName());
- if (bpn != null)
+ if (bpn != null) {
break;
+ }
}
boolean isObjectInCriteria = true;
if (bpn != null) {
if (isObjectInCriteria) {
if (root) {
- if (!rec.data.isEmpty())
+ if (!rec.data.isEmpty()) {
addRecord(rec.data);
+ }
} else {
result.add(rec);
}
int braketCount = 0;
int endSubQuery = startSubQuery;
do {
- if (sql.charAt(endSubQuery) == '(')
+ if (sql.charAt(endSubQuery) == '(') {
braketCount++;
- else if (sql.charAt(endSubQuery) == ')')
+ }
+ else if (sql.charAt(endSubQuery) == ')') {
braketCount--;
+ }
endSubQuery++;
} while (braketCount > 0 || endSubQuery == sql.length());
String subQuerySQL = sql.substring(startSubQuery + 1,endSubQuery - 1);
whereTo = order;
}
- if(whereTo==-1)
+ if(whereTo==-1) {
whereTo=lowSQL.length();
+ }
String whereStatement = rs.getSQL().substring(where + 5, whereTo)
.trim();