1 | public class CommitCommand implements ICommand↵ | | 1 | public class ReturnResultTabCommand implements ICommand↵
|
2 | {↵ | | 2 | {↵
|
3 | /** Current session. */↵ | | 3 | /** Frame to be returned. */↵
|
4 | private ISession _session;↵ | | 4 | private ResultFrame _resultFrame;↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * Ctor.↵ | | 6 | * Ctor.↵
|
7 | *↵ | | 7 | *↵
|
8 | * @param session Current session.↵ | | 8 | * @param resultFrame Frame to be returned to tabbed folder.↵
|
9 | *↵ | | 9 | *↵
|
10 | * @throws IllegalArgumentException↵ | | 10 | * @throws IllegalArgumentException↵
|
11 | * Thrown if a <TT>null</TT> <TT>ISession</TT> passed.↵ | | 11 | * Thrown if a <TT>null</TT> <TT>ResultFrame</TT> passed.↵
|
12 | */↵ | | 12 | */↵
|
13 | public CommitCommand(ISession session)↵ | | 13 | public ReturnResultTabCommand(ResultFrame resultFrame)↵
|
14 | {↵ | | 14 | {↵
|
15 | super();↵ | | 15 | super();↵
|
16 | if (session == null)↵ | | 16 | if (resultFrame == null)↵
|
17 | {↵ | | 17 | {↵
|
18 | throw new IllegalArgumentException("Null ISession passed");↵ | | 18 | throw new IllegalArgumentException("Null ResultFrame passed");↵
|
19 | }↵ | | 19 | }↵
|
|
20 | _session = session;↵ | | 20 | _↵
|
21 | }↵ | | |
|
|
22 | /**↵ | | |
|
23 | * Commit the transaction.↵ | | |
|
24 | */↵ | | |
|
25 | public void execute()↵ | | |
|
26 | {↵ | | |
|
27 | _session.commit↵ | | 21 | resultFrame = resultFrame;↵
|
| | | 22 | }↵
|
|
| | | 23 | public void execute()↵
|
| | | 24 | {↵
|
28 | () | | 25 | _resultFrame.returnToTabbedPane()
|