1 | public class CreateAliasCommand implements ICommand↵ | | 1 | public class CommitCommand implements ICommand↵
|
2 | {↵ | | 2 | {↵
|
3 | /** Application API. */↵ | | 3 | /** ↵
|
4 | private final IApplication _app↵ | | 4 | Current session. */↵
|
5 | ;↵ | | 5 | private ISession _session;↵
|
|
6 | /**↵ | | 6 | /**↵
|
7 | * Ctor.↵ | | 7 | * Ctor.↵
|
8 | *↵ | | 8 | *↵
|
9 | * @param app Application API.↵ | | 9 | * @param session Current session.↵
|
10 | *↵ | | 10 | *↵
|
11 | * @throws IllegalArgumentException↵ | | 11 | * @throws IllegalArgumentException↵
|
12 | * Thrown if a <TT>null</TT> <tt>IApplication</tt> passed.↵ | | 12 | * Thrown if a <TT>null</TT> <TT>ISession</TT> passed.↵
|
13 | */↵ | | 13 | */↵
|
14 | public CreateAliasCommand(IApplication app)↵ | | 14 | public CommitCommand(ISession session)↵
|
15 | {↵ | | 15 | {↵
|
16 | super();↵ | | 16 | super();↵
|
17 | if (app == null)↵ | | 17 | if (session == null)↵
|
18 | {↵ | | 18 | {↵
|
19 | throw new IllegalArgumentException("IApplication == null");↵ | | 19 | throw new IllegalArgumentException("↵
|
20 | }↵ | | |
|
21 | _app = app;↵ | | |
|
22 | }↵ | | |
|
|
23 | /**↵ | | |
|
24 | * Execute command.↵ | | |
|
25 | */↵ | | |
|
26 | public void execute()↵ | | |
|
27 | {↵ | | |
|
28 | _app.getWindowManager().showNewAliasInternalFrame↵ | | 20 | Null ISession passed");↵
|
| | | 21 | }↵
|
| | | 22 | _session = session;↵
|
| | | 23 | }↵
|
|
| | | 24 | /**↵
|
| | | 25 | * Commit the transaction.↵
|
| | | 26 | */↵
|
| | | 27 | public void execute()↵
|
| | | 28 | {↵
|
29 | () | | 29 | _session.commit()
|