org.jboss.jrunit.controller.persistence
Class BenchmarkDatabaseBenchmarkPersistence

java.lang.Object
  extended by org.jboss.jrunit.controller.persistence.BenchmarkPersistence
      extended by org.jboss.jrunit.controller.persistence.BenchmarkDatabaseBenchmarkPersistence

public class BenchmarkDatabaseBenchmarkPersistence
extends BenchmarkPersistence

Executes the database persistence for Benchmark*

Author:
clebert.suconic@jboss.com

Constructor Summary
BenchmarkDatabaseBenchmarkPersistence(java.sql.Connection conn)
           
 
Method Summary
 void close()
           
 void persist(Benchmark benchmark)
           
 Benchmark readBenchmark(java.sql.ResultSet rset, boolean readExecutions)
          Reads a benchmark from any query like "SELECT ID,NAME,PARENT_ID FROM BENCH_MARK"
 java.util.Collection readBenchmarks(int parentId, boolean recursiveOnSubBenchmarks)
          Loads all the Benchmarks with a given parent.
 java.util.Collection readBenchmarks(int parentId, boolean recursiveOnSubBenchmarks, boolean readExecutions)
           
 void readExecutions(Benchmark benchmark)
           
 void readExecutions(Benchmark benchmark, java.sql.ResultSet rset)
          Reads the executions from any query like "SELECT EXECUTION_ID, EXECUTION_TS, ELAPSED_TIME , EXECUTIONS_NUMBER FROM BENCHMARK_EXECUTION WHERE BENCHMARK_ID=?"
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BenchmarkDatabaseBenchmarkPersistence

public BenchmarkDatabaseBenchmarkPersistence(java.sql.Connection conn)
Method Detail

close

public void close()
           throws java.sql.SQLException
Specified by:
close in class BenchmarkPersistence
Throws:
java.sql.SQLException

persist

public void persist(Benchmark benchmark)
             throws java.sql.SQLException
Specified by:
persist in class BenchmarkPersistence
Throws:
java.sql.SQLException

readBenchmarks

public java.util.Collection readBenchmarks(int parentId,
                                           boolean recursiveOnSubBenchmarks)
                                    throws java.sql.SQLException
Description copied from class: BenchmarkPersistence
Loads all the Benchmarks with a given parent. If keepgoing is true, the method will load children of children also (recursive method)

Specified by:
readBenchmarks in class BenchmarkPersistence
Throws:
java.sql.SQLException

readBenchmarks

public java.util.Collection readBenchmarks(int parentId,
                                           boolean recursiveOnSubBenchmarks,
                                           boolean readExecutions)
                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

readBenchmark

public Benchmark readBenchmark(java.sql.ResultSet rset,
                               boolean readExecutions)
                        throws java.sql.SQLException
Reads a benchmark from any query like "SELECT ID,NAME,PARENT_ID FROM BENCH_MARK"

Throws:
java.sql.SQLException

readExecutions

public void readExecutions(Benchmark benchmark)
                    throws java.sql.SQLException
Throws:
java.sql.SQLException

readExecutions

public void readExecutions(Benchmark benchmark,
                           java.sql.ResultSet rset)
                    throws java.sql.SQLException
Reads the executions from any query like "SELECT EXECUTION_ID, EXECUTION_TS, ELAPSED_TIME , EXECUTIONS_NUMBER FROM BENCHMARK_EXECUTION WHERE BENCHMARK_ID=?"

Throws:
java.sql.SQLException


JRunit, a JUnit extension for distributed client/server tests.