public class Tool4DatabaseImportExport
extends java.lang.Object
Tool4DatabaseImportExport
class imports and exports table data from ore to database.Modifier and Type | Field and Description |
---|---|
int |
errCode
internal error code of class.
|
java.lang.String |
errMess
internal error message of class.
|
Constructor and Description |
---|
Tool4DatabaseImportExport(n4e.core.list.List4SysUser sysUser,
java.lang.String databasename)
The constructor
Tool4DatabaseImportExport creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
boolean |
exportAllTables(java.util.ArrayList list,
java.lang.String xmlpath)
The method
exportAllTables exports all tables. |
boolean |
exportTable(java.lang.String dbpackage,
java.lang.String tablename,
java.lang.String xmlpath)
The method
exportTable exports a given table to xml. |
boolean |
exportTable(java.lang.String dbpackage,
java.lang.String tablename,
java.lang.String xmlpath,
java.util.ArrayList uid_list)
The method
exportTable exports a given table to xml. |
boolean |
importAllTables(java.util.ArrayList list,
java.lang.String xmlpath)
The method
importAllTables imports all tables. |
boolean |
importTable(java.lang.String dbpackage,
java.lang.String tablename,
java.lang.String xmlpath)
The method
importTable imports a given table to database. |
public int errCode
public java.lang.String errMess
public Tool4DatabaseImportExport(n4e.core.list.List4SysUser sysUser, java.lang.String databasename)
Tool4DatabaseImportExport
creates a new instance(object) of the class.sysUser
- the system user.databasename
- the name of the current database.public boolean importAllTables(java.util.ArrayList list, java.lang.String xmlpath) throws java.lang.Exception
importAllTables
imports all tables.list
- the table list.xmlpath
- the xml pathjava.lang.Exception
- if errorpublic boolean importTable(java.lang.String dbpackage, java.lang.String tablename, java.lang.String xmlpath) throws java.lang.Exception
importTable
imports a given table to database.dbpackage
- the package of the data access classes.tablename
- the name of the table.xmlpath
- the path to the data folder.java.lang.Exception
- if errorpublic boolean exportAllTables(java.util.ArrayList list, java.lang.String xmlpath) throws java.lang.Exception
exportAllTables
exports all tables.list
- the table list.xmlpath
- xml pathjava.lang.Exception
- if errorpublic boolean exportTable(java.lang.String dbpackage, java.lang.String tablename, java.lang.String xmlpath) throws java.lang.Exception
exportTable
exports a given table to xml.dbpackage
- the package of the data access classes.tablename
- the name od the table.xmlpath
- xml pathjava.lang.Exception
- if errorpublic boolean exportTable(java.lang.String dbpackage, java.lang.String tablename, java.lang.String xmlpath, java.util.ArrayList uid_list) throws java.lang.Exception
exportTable
exports a given table to xml.dbpackage
- the package of the data access classes.tablename
- the name od the table.xmlpath
- xml pathuid_list
- uid listjava.lang.Exception
- if error