Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / sdbcx / XRowLocate.idl
blob2fc16bc7bf24d106f02c5e64c15c12080cd43015
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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.
32 <p>
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.
37 </p>
39 published interface XRowLocate: com::sun::star::uno::XInterface
42 /** returns the bookmark of the current row of a result set.
43 @returns
44 the current bookmark
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.
52 <p>
53 If the bookmark could not be located, a result set will be positioned
54 after the last record.
55 <br/>
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.
58 </p>
59 @param bookmark
60 the bookmark where to move
61 @returns
62 `TRUE` if successful
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.
72 <p>
73 If the bookmark could not be located, a result set will be positioned
74 after the last record.
75 <br/>
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.
78 </p>
79 @param bookmark
80 the bookmark where to move
81 @param rows
82 count of rows move relative to the bookmark
83 @returns
84 `TRUE` if successful
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.
93 <p>
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.
97 <br/>
98 A bookmark that is not valid, or incorrectly formed, will cause an exception.
99 </p>
100 @param first
101 the first bookmark
102 @param second
103 the second bookmark
104 @returns
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.
116 @returns
117 `TRUE` if so
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.
125 @param bookmark
126 the bookmark to hash
127 @returns
128 the hashed value
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);
136 }; }; }; };
138 /*===========================================================================
139 ===========================================================================*/
140 #endif
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */