|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.webdocwf.util.xml.XmlWriter
Load existing XML file , creating DOM from file or creating new DOM.Methods will change DOM and save new DOM in XML file.
Constructor Summary | |
XmlWriter(java.lang.String fileName)
Constructor will build Document from the specified file if file exist, or will create new Document if file not exist. |
Method Summary | |
protected void |
createTable(java.lang.String sqlStatement,
java.lang.String tableName)
Adds sql statement CREATE TABLE in XML file. |
protected void |
delete(java.lang.String tableName,
java.lang.String[] whereColumnNames,
java.lang.String[] whereColumnValues)
Method will delete row(s) from XML file. |
protected void |
dropTable(java.lang.String tableName)
Method will delete row(s) from XML file. |
java.util.ArrayList |
getTableProperties(java.lang.String tableName)
Gets table properties in form ArrayList. |
protected void |
insert(java.lang.String tableName,
java.lang.String[] columnNames,
java.lang.String[] columnValues)
Method will insert row in XML file. |
protected void |
saveDOM(org.w3c.dom.Node document)
Save DOM as XML file. |
protected void |
update(java.lang.String tableName,
java.lang.String[] columnNames,
java.lang.String[] columnValues,
java.lang.String[] whereColumnNames,
java.lang.String[] whereColumnValues)
Method will update row in in XML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlWriter(java.lang.String fileName) throws java.sql.SQLException
fileName
- full pathname of the XML file
java.sql.SQLException
Method Detail |
protected void createTable(java.lang.String sqlStatement, java.lang.String tableName) throws java.sql.SQLException
sqlStatement
- CREATE TABLE statement which will be add into XML filetableName
- name of table which will be created
java.sql.SQLException
protected void delete(java.lang.String tableName, java.lang.String[] whereColumnNames, java.lang.String[] whereColumnValues) throws java.sql.SQLException
tableName
- name of table from which will be deleted rows.whereColumnNames
- names of columns in WHERE clause.whereColumnValues
- values of columns in WHERE clause.
java.sql.SQLException
protected void dropTable(java.lang.String tableName) throws java.sql.SQLException
tableName
- name of table which will be deleted.
java.sql.SQLException
protected void insert(java.lang.String tableName, java.lang.String[] columnNames, java.lang.String[] columnValues) throws java.sql.SQLException
tableName
- name of table in which will be added rows.columnNames
- names of columns in which will be added data.columnValues
- value which will be insert into table.
java.sql.SQLException
protected void update(java.lang.String tableName, java.lang.String[] columnNames, java.lang.String[] columnValues, java.lang.String[] whereColumnNames, java.lang.String[] whereColumnValues) throws java.sql.SQLException
tableName
- name of table which will be updatad.columnNames
- names of columns in which will be added data.columnValues
- value which will be insert into table.whereColumnNames
- names of columns in WHERE clause.whereColumnValues
- values of columns in WHERE clause.
java.sql.SQLException
public java.util.ArrayList getTableProperties(java.lang.String tableName) throws java.sql.SQLException
tableName
- name of table.
java.sql.SQLException
protected void saveDOM(org.w3c.dom.Node document) throws java.sql.SQLException
document
- DOM which will be saved in XML file.
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |