01: package net.sourceforge.squirrel_sql.plugins.dbdiff.commands;
02:
03: /*
04: * Copyright (C) 2005 Rob Manning
05: * manningr@users.sourceforge.net
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License
09: * as published by the Free Software Foundation; either version 2
10: * of the License, or any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20: */
21:
22: import net.sourceforge.squirrel_sql.fw.util.ICommand;
23: import net.sourceforge.squirrel_sql.plugins.dbdiff.DiffExecutor;
24: import net.sourceforge.squirrel_sql.plugins.dbdiff.I18NBaseObject;
25: import net.sourceforge.squirrel_sql.plugins.dbdiff.SessionInfoProvider;
26:
27: /**
28: * This class represents the command that gets executed when the user clicks
29: * compare in a schema after selecting one or more tables.
30: */
31: public class CompareCommand extends I18NBaseObject implements ICommand {
32:
33: /** the class that does the work of copying */
34: private DiffExecutor executor = null;
35:
36: /**
37: * Constructor specifying the current session.
38: */
39: public CompareCommand(SessionInfoProvider provider) {
40: super ();
41: executor = new DiffExecutor(provider);
42: }
43:
44: // ICommand Interface implementation
45:
46: /**
47: * Kicks off the diff operation. All pieces of information are provided
48: * by the SessionInfoProvider and have been verified in the action prior
49: * to this point. Nothing left to do except start the copy operation.
50: */
51: public void execute() {
52: executor.execute();
53: }
54: }
|