KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sample > example > Database


1 package sample.example;
2
3 /**
4  * @mock.generate
5  */

6 public abstract class Database {
7
8     /**
9      * Start a transaction.
10      */

11     void start() {
12     }
13
14     /**
15      * Commit a transaction.
16      */

17     void commit() {}
18
19     /**
20      * Rollback a transaction.
21      */

22     void rollback(){}
23
24     /**
25      * Execute some SQL that modifies the database (UPDATE, INSERT, DELETE...).
26      * @throws IllegalArgumentException thrown if invalid SQL supplie.
27      */

28     void execute( String JavaDoc sql ) throws IllegalArgumentException JavaDoc{}
29
30     /**
31      * Execute some SQL that returns rows (SELECT...).
32      * @throws IllegalArgumentException thrown if invalid SQL supplie.
33      */

34     Rows select( String JavaDoc sql ) throws IllegalArgumentException JavaDoc{ return null; }
35
36 }
37
Popular Tags