update dev300-m58
[ooovba.git] / offapi / com / sun / star / sdbc / XDriverManager.idl
blob807fd7deba2d5e697d9fdf4daab7b606daf218fe
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDriverManager.idl,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_sdbc_XDriverManager_idl__
31 #define __com_sun_star_sdbc_XDriverManager_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_beans_PropertyValue_idl__
38 #include <com/sun/star/beans/PropertyValue.idl>
39 #endif
41 #ifndef __com_sun_star_sdbc_SQLException_idl__
42 #include <com/sun/star/sdbc/SQLException.idl>
43 #endif
45 module com { module sun { module star { module sdbc {
47 published interface XConnection;
48 published interface XDriver;
51 /** is the basic interface for managing a set of SDBC drivers.
55 <p>
56 When the method
57 <member scope="com::sun::star::sdbc">XDriverManager::getConnection()</member>
58 is called,
59 the DriverManager will attempt to
60 locate a suitable driver.
62 </p>
63 @see com::sun::star::sdbc::XDriver
64 @see com::sun::star::sdbc::XConnection
66 published interface XDriverManager: com::sun::star::uno::XInterface
68 //-------------------------------------------------------------------------
70 /** attempts to establish a connection to the given database URL.
71 The DriverManager attempts to select an appropriate driver from
72 the set of registered JDBC/SDBC drivers.
73 @param url
74 a database url of the form sdbc:subprotocol:subname
75 @returns
76 the Connection object
77 @throws SQLException
78 if a database access error occurs.
80 XConnection getConnection([in]string url)
81 raises (SQLException);
82 //-------------------------------------------------------------------------
84 /** attempts to establish a connection to the given database URL.
85 The DriverManager attempts to select an appropriate driver from
86 the set of registered JDBC/SDBC drivers.
87 @param url
88 a database url of the form sdbc:subprotocol:subname
89 @param info
90 a list of arbitrary string tag/value pairs as connection arguments;
91 normally at least a "user" and "password" property should be included
92 @see com::sun::star::sdbc::ConnectionProperties
93 @returns
94 the Connection object
95 @throws SQLException
96 if a database access error occurs.
98 XConnection getConnectionWithInfo([in]string url,
99 [in]sequence<com::sun::star::beans::PropertyValue> info)
100 raises (SQLException);
101 //-------------------------------------------------------------------------
103 /** sets the maximum time in seconds that a driver will wait
104 while attempting to connect to a database.
105 @param seconds
106 the login time limit in seconds
108 @throws SQLException
109 if a database access error occurs.
111 void setLoginTimeout([in]long seconds);
112 //-------------------------------------------------------------------------
114 /** gets the maximum time in seconds that a driver can wait
115 when attempting to login to a database.
116 @returns
117 the driver login time limit in seconds
119 @throws SQLException
120 if a database access error occurs.
122 long getLoginTimeout();
125 //=============================================================================
127 }; }; }; };
129 #endif