1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_sdbcx_XRowLocate_idl__
20 #define __com_sun_star_sdbcx_XRowLocate_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/sdbc
/SQLException.idl
>
26 module com
{ module sun
{ module star
{ module sdbcx
{
29 /** is used to identify rows within a result set and to find rows by a bookmark.
33 Bookmarks are only valid in the scope of the current result set and
34 are not interchangeable between result sets. A bookmark could be a complex data
35 structure, so it could not be compared in a safe way. Because of that, a provider
36 has to implement the compare method for bookmarks.
39 published
interface XRowLocate
: com
::sun
::star
::uno
::XInterface
42 /** returns the bookmark of the current row of a result set.
45 @throws com::sun::star::sdbc::SQLException
46 if a database access error occurs.
48 any getBookmark
() raises
(com
::sun
::star
::sdbc
::SQLException
);
50 /** moves the cursor to the row identified by an valid bookmark.
53 If the bookmark could not be located, a result set will be positioned
54 after the last record.
56 If the bookmark is invalid, or not generated by the current result set, then
57 the behavior is not defined, even an abnormal termination is possible.
60 the bookmark where to move
63 @throws com::sun::star::sdbc::SQLException
64 if a database access error occurs.
66 boolean moveToBookmark
([in]any bookmark
) raises
(com
::sun
::star
::sdbc
::SQLException
);
68 /** moves the cursor a relative number of rows, either positive or negative
69 starting at a given bookmark position.
73 If the bookmark could not be located, a result set will be positioned
74 after the last record.
76 If the bookmark is invalid, or not generated by the current result set, then
77 the behavior is not defined, even an abnormal termination is possible.
80 the bookmark where to move
82 count of rows move relative to the bookmark
85 @throws com::sun::star::sdbc::SQLException
86 if a database access error occurs.
88 boolean moveRelativeToBookmark
([in]any bookmark
, [in]long rows
)
89 raises
(com
::sun
::star
::sdbc
::SQLException
);
91 /** compares two bookmarks and returns an indication of their relative values.
94 The bookmarks must apply to the same ResultSet. You cannot reliably
95 compare bookmarks from different ResultSets, even if they were created from
96 the same source or statement.
98 A bookmark that is not valid, or incorrectly formed, will cause an exception.
105 a value of com::sun::star::sdbcx::CompareBookmark
106 @throws com::sun::star::sdbc::SQLException
107 if a database access error occurs.
109 @see com::sun::star::sdbcx::CompareBookmark
112 long compareBookmarks
([in]any first
, [in]any second
)
113 raises
(com
::sun
::star
::sdbc
::SQLException
);
115 /** determines whether the bookmarks of a result set are ordered or not.
118 @throws com::sun::star::sdbc::SQLException
119 if a database access error occurs.
120 @see com::sun::star::sdbcx::CompareBookmark
122 boolean hasOrderedBookmarks
() raises
(com
::sun
::star
::sdbc
::SQLException
);
124 /** returns the hash value for a specified bookmark.
129 @throws com::sun::star::sdbc::SQLException
130 if a database access error occurs.
132 long hashBookmark
([in]any bookmark
) raises
(com
::sun
::star
::sdbc
::SQLException
);
138 /*===========================================================================
139 ===========================================================================*/
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */