java.lang.Object | +--com.ibm.commerce.marketingcenter.events.util.DBSql
This class is used to transfer data from the database to an XML file and vice versa. This class handles these two operations:
Field Summary | |
---|---|
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 Summary | |
---|---|
DBSql() Construct a DBSql object. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public static final java.lang.String ENCODING
public static final java.lang.String XML_ESCAPE_AMP_RP
public static final char XML_ESCAPE_AMP
public static final java.lang.String XML_ESCAPE_LT_RP
public static final char XML_ESCAPE_LT
public static final java.lang.String XML_ESCAPE_GT_RP
public static final char XML_ESCAPE_GT
public static final java.lang.String XML_ESCAPE_QUOT_RP
public static final char XML_ESCAPE_QUOT
public static final java.lang.String XML_ESCAPE_APOS_RP
public static final char XML_ESCAPE_APOS
Constructor Detail |
---|
public DBSql()
Method Detail |
---|
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.