use of com.navercorp.dbtools.sqlmap.parser.QueryCondition in project cubrid-manager by CUBRID.
the class SqlmapPersistUtil method changeUsedCondition.
public void changeUsedCondition(String queryId, String condition, boolean needToUse) {
if (condition == null) {
return;
}
List<QueryCondition> queryConditions = condValues.get(queryId);
if (queryConditions == null) {
return;
}
boolean found = false;
for (QueryCondition queryCondition : queryConditions) {
if (condition.equals(queryCondition.getConditionKey() + ":" + queryCondition.getConditionBody())) {
found = true;
break;
}
}
if (!found) {
return;
}
Set<String> condSet = usedConditions.get(queryId);
if (needToUse) {
condSet.add(condition);
} else {
condSet.remove(condition);
}
}
Aggregations