1 | public class CommitCommand implements ICommand↵ | | 1 | public class GotoNextResultsTabCommand implements ICommand
↵
|
2 | {↵ | | 2 | {
↵
|
3 | /** Current session. */↵ | | 3 | /** The current panel. */
↵
|
4 | private ISession _session;↵ | | 4 | private ↵
|
| | | 5 | final ISQLPanelAPI _panel;↵
|
| | | 6 |
↵
|
5 | /**↵ | | 7 | /**
↵
|
6 | * Ctor.↵ | | 8 | * Ctor.
↵
|
7 | *↵ | | 9 | *
↵
|
8 | * @param session Current session.↵ | | 10 | * @param panel The SQL Panel we want to display the next results↵
|
| | | 11 | * tab for.
↵
|
9 | *↵ | | 12 | *
↵
|
10 | * @throws IllegalArgumentException↵ | | 13 | * @throws IllegalArgumentException
↵
|
11 | * Thrown if a <TT>null</TT> <TT>ISession</TT> passed.↵ | | 14 | * Thrown if a <TT>null</TT> <TT>ISQLPanelAPI</TT> passed.
↵
|
12 | */↵ | | 15 | */
↵
|
13 | public CommitCommand(ISession session)↵ | | 16 | public GotoNextResultsTabCommand(ISQLPanelAPI panel)
↵
|
14 | {↵ | | 17 | {
↵
|
15 | super();↵ | | 18 | super();
↵
|
16 | if (session == null)↵ | | 19 | if (panel == null)
↵
|
17 | {↵ | | 20 | {
↵
|
18 | throw new IllegalArgumentException("Null ISession passed");↵ | | 21 | throw new IllegalArgumentException("ISQLPanelAPI == null");
↵
|
19 | }↵ | | 22 | }
↵
|
20 | _session = session;↵ | | 23 | _↵
|
21 | }↵ | | |
|
| | | 24 | panel = panel;↵
|
| | | 25 | }↵
|
| | | 26 |
↵
|
22 | /**↵ | | 27 | /**
↵
|
23 | * Commit the transaction.↵ | | 28 | * Display the next results tab.
↵
|
24 | */↵ | | 29 | */
↵
|
25 | public void execute()↵ | | 30 | public void execute()
↵
|
26 | {↵ | | 31 | {
↵
|
27 | _session.commit() | | 32 | _panel.gotoNextResultsTab()
|