xref: /aoo41x/main/offapi/com/sun/star/sdbc/XClob.idl (revision cdf0e10c)
1*cdf0e10cSrcweir/*************************************************************************
2*cdf0e10cSrcweir *
3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir *
5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir *
7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir *
9*cdf0e10cSrcweir * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir *
11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir *
15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir *
21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir *
26*cdf0e10cSrcweir ************************************************************************/
27*cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_XClob_idl__
28*cdf0e10cSrcweir#define __com_sun_star_sdbc_XClob_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
31*cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
32*cdf0e10cSrcweir#endif
33*cdf0e10cSrcweir
34*cdf0e10cSrcweir module com {  module sun {  module star {  module io {
35*cdf0e10cSrcweir published interface XInputStream;
36*cdf0e10cSrcweir};};};};
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir#ifndef __com_sun_star_sdbc_SQLException_idl__
39*cdf0e10cSrcweir#include <com/sun/star/sdbc/SQLException.idl>
40*cdf0e10cSrcweir#endif
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir module com {  module sun {  module star {  module sdbc {
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir/** is the mapping for the SQL
46*cdf0e10cSrcweir	<code>CLOB</code>
47*cdf0e10cSrcweir	type.
48*cdf0e10cSrcweir
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir	<p>
51*cdf0e10cSrcweir	A SQL
52*cdf0e10cSrcweir	<code>CLOB</code>
53*cdf0e10cSrcweir	is a built-in type
54*cdf0e10cSrcweir	that stores a Character Large Object as a column value in a row of
55*cdf0e10cSrcweir	a database table.
56*cdf0e10cSrcweir	The driver implements a
57*cdf0e10cSrcweir	<code>Clob</code>
58*cdf0e10cSrcweir	object using a SQL
59*cdf0e10cSrcweir	<code>locator(CLOB)</code>
60*cdf0e10cSrcweir	, which means that a
61*cdf0e10cSrcweir	<code>Clob</code>
62*cdf0e10cSrcweir	object
63*cdf0e10cSrcweir	contains a logical pointer to the SQL
64*cdf0e10cSrcweir	<code>CLOB</code>
65*cdf0e10cSrcweir	data rather than
66*cdf0e10cSrcweir	the data itself. A
67*cdf0e10cSrcweir	<code>Clob</code>
68*cdf0e10cSrcweir	object is valid for the duration
69*cdf0e10cSrcweir	of the transaction in which it was created.
70*cdf0e10cSrcweir	</p>
71*cdf0e10cSrcweir	<p>
72*cdf0e10cSrcweir	The
73*cdf0e10cSrcweir	<code>Clob</code>
74*cdf0e10cSrcweir	interface provides methods for getting the
75*cdf0e10cSrcweir	length of a SQL
76*cdf0e10cSrcweir	<code>CLOB</code>
77*cdf0e10cSrcweir	(Character Large Object) value,
78*cdf0e10cSrcweir	for materializing a
79*cdf0e10cSrcweir	<code>CLOB</code>
80*cdf0e10cSrcweir	value on the client, and for
81*cdf0e10cSrcweir	searching for a substring or
82*cdf0e10cSrcweir	<code>CLOB</code>
83*cdf0e10cSrcweir	object within a
84*cdf0e10cSrcweir	<code>CLOB</code>
85*cdf0e10cSrcweir	value.
86*cdf0e10cSrcweir	</p>
87*cdf0e10cSrcweir	<p>
88*cdf0e10cSrcweir	Methods in the interfaces
89*cdf0e10cSrcweir	<type scope="com::sun::star::sdbc">XResultSet</type>
90*cdf0e10cSrcweir	,
91*cdf0e10cSrcweir	and
92*cdf0e10cSrcweir	<type scope="com::sun::star::sdbc">XPreparedStatement</type>
93*cdf0e10cSrcweir	, such as
94*cdf0e10cSrcweir	<code>getClob</code>
95*cdf0e10cSrcweir	and
96*cdf0e10cSrcweir	<code>setClob</code>
97*cdf0e10cSrcweir	allow a programmer to
98*cdf0e10cSrcweir	access the SQL
99*cdf0e10cSrcweir	<code>CLOB</code>
100*cdf0e10cSrcweir	.
101*cdf0e10cSrcweir	</p>
102*cdf0e10cSrcweir */
103*cdf0e10cSrcweirpublished interface XClob: com::sun::star::uno::XInterface
104*cdf0e10cSrcweir{
105*cdf0e10cSrcweir	//-------------------------------------------------------------------------
106*cdf0e10cSrcweir
107*cdf0e10cSrcweir	/** returns the number of characters in the
108*cdf0e10cSrcweir		<code>CLOB</code>
109*cdf0e10cSrcweir		value
110*cdf0e10cSrcweir		designated by this
111*cdf0e10cSrcweir		<code>Clob</code>
112*cdf0e10cSrcweir		object.
113*cdf0e10cSrcweir		@returns
114*cdf0e10cSrcweir			the length of the CLOB object
115*cdf0e10cSrcweir		@throws SQLException
116*cdf0e10cSrcweir			if a database access error occurs.
117*cdf0e10cSrcweir	 */
118*cdf0e10cSrcweir	hyper length() raises (SQLException);
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir  	//-------------------------------------------------------------------------
121*cdf0e10cSrcweir
122*cdf0e10cSrcweir	/** returns a copy of the specified substring in the
123*cdf0e10cSrcweir		<code>Clob</code>
124*cdf0e10cSrcweir		value
125*cdf0e10cSrcweir		designated by this
126*cdf0e10cSrcweir		<code>Clob</code>
127*cdf0e10cSrcweir		object.
128*cdf0e10cSrcweir
129*cdf0e10cSrcweir
130*cdf0e10cSrcweir		<p>
131*cdf0e10cSrcweir		The substring begins at position <code>pos</code> and has up
132*cdf0e10cSrcweir		to
133*cdf0e10cSrcweir		<code>length</code>
134*cdf0e10cSrcweir		consecutive characters.
135*cdf0e10cSrcweir		</p>
136*cdf0e10cSrcweir		@param pos
137*cdf0e10cSrcweir			the starting position
138*cdf0e10cSrcweir		@param length
139*cdf0e10cSrcweir			the length of the substring
140*cdf0e10cSrcweir		@returns
141*cdf0e10cSrcweir			the substring
142*cdf0e10cSrcweir		@throws SQLException
143*cdf0e10cSrcweir			if a database access error occurs.
144*cdf0e10cSrcweir	 */
145*cdf0e10cSrcweir	string getSubString([in]hyper pos, [in]long length) raises (SQLException);
146*cdf0e10cSrcweir
147*cdf0e10cSrcweir	//-------------------------------------------------------------------------
148*cdf0e10cSrcweir
149*cdf0e10cSrcweir	/** gets the
150*cdf0e10cSrcweir		<code>Clob</code>
151*cdf0e10cSrcweir		contents as a stream.
152*cdf0e10cSrcweir		@returns
153*cdf0e10cSrcweir			the stream
154*cdf0e10cSrcweir		@throws SQLException
155*cdf0e10cSrcweir			if a database access error occurs.
156*cdf0e10cSrcweir	 */
157*cdf0e10cSrcweir	com::sun::star::io::XInputStream getCharacterStream() raises (SQLException);
158*cdf0e10cSrcweir
159*cdf0e10cSrcweir	//-------------------------------------------------------------------------
160*cdf0e10cSrcweir
161*cdf0e10cSrcweir	/** determines the character position at which the specified substring
162*cdf0e10cSrcweir		<code>searchstr</code>
163*cdf0e10cSrcweir		appears in the
164*cdf0e10cSrcweir		<code>Clob</code>
165*cdf0e10cSrcweir		. The search begins at position
166*cdf0e10cSrcweir		<code>start</code>
167*cdf0e10cSrcweir		.
168*cdf0e10cSrcweir		@param searchstr
169*cdf0e10cSrcweir			the string to search
170*cdf0e10cSrcweir		@param start
171*cdf0e10cSrcweir			the starting position
172*cdf0e10cSrcweir		@returns
173*cdf0e10cSrcweir			the length of the CLOB object
174*cdf0e10cSrcweir		@throws SQLException
175*cdf0e10cSrcweir			if a database access error occurs.
176*cdf0e10cSrcweir	 */
177*cdf0e10cSrcweir	hyper position([in]string searchstr, [in]long start)
178*cdf0e10cSrcweir		raises (SQLException);
179*cdf0e10cSrcweir
180*cdf0e10cSrcweir  	//-------------------------------------------------------------------------
181*cdf0e10cSrcweir
182*cdf0e10cSrcweir	/** determines the position at which the specified
183*cdf0e10cSrcweir		<code>Clob</code>
184*cdf0e10cSrcweir		object
185*cdf0e10cSrcweir		<code>pattern</code>
186*cdf0e10cSrcweir		appears in this
187*cdf0e10cSrcweir		<code>Clob</code>
188*cdf0e10cSrcweir		object. The search begins at position
189*cdf0e10cSrcweir		<code>start</code>
190*cdf0e10cSrcweir		.
191*cdf0e10cSrcweir		@param pattern
192*cdf0e10cSrcweir			the CLOB to search
193*cdf0e10cSrcweir		@param start
194*cdf0e10cSrcweir			the starting position
195*cdf0e10cSrcweir		@returns
196*cdf0e10cSrcweir			the position of the CLOB inside
197*cdf0e10cSrcweir		@throws SQLException
198*cdf0e10cSrcweir			if a database access error occurs.
199*cdf0e10cSrcweir	 */
200*cdf0e10cSrcweir	hyper positionOfClob([in]XClob pattern, [in]hyper start)
201*cdf0e10cSrcweir		raises (SQLException);
202*cdf0e10cSrcweir};
203*cdf0e10cSrcweir
204*cdf0e10cSrcweir//=============================================================================
205*cdf0e10cSrcweir
206*cdf0e10cSrcweir}; }; }; };
207*cdf0e10cSrcweir
208*cdf0e10cSrcweir/*===========================================================================
209*cdf0e10cSrcweir===========================================================================*/
210*cdf0e10cSrcweir#endif
211