Java Doc for DataExporter.java in  » Database-Client » SQL-Workbench » workbench » db » exporter » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » SQL Workbench » workbench.db.exporter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   workbench.db.exporter.DataExporter

DataExporter
public class DataExporter implements Interruptable,ErrorReporter,ProgressReporter,Committer(Code)

author:
   support@sql-workbench.net


Field Summary
final public static  intEXPORT_HTML
     Export to HTML.
final public static  intEXPORT_ODS
    
final public static  intEXPORT_SQL
     Export to SQL statements.
final public static  intEXPORT_TXT
     Export to plain text.
final public static  intEXPORT_XLS
    
final public static  intEXPORT_XLSX
    
final public static  intEXPORT_XML
     Export to XML file (WB specific).

Constructor Summary
public  DataExporter(WbConnection con)
     Create a DataExporter for the specified connection.

Method Summary
public  voidaddControlFileFormat(ControlFileFormat format)
    
public  voidaddControlFileFormats(Set<ControlFileFormat> formats)
    
public  voidaddError(String msg)
    
public  voidaddTableExportJob(String anOutputfile, TableIdentifier table)
    
public  voidaddWarning(String msg)
    
public  voidcancelExecution()
    
public  voidclearJobs()
    
public  voidcloseProgress()
    
public  voidcommitNothing()
    
public  booleanconfirmCancel()
    
protected  voidcreateProgressPanel()
    
public  voidexportTable(Window aParent, TableIdentifier table)
    
public  booleangetAppendToFile()
    
 List<String>getBlobIdColumns()
    
public  BlobModegetBlobMode()
     Returns the currently selected mode for BLOB literals.
public  StringgetChrFunction()
    
public  List<ColumnIdentifier>getColumnsToExport()
    
public  intgetCommitEvery()
    
public  booleangetCompressOutput()
    
public  StringgetConcatFunction()
     Getter for property concatFunction.
public  StringgetConcatString()
    
public  WbConnectiongetConnection()
    
public  Set<ControlFileFormat>getControlFileFormats()
    
public  booleangetCreateFullHtmlPage()
    
public  StringgetDateFormat()
    
public  SimpleDateFormatgetDateFormatter()
    
public  StringgetDateLiteralType()
     Return the type of date literals to be created when generating SQL statements.
public  DecimalFormatgetDecimalFormatter()
    
public  StringgetEncoding()
    
public  CharSequencegetErrors()
    
public  booleangetEscapeHtml()
    
public  CharacterRangegetEscapeRange()
    
public  booleangetExportHeaders()
    
public  StringgetFilenameColumn()
    
public  StringgetFullOutputFilename()
    
public  ListgetKeyColumnsToUse()
     Getter for property keyColumnsToUse.
public  StringgetLineEnding()
    
public  intgetNumberExportedTables()
    
public  StringgetOutputFilename()
    
public  StringgetPageTitle()
    
public  booleangetQuoteAlways()
    
public  QuoteEscapeTypegetQuoteEscaping()
    
public  StringgetSql()
    
public  intgetSqlType()
    
public  StringgetTableName()
    
public  StringgetTextDelimiter()
    
public  StringgetTextQuoteChar()
    
public  StringgetTimestampFormat()
    
public  SimpleDateFormatgetTimestampFormatter()
    
public  longgetTotalRows()
    
public  StringgetTypeDisplay()
    
public  booleangetUseCDATA()
    
public  booleangetUseVerboseFormat()
    
public  CharSequencegetWarnings()
    
public  booleangetWriteClobAsFile()
    
public  StringgetXsltTransformation()
    
public  StringgetXsltTransformationOutput()
    
public  booleanhasError()
    
public  booleanhasWarning()
    
public  booleanisIncludeCreateTable()
    
public  booleanisSuccess()
    
protected  voidopenProgressMonitor(Frame parent)
     Open the progress monitor window.
public  voidrunJobs()
    
public  booleanselectOutput(Window parent)
    
public  voidsetAppendToFile(boolean aFlag)
    
public  voidsetBlobIdColumns(List<String> columns)
    
public  voidsetBlobMode(String type)
     Define how blobs should be handled during export. Modes allowed are
  • BLOB_MODE_LITERAL
  • BLOB_MODE_ANSI
  • BLOB_MODE_FILE

Parameters:
  type - the blob mode to be used.
public  voidsetChrFunction(String aFunc)
    
public  voidsetColumnsToExport(List<ColumnIdentifier> columns)
    
public  voidsetCommitEvery(int count)
     Set the number of statements after which to add a commit to generated SQL scripts.
public  voidsetCompressOutput(boolean flag)
    
public  voidsetConcatFunction(String func)
     Setter for property concatFunction.
public  voidsetConcatString(String aConcatString)
    
public  voidsetContinueOnError(boolean aFlag)
    
public  voidsetCreateFullHtmlPage(boolean aFlag)
    
public  voidsetCurrentRow(int currentRow)
    
public  voidsetDateFormat(String aFormat)
    
public  voidsetDateLiteralType(String type)
     Define the format for date and timestamp literals when writing SQL statements.
public  voidsetDecimalSymbol(char aSymbol)
    
public  voidsetDecimalSymbol(String aSymbol)
    
public  voidsetEncoding(String enc)
    
public  voidsetEscapeHtml(boolean aFlag)
    
public  voidsetEscapeRange(CharacterRange range)
    
public  voidsetExportAllColumns()
    
public  voidsetExportHeaders(boolean aFlag)
    
public  voidsetFilenameColumn(String colname)
    
public  voidsetHtmlOptions(HtmlOptions html)
    
public  voidsetIncludeCreateTable(boolean includeCreateTable)
    
public  voidsetKeyColumnsToUse(java.util.List keyColumnsToUse)
     Setter for property keyColumnsToUse.
public  voidsetLineEnding(String ending)
    
public  voidsetOdsOptions(SpreadSheetOptions odsOptions)
    
public  voidsetOptions(ExportOptions options)
    
public  voidsetOutputFilename(String aFilename)
    
public  voidsetOutputTypeHtml()
    
public  voidsetOutputTypeOds()
    
public  voidsetOutputTypeSqlDeleteInsert()
    
public  voidsetOutputTypeSqlInsert()
    
public  voidsetOutputTypeSqlUpdate()
    
public  voidsetOutputTypeText()
    
public  voidsetOutputTypeXls()
    
public  voidsetOutputTypeXlsXML()
    
public  voidsetOutputTypeXml()
    
public  voidsetPageTitle(String aTitle)
    
public  voidsetQuoteAlways(boolean flag)
    
public  voidsetQuoteEscaping(QuoteEscapeType type)
    
public  voidsetReportInterval(int interval)
     Control the progress display in the RowActionMonitor This is used by the WBEXPORT command to turn off the row progress display.
public  voidsetRowMonitor(RowActionMonitor monitor)
    
public  voidsetShowProgressWindow(boolean aFlag)
     Control the display of a progress window.
public  voidsetSpreadsheetOptions(SpreadSheetOptions odsOptions)
    
public  voidsetSql(String aSql)
    
public  voidsetSqlOptions(SqlOptions sqlOptions)
    
public  voidsetTableName(String aTablename)
    
public  voidsetTextDelimiter(String aDelimiter)
    
public  voidsetTextOptions(TextOptions text)
    
public  voidsetTextQuoteChar(String aQuote)
    
public  voidsetTimestampFormat(String aFormat)
    
public  voidsetUseCDATA(boolean flag)
    
public  voidsetUseVerboseFormat(boolean flag)
    
public  voidsetWriteClobAsFile(boolean flag)
    
public  voidsetXlsOptions(SpreadSheetOptions xlsOptions)
    
public  voidsetXlsXOptions(SpreadSheetOptions xlsOptions)
    
public  voidsetXmlOptions(XmlOptions xmlOptions)
    
public  voidsetXsltTransformation(String xsltFileName)
    
public  voidsetXsltTransformationOutput(String aFilename)
    
public  longstartExport()
     Start the export.
public  longstartExport(ResultSet rs)
    
public  longstartExport(DataStore ds)
    
public  voidstartExportJobs(Frame parent)
    

Field Detail
EXPORT_HTML
final public static int EXPORT_HTML(Code)
Export to HTML.



EXPORT_ODS
final public static int EXPORT_ODS(Code)
OpenDocument Spreadsheet



EXPORT_SQL
final public static int EXPORT_SQL(Code)
Export to SQL statements.



EXPORT_TXT
final public static int EXPORT_TXT(Code)
Export to plain text.



EXPORT_XLS
final public static int EXPORT_XLS(Code)
Export XLS



EXPORT_XLSX
final public static int EXPORT_XLSX(Code)
Export XLS XML



EXPORT_XML
final public static int EXPORT_XML(Code)
Export to XML file (WB specific).




Constructor Detail
DataExporter
public DataExporter(WbConnection con)(Code)
Create a DataExporter for the specified connection.
Parameters:
  con - The connection on which this Exporter should work on




Method Detail
addControlFileFormat
public void addControlFileFormat(ControlFileFormat format)(Code)



addControlFileFormats
public void addControlFileFormats(Set<ControlFileFormat> formats)(Code)



addError
public void addError(String msg)(Code)



addTableExportJob
public void addTableExportJob(String anOutputfile, TableIdentifier table) throws SQLException(Code)



addWarning
public void addWarning(String msg)(Code)



cancelExecution
public void cancelExecution()(Code)



clearJobs
public void clearJobs()(Code)



closeProgress
public void closeProgress()(Code)



commitNothing
public void commitNothing()(Code)
Do not write any COMMITs to generated SQL scripts



confirmCancel
public boolean confirmCancel()(Code)



createProgressPanel
protected void createProgressPanel()(Code)



exportTable
public void exportTable(Window aParent, TableIdentifier table)(Code)



getAppendToFile
public boolean getAppendToFile()(Code)



getBlobIdColumns
List<String> getBlobIdColumns()(Code)



getBlobMode
public BlobMode getBlobMode()(Code)
Returns the currently selected mode for BLOB literals. the current type or null, if nothing was selected



getChrFunction
public String getChrFunction()(Code)



getColumnsToExport
public List<ColumnIdentifier> getColumnsToExport()(Code)



getCommitEvery
public int getCommitEvery()(Code)



getCompressOutput
public boolean getCompressOutput()(Code)



getConcatFunction
public String getConcatFunction()(Code)
Getter for property concatFunction. Value of property concatFunction.



getConcatString
public String getConcatString()(Code)



getConnection
public WbConnection getConnection()(Code)



getControlFileFormats
public Set<ControlFileFormat> getControlFileFormats()(Code)



getCreateFullHtmlPage
public boolean getCreateFullHtmlPage()(Code)



getDateFormat
public String getDateFormat()(Code)



getDateFormatter
public SimpleDateFormat getDateFormatter()(Code)



getDateLiteralType
public String getDateLiteralType()(Code)
Return the type of date literals to be created when generating SQL statements. the date literal type
See Also:   workbench.db.exporter.SqlExportWriter.configureConverter
See Also:   workbench.storage.SqlLiteralFormatter



getDecimalFormatter
public DecimalFormat getDecimalFormatter()(Code)



getEncoding
public String getEncoding()(Code)



getErrors
public CharSequence getErrors()(Code)



getEscapeHtml
public boolean getEscapeHtml()(Code)



getEscapeRange
public CharacterRange getEscapeRange()(Code)



getExportHeaders
public boolean getExportHeaders()(Code)



getFilenameColumn
public String getFilenameColumn()(Code)



getFullOutputFilename
public String getFullOutputFilename()(Code)



getKeyColumnsToUse
public List getKeyColumnsToUse()(Code)
Getter for property keyColumnsToUse. Value of property keyColumnsToUse.



getLineEnding
public String getLineEnding()(Code)



getNumberExportedTables
public int getNumberExportedTables()(Code)



getOutputFilename
public String getOutputFilename()(Code)



getPageTitle
public String getPageTitle()(Code)



getQuoteAlways
public boolean getQuoteAlways()(Code)



getQuoteEscaping
public QuoteEscapeType getQuoteEscaping()(Code)



getSql
public String getSql()(Code)



getSqlType
public int getSqlType()(Code)



getTableName
public String getTableName()(Code)



getTextDelimiter
public String getTextDelimiter()(Code)



getTextQuoteChar
public String getTextQuoteChar()(Code)



getTimestampFormat
public String getTimestampFormat()(Code)



getTimestampFormatter
public SimpleDateFormat getTimestampFormatter()(Code)



getTotalRows
public long getTotalRows()(Code)



getTypeDisplay
public String getTypeDisplay()(Code)



getUseCDATA
public boolean getUseCDATA()(Code)



getUseVerboseFormat
public boolean getUseVerboseFormat()(Code)



getWarnings
public CharSequence getWarnings()(Code)



getWriteClobAsFile
public boolean getWriteClobAsFile()(Code)



getXsltTransformation
public String getXsltTransformation()(Code)



getXsltTransformationOutput
public String getXsltTransformationOutput()(Code)



hasError
public boolean hasError()(Code)



hasWarning
public boolean hasWarning()(Code)



isIncludeCreateTable
public boolean isIncludeCreateTable()(Code)



isSuccess
public boolean isSuccess()(Code)



openProgressMonitor
protected void openProgressMonitor(Frame parent)(Code)
Open the progress monitor window.
Parameters:
  parent - the window acting as the parent for the progress monitor



runJobs
public void runJobs()(Code)



selectOutput
public boolean selectOutput(Window parent)(Code)



setAppendToFile
public void setAppendToFile(boolean aFlag)(Code)



setBlobIdColumns
public void setBlobIdColumns(List<String> columns)(Code)
Define the columns whose values should be used for creating the blob files during export These columns must define a unique key!
Parameters:
  columns - the ID columns to be used for the filename generation



setBlobMode
public void setBlobMode(String type)(Code)
Define how blobs should be handled during export. Modes allowed are
  • BLOB_MODE_LITERAL
  • BLOB_MODE_ANSI
  • BLOB_MODE_FILE

Parameters:
  type - the blob mode to be used. null means no special treatment (toString() will be called)
See Also:   DataExporter.BLOB_MODE_LITERAL
See Also:   DataExporter.BLOB_MODE_ANSI
See Also:   DataExporter.BLOB_MODE_FILE



setChrFunction
public void setChrFunction(String aFunc)(Code)



setColumnsToExport
public void setColumnsToExport(List<ColumnIdentifier> columns)(Code)
Define the columns that should be exported This is only respected for the export of a DataStore, not for exporting a ResultSet
Parameters:
  columns - the columns to be exported
See Also:   DataExporter.startExport(workbench.storage.DataStore)



setCommitEvery
public void setCommitEvery(int count)(Code)
Set the number of statements after which to add a commit to generated SQL scripts.
Parameters:
  count - the number of statements after which a COMMIT should be added



setCompressOutput
public void setCompressOutput(boolean flag)(Code)



setConcatFunction
public void setConcatFunction(String func)(Code)
Setter for property concatFunction.
Parameters:
  func - New value of property concatFunction.



setConcatString
public void setConcatString(String aConcatString)(Code)



setContinueOnError
public void setContinueOnError(boolean aFlag)(Code)



setCreateFullHtmlPage
public void setCreateFullHtmlPage(boolean aFlag)(Code)



setCurrentRow
public void setCurrentRow(int currentRow)(Code)



setDateFormat
public void setDateFormat(String aFormat)(Code)



setDateLiteralType
public void setDateLiteralType(String type)(Code)
Define the format for date and timestamp literals when writing SQL statements. Valid values are jdbc,ansi,dbms dbms selects the format approriate for the current dbms. It is the same as passing null
Parameters:
  type - the literal format to use
See Also:   workbench.storage.SqlLiteralFormatter.setProduct(String)



setDecimalSymbol
public void setDecimalSymbol(char aSymbol)(Code)



setDecimalSymbol
public void setDecimalSymbol(String aSymbol)(Code)



setEncoding
public void setEncoding(String enc)(Code)



setEscapeHtml
public void setEscapeHtml(boolean aFlag)(Code)



setEscapeRange
public void setEscapeRange(CharacterRange range)(Code)



setExportAllColumns
public void setExportAllColumns()(Code)



setExportHeaders
public void setExportHeaders(boolean aFlag)(Code)



setFilenameColumn
public void setFilenameColumn(String colname)(Code)



setHtmlOptions
public void setHtmlOptions(HtmlOptions html)(Code)



setIncludeCreateTable
public void setIncludeCreateTable(boolean includeCreateTable)(Code)



setKeyColumnsToUse
public void setKeyColumnsToUse(java.util.List keyColumnsToUse)(Code)
Setter for property keyColumnsToUse.
Parameters:
  keyColumnsToUse - New value of property keyColumnsToUse.



setLineEnding
public void setLineEnding(String ending)(Code)



setOdsOptions
public void setOdsOptions(SpreadSheetOptions odsOptions)(Code)



setOptions
public void setOptions(ExportOptions options)(Code)



setOutputFilename
public void setOutputFilename(String aFilename)(Code)



setOutputTypeHtml
public void setOutputTypeHtml()(Code)



setOutputTypeOds
public void setOutputTypeOds()(Code)



setOutputTypeSqlDeleteInsert
public void setOutputTypeSqlDeleteInsert()(Code)



setOutputTypeSqlInsert
public void setOutputTypeSqlInsert()(Code)



setOutputTypeSqlUpdate
public void setOutputTypeSqlUpdate()(Code)



setOutputTypeText
public void setOutputTypeText()(Code)



setOutputTypeXls
public void setOutputTypeXls()(Code)



setOutputTypeXlsXML
public void setOutputTypeXlsXML()(Code)



setOutputTypeXml
public void setOutputTypeXml()(Code)



setPageTitle
public void setPageTitle(String aTitle)(Code)



setQuoteAlways
public void setQuoteAlways(boolean flag)(Code)



setQuoteEscaping
public void setQuoteEscaping(QuoteEscapeType type)(Code)



setReportInterval
public void setReportInterval(int interval)(Code)
Control the progress display in the RowActionMonitor This is used by the WBEXPORT command to turn off the row progress display. Turning off the display will speed up the export because the GUI does not need to be updated
Parameters:
  interval - the new progress interval



setRowMonitor
public void setRowMonitor(RowActionMonitor monitor)(Code)



setShowProgressWindow
public void setShowProgressWindow(boolean aFlag)(Code)
Control the display of a progress window. This is used from within the DbExplorer. If the application is running in batch mode, this call is ignored.
See Also:   WbManager.isBatchMode
Parameters:
  aFlag - if true, the progress window is displayed



setSpreadsheetOptions
public void setSpreadsheetOptions(SpreadSheetOptions odsOptions)(Code)



setSql
public void setSql(String aSql)(Code)



setSqlOptions
public void setSqlOptions(SqlOptions sqlOptions)(Code)



setTableName
public void setTableName(String aTablename)(Code)



setTextDelimiter
public void setTextDelimiter(String aDelimiter)(Code)



setTextOptions
public void setTextOptions(TextOptions text)(Code)



setTextQuoteChar
public void setTextQuoteChar(String aQuote)(Code)



setTimestampFormat
public void setTimestampFormat(String aFormat)(Code)



setUseCDATA
public void setUseCDATA(boolean flag)(Code)



setUseVerboseFormat
public void setUseVerboseFormat(boolean flag)(Code)



setWriteClobAsFile
public void setWriteClobAsFile(boolean flag)(Code)



setXlsOptions
public void setXlsOptions(SpreadSheetOptions xlsOptions)(Code)



setXlsXOptions
public void setXlsXOptions(SpreadSheetOptions xlsOptions)(Code)



setXmlOptions
public void setXmlOptions(XmlOptions xmlOptions)(Code)



setXsltTransformation
public void setXsltTransformation(String xsltFileName)(Code)



setXsltTransformationOutput
public void setXsltTransformationOutput(String aFilename)(Code)



startExport
public long startExport() throws IOException, SQLException(Code)
Start the export. This will execute the defined query and then write the result into the outputfile the number of rows exported
throws:
  java.io.IOException - if the output file could not be written
throws:
  java.sql.SQLException - if an error occurred during DB access



startExport
public long startExport(ResultSet rs) throws IOException, SQLException, Exception(Code)



startExport
public long startExport(DataStore ds) throws IOException, SQLException, Exception(Code)



startExportJobs
public void startExportJobs(Frame parent)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.