Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / sdbc / XClob.idl
blobe93d92276b2cf90fae54b78f48dba1b654c874bb
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: XClob.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_XClob_idl__
31 #define __com_sun_star_sdbc_XClob_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 module com { module sun { module star { module io {
38 published interface XInputStream;
39 };};};};
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 {
48 /** is the mapping for the SQL
49 <code>CLOB</code>
50 type.
53 <p>
54 A SQL
55 <code>CLOB</code>
56 is a built-in type
57 that stores a Character Large Object as a column value in a row of
58 a database table.
59 The driver implements a
60 <code>Clob</code>
61 object using a SQL
62 <code>locator(CLOB)</code>
63 , which means that a
64 <code>Clob</code>
65 object
66 contains a logical pointer to the SQL
67 <code>CLOB</code>
68 data rather than
69 the data itself. A
70 <code>Clob</code>
71 object is valid for the duration
72 of the transaction in which it was created.
73 </p>
74 <p>
75 The
76 <code>Clob</code>
77 interface provides methods for getting the
78 length of a SQL
79 <code>CLOB</code>
80 (Character Large Object) value,
81 for materializing a
82 <code>CLOB</code>
83 value on the client, and for
84 searching for a substring or
85 <code>CLOB</code>
86 object within a
87 <code>CLOB</code>
88 value.
89 </p>
90 <p>
91 Methods in the interfaces
92 <type scope="com::sun::star::sdbc">XResultSet</type>
94 and
95 <type scope="com::sun::star::sdbc">XPreparedStatement</type>
96 , such as
97 <code>getClob</code>
98 and
99 <code>setClob</code>
100 allow a programmer to
101 access the SQL
102 <code>CLOB</code>
104 </p>
106 published interface XClob: com::sun::star::uno::XInterface
108 //-------------------------------------------------------------------------
110 /** returns the number of characters in the
111 <code>CLOB</code>
112 value
113 designated by this
114 <code>Clob</code>
115 object.
116 @returns
117 the length of the CLOB object
118 @throws SQLException
119 if a database access error occurs.
121 hyper length() raises (SQLException);
123 //-------------------------------------------------------------------------
125 /** returns a copy of the specified substring in the
126 <code>Clob</code>
127 value
128 designated by this
129 <code>Clob</code>
130 object.
134 The substring begins at position <code>pos</code> and has up
136 <code>length</code>
137 consecutive characters.
138 </p>
139 @param pos
140 the starting position
141 @param length
142 the length of the substring
143 @returns
144 the substring
145 @throws SQLException
146 if a database access error occurs.
148 string getSubString([in]hyper pos, [in]long length) raises (SQLException);
150 //-------------------------------------------------------------------------
152 /** gets the
153 <code>Clob</code>
154 contents as a stream.
155 @returns
156 the stream
157 @throws SQLException
158 if a database access error occurs.
160 com::sun::star::io::XInputStream getCharacterStream() raises (SQLException);
162 //-------------------------------------------------------------------------
164 /** determines the character position at which the specified substring
165 <code>searchstr</code>
166 appears in the
167 <code>Clob</code>
168 . The search begins at position
169 <code>start</code>
171 @param searchstr
172 the string to search
173 @param start
174 the starting position
175 @returns
176 the length of the CLOB object
177 @throws SQLException
178 if a database access error occurs.
180 hyper position([in]string searchstr, [in]long start)
181 raises (SQLException);
183 //-------------------------------------------------------------------------
185 /** determines the position at which the specified
186 <code>Clob</code>
187 object
188 <code>pattern</code>
189 appears in this
190 <code>Clob</code>
191 object. The search begins at position
192 <code>start</code>
194 @param pattern
195 the CLOB to search
196 @param start
197 the starting position
198 @returns
199 the position of the CLOB inside
200 @throws SQLException
201 if a database access error occurs.
203 hyper positionOfClob([in]XClob pattern, [in]hyper start)
204 raises (SQLException);
207 //=============================================================================
209 }; }; }; };
211 /*===========================================================================
212 ===========================================================================*/
213 #endif