Rev 1781 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1781 | Rev 1827 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | BERSERK - a BusinEss Runtime and SEcurity Resources Kit |
2 | BERSERK - a BusinEss Runtime and SEcurity Resources Kit |
3 | Copyright (C) 2003 Goncalo Luiz |
3 | Copyright (C) 2003 Goncalo Luiz |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either |
7 | License as published by the Free Software Foundation; either |
8 | version 2.1 of the License, or (at your option) any later version. |
8 | version 2.1 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, |
10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Lesser General Public License for more details. |
13 | Lesser General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Lesser General Public |
15 | You should have received a copy of the GNU Lesser General Public |
16 | License along with this library; if not, write to the Free Software |
16 | License along with this library; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | 18 | ||
19 | To contact Goncalo Luiz use the following e-mail address (use an @ instead of the _): |
19 | To contact Goncalo Luiz use the following e-mail address (use an @ instead of the _): |
20 | gedl_mega.ist.utl.pt |
20 | gedl_mega.ist.utl.pt |
21 | */ |
21 | */ |
22 | /* |
22 | /* |
23 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
23 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
24 | * |
24 | * |
25 | * |
25 | * |
26 | * Created at 19/Out/2003 , 14:56:47 |
26 | * Created at 19/Out/2003 , 14:56:47 |
27 | * |
27 | * |
28 | */ |
28 | */ |
29 | package pt.utl.ist.berserk.storage.empty; |
29 | package pt.utl.ist.berserk.storage.empty; |
30 | import pt.utl.ist.berserk.storage.ITransactionBroker; |
30 | import pt.utl.ist.berserk.storage.ITransactionBroker; |
31 | import pt.utl.ist.berserk.storage.exceptions.StorageException; |
31 | import pt.utl.ist.berserk.storage.exceptions.StorageException; |
32 | import sun.reflect.generics.reflectiveObjects.NotImplementedException; |
- | |
33 | 32 | ||
34 | import java.util.List; |
33 | import java.util.List; |
35 | /** |
34 | /** |
36 | * Does absolutely nothing.<br/> |
35 | * Does absolutely nothing.<br/> |
37 | * Use this if you don't want a transictional manager.<br/> |
36 | * Use this if you don't want a transictional manager.<br/> |
38 | * You must specify one. Otherwise BERSERK doesn't work. |
37 | * You must specify one. Otherwise BERSERK doesn't work. |
39 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
38 | * @author Goncalo Luiz gedl [AT] rnl [DOT] ist [DOT] utl [DOT] pt |
40 | * |
39 | * |
41 | * |
40 | * |
42 | * Created at 19/Out/2003 , 14:56:47 |
41 | * Created at 19/Out/2003 , 14:56:47 |
43 | * |
42 | * |
44 | */ |
43 | */ |
45 | public class TransactionBrokerEmpty implements ITransactionBroker |
44 | public class TransactionBrokerEmpty implements ITransactionBroker |
46 | { |
45 | { |
47 | static private TransactionBrokerEmpty instance; |
46 | static private TransactionBrokerEmpty instance; |
48 | private TransactionBrokerEmpty() |
47 | private TransactionBrokerEmpty() |
49 | { |
48 | { |
50 | } |
49 | } |
51 | public static TransactionBrokerEmpty getInstance() |
50 | public static TransactionBrokerEmpty getInstance() |
52 | { |
51 | { |
53 | if (instance == null) |
52 | if (instance == null) |
54 | instance = new TransactionBrokerEmpty(); |
53 | instance = new TransactionBrokerEmpty(); |
55 | return instance; |
54 | return instance; |
56 | } |
55 | } |
57 | public boolean isTransactionActive() throws StorageException |
56 | public boolean isTransactionActive() throws StorageException |
58 | { |
57 | { |
59 | throw new NotImplementedException(); |
58 | throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException("Not Implemented"); |
60 | } |
59 | } |
61 | public void beginTransaction() throws StorageException |
60 | public void beginTransaction() throws StorageException |
62 | { |
61 | { |
63 | } |
62 | } |
64 | public void commitTransaction() throws StorageException |
63 | public void commitTransaction() throws StorageException |
65 | { |
64 | { |
66 | } |
65 | } |
67 | public void abortTransaction() throws StorageException |
66 | public void abortTransaction() throws StorageException |
68 | { |
67 | { |
69 | } |
68 | } |
70 | public void lockRead(5+0%2Fdocs%2Fapi+List">List list) throws StorageException |
69 | public void lockRead(5+0%2Fdocs%2Fapi+List">List list) throws StorageException |
71 | { |
70 | { |
72 | } |
71 | } |
73 | public void lockRead(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException |
72 | public void lockRead(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException |
74 | { |
73 | { |
75 | } |
74 | } |
76 | public void lockWrite(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException |
75 | public void lockWrite(5+0%2Fdocs%2Fapi+Object">Object obj) throws StorageException |
77 | { |
76 | { |
78 | } |
77 | } |
79 | } |
78 | } |
80 | 79 |