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_TransactionIsolation_idl__
28*cdf0e10cSrcweir#define __com_sun_star_sdbc_TransactionIsolation_idl__
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir module com {  module sun {  module star {  module sdbc {
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir
33*cdf0e10cSrcweir/** distinguishes different possible transaction isolation levels.
34*cdf0e10cSrcweir */
35*cdf0e10cSrcweirpublished constants TransactionIsolation
36*cdf0e10cSrcweir{
37*cdf0e10cSrcweir
38*cdf0e10cSrcweir	/** indicates that transactions are not supported.
39*cdf0e10cSrcweir	 */
40*cdf0e10cSrcweir	const long NONE					=  0;
41*cdf0e10cSrcweir
42*cdf0e10cSrcweir	/** Dirty reads, non-repeatable reads and phantom reads can occur.
43*cdf0e10cSrcweir		     This level allows a row changed by one transaction to be read
44*cdf0e10cSrcweir		     by another transaction before any changes in that row have been
45*cdf0e10cSrcweir		     committed (a "dirty read").  If any of the changes are rolled back,
46*cdf0e10cSrcweir		     the second transaction will have retrieved an invalid row.
47*cdf0e10cSrcweir	 */
48*cdf0e10cSrcweir	const long READ_UNCOMMITTED 	=  1;
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir	/** Dirty reads are prevented; non-repeatable reads and phantom
51*cdf0e10cSrcweir		     reads can occur.  This level only prohibits a transaction
52*cdf0e10cSrcweir		     from reading a row with uncommitted changes in it.
53*cdf0e10cSrcweir	 */
54*cdf0e10cSrcweir	const long READ_COMMITTED		=  2;
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir	/** Dirty reads and non-repeatable reads are prevented; phantom
57*cdf0e10cSrcweir		     reads can occur.  This level prohibits a transaction from
58*cdf0e10cSrcweir		     reading a row with uncommitted changes in it, and it also
59*cdf0e10cSrcweir		     prohibits the situation where one transaction reads a row,
60*cdf0e10cSrcweir		     a second transaction alters the row, and the first transaction
61*cdf0e10cSrcweir		     rereads the row, getting different values the second time
62*cdf0e10cSrcweir		     (a "non-repeatable read").
63*cdf0e10cSrcweir	 */
64*cdf0e10cSrcweir	const long REPEATABLE_READ 		=  4;
65*cdf0e10cSrcweir
66*cdf0e10cSrcweir	/** Dirty reads, non-repeatable reads and phantom reads are prevented.
67*cdf0e10cSrcweir		     This level includes the prohibitions in
68*cdf0e10cSrcweir		     <code>REPEATABLE_READ</code>
69*cdf0e10cSrcweir			 and further prohibits the
70*cdf0e10cSrcweir		     situation where one transaction reads all rows that satisfy
71*cdf0e10cSrcweir		     a WHERE condition, a second transaction inserts a row that
72*cdf0e10cSrcweir		     satisfies that WHERE condition, and the first transaction
73*cdf0e10cSrcweir		     rereads for the same condition, retrieving the additional
74*cdf0e10cSrcweir		     "phantom" row in the second read.
75*cdf0e10cSrcweir	 */
76*cdf0e10cSrcweir	const long SERIALIZABLE 		=  8;
77*cdf0e10cSrcweir};
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir//=============================================================================
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir}; }; }; };
82*cdf0e10cSrcweir
83*cdf0e10cSrcweir/*===========================================================================
84*cdf0e10cSrcweir===========================================================================*/
85*cdf0e10cSrcweir#endif
86