import net.jaekl.cfb.xml.BugCollection;
import net.jaekl.cfb.xml.BugInstance;
import net.jaekl.cfb.xml.LocalVariable;
+import net.jaekl.cfb.xml.Variable;
import net.jaekl.cfb.xml.messages.BugCategory;
import net.jaekl.cfb.xml.messages.BugPattern;
import net.jaekl.cfb.xml.messages.MessageCollection;
return false;
}
+ assert (null != analysis.getProjectName());
+
// ----------------------------------
// Add a run record for this analysis
return null;
}
- List<LocalVariable> vars = bug.getVariables();
+ List<Variable> vars = bug.getVariables();
if ((null == vars) || (0 == vars.size())) {
return null;
}
return getVarId(vars.get(0));
}
- LocalVariable getVar(Long varId) throws SQLException, TypeMismatchException
+ LocalVariable getVar(Long varId) throws SQLException, TypeMismatchException, StoreException
{
if (null == varId) {
return null;
List<Row> result = m_driver.select(m_con, columns, tables, conditions);
if (result.size() < 1) {
- throw new SQLException("No variable found for ID " + varId);
+ throw new StoreException(StoreException.Type.INVALID_VAR_ID, ""+varId);
}
if (result.size() > 1) {
throw new SQLException("Too many matches (" + result.size() + ") found for variable ID " + varId);
return new LocalVariable(varId, varName, varRole);
}
- Long getVarId(LocalVariable var) throws SQLException, TypeMismatchException
+ Long getVarId(Variable var) throws SQLException, TypeMismatchException
{
if (null == var) {
return null;
return storeVar(var);
}
- Long findVarId(LocalVariable var) throws SQLException, TypeMismatchException
+ Long findVarId(Variable var) throws SQLException, TypeMismatchException
{
Column[] columns = { CfbSchema.VARID_PK };
Table[] tables = { CfbSchema.VARIABLES };
return null; // not found
}
- Long storeVar(LocalVariable var) throws SQLException
+ Long storeVar(Variable var) throws SQLException
{
long varId = m_driver.nextVal(m_con, CfbSchema.VARIABLE_SEQ);