01: /*
02: * Copyright 2006-2007, Unitils.org
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.unitils.database.util;
17:
18: /**
19: * Enum defining whether a test must be run in a transaction and, if yes, what will be commit/rollback behavior.
20: *
21: * @author Filip Neven
22: * @author Tim Ducheyne
23: */
24: public enum TransactionMode {
25:
26: /**
27: * Value indicating that transactions should be disabled, i.e. the test should not be run in a transaction
28: */
29: DISABLED,
30:
31: /**
32: * Value indicating that the test should be executed in a transaction, and that this transaction must be committed
33: * at the end of the test.
34: */
35: COMMIT,
36:
37: /**
38: * Value indicating that the test should be executed in a transaction, and that this transaction must be rollbacked
39: * at the end of the test.
40: */
41: ROLLBACK,
42:
43: /**
44: * Value indicating that the default behavior is defined by the unitils property
45: * <code>DatabaseModule.Transactional.value.default</code> is in use.
46: */
47: DEFAULT;
48:
49: }
|