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

This page automatically generated by Maven