xref: /AOO42X/main/connectivity/qa/connectivity/tools/DatabaseAccess.java (revision b0efeae40e43e6d4ccd561d22ec612d42773857b)
1*c3ab0d6aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c3ab0d6aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c3ab0d6aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c3ab0d6aSAndrew Rist  * distributed with this work for additional information
6*c3ab0d6aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c3ab0d6aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c3ab0d6aSAndrew Rist  * "License"); you may not use this file except in compliance
9*c3ab0d6aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*c3ab0d6aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*c3ab0d6aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c3ab0d6aSAndrew Rist  * software distributed under the License is distributed on an
15*c3ab0d6aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c3ab0d6aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c3ab0d6aSAndrew Rist  * specific language governing permissions and limitations
18*c3ab0d6aSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*c3ab0d6aSAndrew Rist  *************************************************************/
21*c3ab0d6aSAndrew Rist 
22*c3ab0d6aSAndrew Rist 
23cdf0e10cSrcweir package connectivity.tools;
24cdf0e10cSrcweir 
25cdf0e10cSrcweir import com.sun.star.frame.XModel;
26cdf0e10cSrcweir import com.sun.star.io.IOException;
27cdf0e10cSrcweir import com.sun.star.lang.XMultiServiceFactory;
28cdf0e10cSrcweir import com.sun.star.sdb.XOfficeDatabaseDocument;
29cdf0e10cSrcweir import com.sun.star.sdbc.SQLException;
30cdf0e10cSrcweir import connectivity.tools.sdb.Connection;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir /**
33cdf0e10cSrcweir  *
34cdf0e10cSrcweir  * @author oj93728
35cdf0e10cSrcweir  */
36cdf0e10cSrcweir public interface DatabaseAccess
37cdf0e10cSrcweir {
defaultConnection()38cdf0e10cSrcweir     Connection defaultConnection() throws SQLException;
39cdf0e10cSrcweir 
executeSQL(final String statementString)40cdf0e10cSrcweir     void executeSQL(final String statementString) throws SQLException;
41cdf0e10cSrcweir 
store()42cdf0e10cSrcweir     void store() throws IOException;
43cdf0e10cSrcweir 
close()44cdf0e10cSrcweir     void close();
45cdf0e10cSrcweir 
closeAndDelete()46cdf0e10cSrcweir     void closeAndDelete();
47cdf0e10cSrcweir 
getDatabaseDocument()48cdf0e10cSrcweir     XOfficeDatabaseDocument getDatabaseDocument();
49cdf0e10cSrcweir 
getModel()50cdf0e10cSrcweir     XModel getModel();
51cdf0e10cSrcweir 
getDocumentURL()52cdf0e10cSrcweir     String getDocumentURL();
53cdf0e10cSrcweir 
getDataSource()54cdf0e10cSrcweir     DataSource getDataSource();
55cdf0e10cSrcweir 
createRowSet(final int _commandType, final String _command)56cdf0e10cSrcweir     RowSet createRowSet(final int _commandType, final String _command);
57cdf0e10cSrcweir 
getORB()58cdf0e10cSrcweir     XMultiServiceFactory getORB();
59cdf0e10cSrcweir }
60