KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > outerj > daisy > install > DatabaseSpecifics


1 /*
2  * Copyright 2004 Outerthought bvba and Schaubroeck nv
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.outerj.daisy.install;
17
18 import java.io.Reader JavaDoc;
19 import java.sql.SQLException JavaDoc;
20
21 public interface DatabaseSpecifics {
22     /**
23      * Get the database function that returns the current date and time.
24      */

25     String JavaDoc getCurrentDateTimeFunction();
26
27     /**
28      * Returns statements that have to be executed before the script starts running.
29      */

30     public String JavaDoc[] getPreStatements();
31
32     /**
33      * Returns statements that have to be executed before the script starts running.
34      */

35     public String JavaDoc[] getPostStatements();
36
37     public char getStatementSeparator();
38
39     /**
40      * Indicates whether the statement separator has to be dropped or not
41      * (which is e.g. the case for Oracle).
42      */

43     public boolean getDropStatementSeparator();
44
45     public Reader JavaDoc getSchemaScript();
46
47     public Reader JavaDoc getDataScript();
48
49     /**
50      * Makes the current database empty. This is used by the testcases to start
51      * from a fresh state for each testcase.
52      *
53      * <p>This method should make the database empty, as if were just created as new.
54      */

55     public void clearDatabase(String JavaDoc dbUrl, String JavaDoc dbName, String JavaDoc dbUser, String JavaDoc dbPassword) throws SQLException JavaDoc;
56
57     public String JavaDoc getForeignKeyStatement(String JavaDoc table, String JavaDoc field, String JavaDoc otherTable, String JavaDoc otherField, String JavaDoc constraintName);
58
59     public String JavaDoc getTestStatement();
60 }
61
Popular Tags