Object[][] values = {
{
Long.valueOf(runId),
+ analysis.getProjectName(),
analysis.getBuildNumber(),
analysis.getStart(),
analysis.getEnd()
{
Column[] columns = { CfbSchema.RUNID };
Table[] tables = { CfbSchema.RUNS };
- Condition[] conditions = { new Condition( CfbSchema.STARTTIME, analysis.getStart(), Operation.LESS_THAN ) };
+ Condition[] conditions = {
+ new Condition( CfbSchema.PROJNAME, analysis.getProjectName(), Operation.EQUAL ),
+ new Condition( CfbSchema.STARTTIME, analysis.getStart(), Operation.LESS_THAN )
+ };
Sort[] sorts = { new Sort( CfbSchema.STARTTIME, Sort.Direction.DESCENDING ) };
int limit = 1;
Analysis getAnalysis(Long analysisId) throws SQLException, TypeMismatchException
{
- Column[] columns = { CfbSchema.VERSION, CfbSchema.STARTTIME, CfbSchema.ENDTIME };
+ Column[] columns = { CfbSchema.PROJNAME, CfbSchema.VERSION, CfbSchema.STARTTIME, CfbSchema.ENDTIME };
Table[] tables = { CfbSchema.RUNS };
Condition[] conditions = { new Condition( CfbSchema.RUNID, analysisId, Operation.EQUAL ) };
Row row = rows.get(0);
- String version = row.getString(0);
- java.util.Date start= row.getDate(1);
- java.util.Date end = row.getDate(2);
+ String projName = row.getString(0);
+ String version = row.getString(1);
+ java.util.Date start= row.getDate(2);
+ java.util.Date end = row.getDate(3);
- Analysis prior = new Analysis(version);
+ Analysis prior = new Analysis(projName, version);
prior.setId(analysisId.longValue());
prior.setStart(start);
prior.setEnd(end);