org.clazzes.jdbc2xml.tools
Class Commands
java.lang.Object
org.clazzes.jdbc2xml.tools.Commands
public abstract class Commands
- extends Object
Toplevel commands for importing/exporting a database.
- Author:
- lech
Method Summary |
static void |
dropTables(Connection connection,
TableFilter filter)
|
static void |
jdbc2xml(Connection fromConnection,
OutputStream toStream,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
|
static void |
jdbcExtract(Connection connection,
String tempDB,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
|
static void |
jdbcping(Connection fromConnection)
|
static void |
xml2jdbc(Object inObject,
Connection toConnection,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
|
static void |
xml2xml(Object inObject,
OutputStream toStream,
ProcessRestrictionFilter processRestrictionFilter)
Convert from one XML to another XML. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Commands
public Commands()
jdbc2xml
public static void jdbc2xml(Connection fromConnection,
OutputStream toStream,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
throws FileNotFoundException,
TransformerConfigurationException,
SQLException,
SAXException
- Throws:
FileNotFoundException
TransformerConfigurationException
SQLException
SAXException
jdbcping
public static void jdbcping(Connection fromConnection)
throws SQLException
- Throws:
SQLException
xml2xml
public static void xml2xml(Object inObject,
OutputStream toStream,
ProcessRestrictionFilter processRestrictionFilter)
throws SAXException,
ZipException,
IOException
- Convert from one XML to another XML.
May be useful to produce a ZIP-File with separated Data-XML-Files from an existing BZIP2-XML-File.
- Parameters:
inObject
- Either a File
(in case of ZIP-File source) or a InputStream
to read from.toStream
- OutputStream
to write to.processRestrictionFilter
-
- Throws:
SAXException
ZipException
IOException
xml2jdbc
public static void xml2jdbc(Object inObject,
Connection toConnection,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
throws TransformerConfigurationException,
SQLException,
SAXException,
IOException
- Throws:
TransformerConfigurationException
SQLException
SAXException
IOException
jdbcExtract
public static void jdbcExtract(Connection connection,
String tempDB,
TimeZone timeZone,
ProcessRestrictionFilter processRestrictionFilter)
throws SQLException,
FileNotFoundException,
TransformerConfigurationException,
SAXException
- Throws:
SQLException
FileNotFoundException
TransformerConfigurationException
SAXException
dropTables
public static void dropTables(Connection connection,
TableFilter filter)
throws SQLException
- Parameters:
connection
- The database connection on which to drop all tables.filter
- The table filter. If null, all tables are dropped.
- Throws:
SQLException
- Upon erros.
Copyright © 2011. All Rights Reserved.