[29] | 1 | /* |
---|
| 2 | * This program is free software; you can redistribute it and/or modify |
---|
| 3 | * it under the terms of the GNU General Public License as published by |
---|
| 4 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 5 | * (at your option) any later version. |
---|
| 6 | * |
---|
| 7 | * This program is distributed in the hope that it will be useful, |
---|
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 10 | * GNU General Public License for more details. |
---|
| 11 | * |
---|
| 12 | * You should have received a copy of the GNU General Public License |
---|
| 13 | * along with this program; if not, write to the Free Software |
---|
| 14 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
| 15 | */ |
---|
| 16 | |
---|
| 17 | /* |
---|
| 18 | * DbUtils.java |
---|
| 19 | * Copyright (C) 2005 University of Waikato, Hamilton, New Zealand |
---|
| 20 | * |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | package weka.gui.sql; |
---|
| 24 | |
---|
| 25 | import weka.core.RevisionUtils; |
---|
| 26 | import weka.experiment.DatabaseUtils; |
---|
| 27 | |
---|
| 28 | import java.sql.Connection; |
---|
| 29 | |
---|
| 30 | /** |
---|
| 31 | * A little bit extended DatabaseUtils class. |
---|
| 32 | * |
---|
| 33 | * @see DatabaseUtils |
---|
| 34 | * @see #execute(String) |
---|
| 35 | * @author FracPete (fracpete at waikato dot ac dot nz) |
---|
| 36 | * @version $Revision: 1.4 $ |
---|
| 37 | */ |
---|
| 38 | public class DbUtils |
---|
| 39 | extends DatabaseUtils { |
---|
| 40 | |
---|
| 41 | /** for serialization. */ |
---|
| 42 | private static final long serialVersionUID = 103748569037426479L; |
---|
| 43 | |
---|
| 44 | /** |
---|
| 45 | * initializes the object. |
---|
| 46 | * |
---|
| 47 | * @throws Exception in case something goes wrong in the init of the |
---|
| 48 | * DatabaseUtils constructor |
---|
| 49 | * @see DatabaseUtils |
---|
| 50 | */ |
---|
| 51 | public DbUtils() throws Exception { |
---|
| 52 | super(); |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | * returns the current database connection. |
---|
| 57 | * |
---|
| 58 | * @return the current connection instance |
---|
| 59 | */ |
---|
| 60 | public Connection getConnection() { |
---|
| 61 | return m_Connection; |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | /** |
---|
| 65 | * Returns the revision string. |
---|
| 66 | * |
---|
| 67 | * @return the revision |
---|
| 68 | */ |
---|
| 69 | public String getRevision() { |
---|
| 70 | return RevisionUtils.extract("$Revision: 1.4 $"); |
---|
| 71 | } |
---|
| 72 | } |
---|