public class DBSql
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.String |
ENCODING
Encoding used for the XML file.
|
static java.lang.String |
VERSION
Version for the XML file.
|
static char |
XML_ESCAPE_AMP
Ampersand character.
|
static java.lang.String |
XML_ESCAPE_AMP_RP
XML representation of the ampersand character.
|
static char |
XML_ESCAPE_APOS
Single quote character.
|
static java.lang.String |
XML_ESCAPE_APOS_RP
XML representation of the single quote character.
|
static char |
XML_ESCAPE_GT
Greater character.
|
static java.lang.String |
XML_ESCAPE_GT_RP
XML representation of the greater character.
|
static char |
XML_ESCAPE_LT
Smaller character.
|
static java.lang.String |
XML_ESCAPE_LT_RP
XML representation of the smaller character.
|
static char |
XML_ESCAPE_QUOT
Double quote character.
|
static java.lang.String |
XML_ESCAPE_QUOT_RP
XML representation of the double quote character.
|
Constructor and Description |
---|
DBSql()
Construct a DBSql object.
|
Modifier and Type | Method and Description |
---|---|
void |
extract(java.lang.String table,
DBConnection dBCon,
java.io.OutputStreamWriter xml)
This method do a "select *" on a table and write the result in a XML file.
|
void |
insert(java.io.InputStreamReader xmlStream,
DBConnection dBCon)
This method inserts into the database the data contains into an XML file.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String ENCODING
public static final java.lang.String VERSION
public static final char XML_ESCAPE_AMP
public static final java.lang.String XML_ESCAPE_AMP_RP
public static final char XML_ESCAPE_APOS
public static final java.lang.String XML_ESCAPE_APOS_RP
public static final char XML_ESCAPE_GT
public static final java.lang.String XML_ESCAPE_GT_RP
public static final char XML_ESCAPE_LT
public static final java.lang.String XML_ESCAPE_LT_RP
public static final char XML_ESCAPE_QUOT
public static final java.lang.String XML_ESCAPE_QUOT_RP
public void extract(java.lang.String table, DBConnection dBCon, java.io.OutputStreamWriter xml)
table
- The table name from which we extract the data.dBCon
- The database connection.xml
- The XML file to which we write the data.public void insert(java.io.InputStreamReader xmlStream, DBConnection dBCon)
xmlStream
- The XML file from which we read the data.dBCon
- The database connection.