View Javadoc
1 /* 2 Loader - tool for transfering data from one JDBC source to another and 3 doing transformations during copy. 4 Copyright (C) 2002 Together 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 You should have received a copy of the GNU Lesser General Public 14 License along with this library; if not, write to the Free Software 15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 /* 17 * CreateDatabaseOperation.java Aug 30, 2002 18 * Author : Sinisa Milosevic sinisami@eunet.yu 19 * 20 */ 21 22 23 package org.webdocwf.util.loader.test; 24 25 import java.sql.Connection; 26 import java.sql.Statement; 27 import org.webdocwf.util.loader.test.DatabaseOperation; 28 import org.webdocwf.util.loader.Loader; 29 import org.webdocwf.util.loader.LoaderException; 30 31 import java.sql.SQLException; 32 33 /*** 34 * Inserts data in tables using Loader. 35 * 36 * @author Sinisa Milosevic 37 * @version $Revision: 1.2 $ 38 */ 39 public class LoaderOperation extends DatabaseOperation { 40 41 private Loader loadJob = null; 42 43 public LoaderOperation() { 44 } 45 46 public LoaderOperation(Loader load) { 47 loadJob = load; 48 } 49 50 public void setLoader(Loader load) { 51 loadJob = load; 52 } 53 54 //////////////////////////////////////////////////////////////////////////// 55 // DatabaseOperation class 56 57 /*** 58 * Executes this operation on the specified database using the specified 59 * connection to the database. 60 * 61 * @param conn the database connection. 62 */ 63 64 public void execute(Connection conn) throws SQLException { 65 } 66 67 /*** 68 * Executes this operation on the specified database using the Loader. 69 * 70 */ 71 72 public void execute() throws LoaderException { 73 74 loadJob.load(); 75 76 } 77 78 /*** 79 * Returns type of database operation 80 * 81 */ 82 public String getDatabaseOperationType() { 83 return DatabaseOperation.LOADER; 84 } 85 86 }

This page was automatically generated by Maven