1 | public class AddPrimaryKeyAction extends AbstractRefactoringAction↵ | | 1 | public class RenameTableAction extends AbstractRefactoringAction
↵
|
2 | {↵ | | 2 | {
↵
|
3 | private static final long serialVersionUID = 488082040428357799L;↵ | | 3 | private static final long serialVersionUID = 8970571253545997433L;↵
|
| | | 4 |
↵
|
4 | /**↵ | | 5 | /**
↵
|
5 | * Internationalized strings for this class.↵ | | 6 | * Internationalized strings for this class.
↵
|
6 | */↵ | | 7 | */
↵
|
7 | private static final StringManager s_stringMgr =↵ | | 8 | private static final StringManager s_stringMgr =
↵
|
8 | StringManagerFactory.getStringManager(AddPrimaryKeyAction.class);↵ | | 9 | StringManagerFactory.getStringManager(RenameTableAction.class);↵
|
|
| | | 10 |
↵
|
9 | private static interface i18n↵ | | 11 | private static interface i18n
↵
|
10 | {↵ | | 12 | {
↵
|
11 | String ACTION_PART = s_stringMgr.getString("AddPrimaryKeyAction.actionPart");↵ | | 13 | String ACTION_PART = s_stringMgr.getString("RenameTableAction.actionPart");↵
|
|
| | | 14 |
↵
|
12 | String OBJECT_PART = s_stringMgr.getString("Shared.tableObject");↵ | | 15 | String OBJECT_PART = s_stringMgr.getString("Shared.tableObject");↵
|
|
| | | 16 |
↵
|
13 | String SINGLE_OBJECT_MESSAGE =↵ | | 17 | String SINGLE_OBJECT_MESSAGE =
↵
|
14 | s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);↵ | | 18 | s_stringMgr.getString("Shared.singleObjectMessage", OBJECT_PART, ACTION_PART);
↵
|
15 | }↵ | | 19 | }↵
|
|
| | | 20 |
↵
|
16 | public AddPrimaryKeyAction(IApplication app, Resources rsrc)↵ | | 21 | public RenameTableAction(IApplication app, Resources rsrc)
↵
|
17 | {↵ | | 22 | {
↵
|
18 | super(app, rsrc);↵ | | 23 | super(app, rsrc);
↵
|
19 | }↵ | | 24 | }↵
|
|
20 | /**↵ | | |
|
21 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getCommand(net.sourceforge.squirrel_sql.fw.sql.IDatabaseObjectInfo[])↵ | | |
|
22 | */↵ | | |
|
| | | 25 |
↵
|
23 | @Override↵ | | 26 | @Override
↵
|
24 | protected ICommand getCommand(IDatabaseObjectInfo[] info)↵ | | 27 | protected ICommand getCommand(IDatabaseObjectInfo[] info)
↵
|
25 | {↵ | | 28 | {
↵
|
26 | return new AddPrimaryKeyCommand(_session, info);↵ | | 29 | return new RenameTableCommand(_session, info);
↵
|
27 | }↵ | | 30 | }↵
|
|
28 | /**↵ | | |
|
29 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#getErrorMessage()↵ | | |
|
30 | */↵ | | |
|
| | | 31 |
↵
|
31 | @Override↵ | | 32 | @Override
↵
|
32 | protected String getErrorMessage()↵ | | 33 | protected String getErrorMessage()
↵
|
33 | {↵ | | 34 | {
↵
|
34 | return i18n.SINGLE_OBJECT_MESSAGE;↵ | | 35 | return i18n.SINGLE_OBJECT_MESSAGE;
↵
|
35 | }↵ | | 36 | }↵
|
|
36 | /**↵ | | |
|
37 | * @see net.sourceforge.squirrel_sql.plugins.refactoring.actions.AbstractRefactoringAction#isMultipleObjectAction()↵ | | |
|
38 | */↵ | | |
|
| | | 37 |
↵
|
39 | @Override↵ | | 38 | @Override
↵
|
40 | protected boolean isMultipleObjectAction()↵ | | 39 | protected boolean isMultipleObjectAction()
↵
|
41 | {↵ | | 40 | {
↵
|
42 | return false | | 41 | return false
|