01: /*
02: Copyright (C) 2007 Mobixess Inc. http://www.java-objects-database.com
03:
04: This file is part of the JODB (Java Objects Database) open source project.
05:
06: JODB is free software; you can redistribute it and/or modify it under
07: the terms of version 2 of the GNU General Public License as published
08: by the Free Software Foundation.
09:
10: JODB is distributed in the hope that it will be useful, but WITHOUT ANY
11: WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: for more details.
14:
15: You should have received a copy of the GNU General Public License along
16: with this program; if not, write to the Free Software Foundation, Inc.,
17: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18: */
19: package com.mobixess.jodb.core.transaction;
20:
21: /**
22: * @author Mobixess
23: *
24: */
25: public class TransactionDescriptor {
26:
27: public static enum TRANSACTION_TYPE {
28: ADD, MODIFY, DELETE
29: }
30:
31: private TRANSACTION_TYPE _type;
32: private int _depth;
33:
34: /**
35: *
36: */
37: public TransactionDescriptor() {
38: }
39:
40: public TransactionDescriptor(TRANSACTION_TYPE type, int depth) {
41: super ();
42: _type = type;
43: _depth = depth;
44: }
45:
46: /**
47: * @param _category the _type to set
48: */
49: public void setType(TRANSACTION_TYPE type) {
50: _type = type;
51: }
52:
53: /**
54: * @return the _type
55: */
56: public TRANSACTION_TYPE getType() {
57: return _type;
58: }
59:
60: /**
61: * @param _depth the _depth to set
62: */
63: public void setDepth(int depth) {
64: this ._depth = depth;
65: }
66:
67: /**
68: * @return the _depth
69: */
70: public int getDepth() {
71: return _depth;
72: }
73: }
|