KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > compiere > db > CompiereDatabase


1 /******************************************************************************
2  * The contents of this file are subject to the Compiere License Version 1.1
3  * ("License"); You may not use this file except in compliance with the License
4  * You may obtain a copy of the License at http://www.compiere.org/license.html
5  * Software distributed under the License is distributed on an "AS IS" basis,
6  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
7  * the specific language governing rights and limitations under the License.
8  * The Original Code is Compiere ERP & CRM Business Solution
9  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
10  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
11  * created by ComPiere are Copyright (C) ComPiere, Inc.; All Rights Reserved.
12  * Contributor(s): ______________________________________.
13  *****************************************************************************/

14 package org.compiere.db;
15
16 import java.sql.*;
17 import javax.sql.RowSet JavaDoc;
18
19 //import org.compiere.util.CompiereStatement;
20

21 /**
22  * Interface for Compiere Databases
23  *
24  * @author Jorg Janke
25  * @version $Id: CompiereDatabase.java,v 1.12 2003/09/27 01:22:18 jjanke Exp $
26  */

27 public interface CompiereDatabase
28 {
29     /**
30      * Get Database Name
31      * @return database short name
32      */

33     public String JavaDoc getName();
34
35     /**
36      * Get Database Description
37      * @return database long name and version
38      */

39     public String JavaDoc getDescription();
40
41     /**
42      * Get Database Driver
43      * @return Driver
44      */

45     public Driver getDriver();
46
47
48     /**
49      * Get Standard JDBC Port
50      * @return standard port
51      */

52     public int getStandardPort();
53
54     /**
55      * Get Database Connection String
56      * @param connection Connection Descriptor
57      * @return connection String
58      */

59     public String JavaDoc getConnectionURL (CConnection connection);
60
61     /**
62      * Supports BLOB
63      * @return true if BLOB is supported
64      */

65     public boolean supportsBLOB();
66
67     /**
68      * String Representation
69      * @return info
70      */

71     public String JavaDoc toString();
72
73     /*************************************************************************/
74
75     /**
76      * Convert an individual Oracle Style statements to target database statement syntax
77      *
78      * @param oraStatement oracle statement
79      * @return converted Statement
80      * @throws Exception
81      */

82     public String JavaDoc convertStatement (String JavaDoc oraStatement);
83
84     /*************************************************************************/
85
86     /**
87      * Set the RowID
88      * @param pstmt prepared statement
89      * @param pos position
90      * @param rowID ROWID
91      * @throws SQLException
92      */

93     public void setRowID (PreparedStatement pstmt, int pos, Object JavaDoc rowID) throws SQLException;
94
95     /**
96      * Get rhe RowID
97      * @param rs result set
98      * @param pos position
99      * @return rowID ROWID
100      * @throws SQLException
101      */

102     public Object JavaDoc getRowID (ResultSet rs, int pos) throws SQLException;
103
104     /**
105      * Get RowSet
106      * @param rs result set
107      * @return RowSet
108      * @throws SQLException
109      */

110     public RowSet JavaDoc getRowSet (ResultSet rs) throws SQLException;
111
112 } // CompiereDatabase
113

114
Popular Tags