update dev300-m58
[ooovba.git] / offapi / com / sun / star / sdbc / KeyRule.idl
blob0490f0cf3e339a8069027a3a8452c843dea9e63a
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: KeyRule.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_KeyRule_idl__
31 #define __com_sun_star_sdbc_KeyRule_idl__
33 module com { module sun { module star { module sdbc {
36 /** determines the rules for foreign key constraints.
38 published constants KeyRule
41 /** a possible value for the column's
42 <code>UPDATE_RULE</code>
43 and
44 <code>DELETE_RULE</code>
45 in the
46 <type scope="com::sun::star::sdbc">XResultSet</type>
47 objects returned by the methods
48 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
50 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
52 and
53 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
55 <P>
56 For the column
57 <code>UPDATE_RULE</code>
59 it indicates that
60 when the primary key is updated, the foreign key (imported key)
61 is changed to agree with it.
62 </P>
63 <P>
64 For the column
65 <code>DELETE_RULE</code>
67 it indicates that
68 when the primary key is deleted, rows that imported that key
69 are deleted.
70 </P>
72 const long CASCADE = 0;
73 //-------------------------------------------------------------------------
75 /** a possible value for the column's
76 <code>UPDATE_RULE</code>
77 and
78 <code>DELETE_RULE</code>
79 in the
80 <type scope="com::sun::star::sdbc">XResultSet</type>
81 objects returned by the methods
82 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
84 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
86 and
87 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
89 <P>
90 For the column
91 <code>UPDATE_RULE</code>
92 , it indicates that
93 a primary key may not be updated if it has been imported by
94 another table as a foreign key.
95 </P>
96 <P>
97 For the column
98 <code>DELETE_RULE</code>
99 , it indicates that
100 a primary key may not be deleted if it has been imported by
101 another table as a foreign key.
102 </P>
104 const long RESTRICT = 1;
105 //-------------------------------------------------------------------------
107 /** a possible value for the column's
108 <code>UPDATE_RULE</code>
110 <code>DELETE_RULE</code>
111 in the
112 <type scope="com::sun::star::sdbc">XResultSet</type>
113 objects returned by the methods
114 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
116 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
119 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
122 For the columns
123 <code>UPDATE_RULE</code>
125 <code>DELETE_RULE</code>
127 it indicates that
128 when the primary key is updated or deleted, the foreign key (imported key)
129 is changed to <code>NULL</code>.
130 </P>
132 const long SET_NULL = 2;
133 //-------------------------------------------------------------------------
135 /** a possible value for the column's
136 <code>UPDATE_RULE</code>
138 <code>DELETE_RULE</code>
139 in the
140 <type scope="com::sun::star::sdbc">XResultSet</type>
141 objects returned by the methods
142 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
144 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
146 and
147 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
150 For the columns
151 <code>UPDATE_RULE</code>
153 <code>DELETE_RULE</code>
155 it indicates that if the primary key has been imported, it cannot be updated or deleted.
156 </P>
158 const long NO_ACTION = 3;
159 //-------------------------------------------------------------------------
161 /** a possible value for the column's
162 <code>UPDATE_RULE</code>
164 <code>DELETE_RULE</code>
165 in the
166 <type scope="com::sun::star::sdbc">XResultSet</type>
167 objects returned by the methods
168 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getImportedKeys()</member>
170 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getExportedKeys()</member>
173 <member scope="com::sun::star::sdbc">XDatabaseMetaData::getCrossReference()</member>
176 For the columns
177 <code>UPDATE_RULE</code>
179 <code>DELETE_RULE</code>
181 it indicates that
182 if the primary key is updated or deleted, the foreign key (imported key)
183 is set to the default value.
184 </P>
186 const long SET_DEFAULT = 4;
189 //=============================================================================
191 }; }; }; };
193 /*===========================================================================
194 ===========================================================================*/
195 #endif