Package de.businesscode.bcdui.wrs.load
Class AbstractDataWriter
java.lang.Object
de.businesscode.bcdui.wrs.load.AbstractDataWriter
- All Implemented Interfaces:
IDataWriter
- Direct Known Subclasses:
CsvDataWriter
,SylkDataWriter
,VFSDataWriter
,WrsDataWriter
An abstract writer-implementation - contains helper getters for all writer parameters
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
protected final long
protected final ISqlGenerator
protected final IRequestOptions
protected final Element
getRequestDocRootprotected final ResultSet
protected final ResultSetMetaData
int
Number of rows writtenprotected boolean
isEscapeXMLType
(int colNo) isXMLTypeprotected void
setEscapeXMLType
(int colNo, boolean isXMLType) setXMLTypeprotected abstract void
write()
replace the write method from interfacefinal void
write
(IRequestOptions options, ISqlGenerator generator, ResultSet resultSet, long duration) Write the result-set and (possible) input optionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.businesscode.bcdui.wrs.load.IDataWriter
close
-
Field Details
-
rowCounter
protected int rowCounter
-
-
Constructor Details
-
AbstractDataWriter
public AbstractDataWriter()AbstractDataWriter
-
-
Method Details
-
write
replace the write method from interface- Throws:
Exception
-
write
public final void write(IRequestOptions options, ISqlGenerator generator, ResultSet resultSet, long duration) throws Exception Description copied from interface:IDataWriter
Write the result-set and (possible) input option- Specified by:
write
in interfaceIDataWriter
- Parameters:
options
- - the options used for ths requestgenerator
- - the generator used for the requestresultSet
- - data to write out. Can be null if generator was emptyduration
- - the database execution duration in MS- Throws:
Exception
- See Also:
-
getOptions
- Returns:
- the options
-
getGenerator
- Returns:
- the generator
-
getResultSet
- Returns:
- the resultSet
-
getDuration
protected final long getDuration()- Returns:
- the execution duration
-
getRowCount
public int getRowCount()Number of rows written- Specified by:
getRowCount
in interfaceIDataWriter
- Returns:
- The number of rows written with last write
-
getColumnsCount
public final int getColumnsCount()- Specified by:
getColumnsCount
in interfaceIDataWriter
- Returns:
- The number of columns written with last write.
- See Also:
-
getResultSetMetaData
- Returns:
- the resultSetMetaData
-
isEscapeXMLType
protected boolean isEscapeXMLType(int colNo) isXMLType- Parameters:
colNo
-- Returns:
- true if colNo should be XML escaped
-
setEscapeXMLType
protected void setEscapeXMLType(int colNo, boolean isXMLType) setXMLType- Parameters:
colNo
-isXMLType
-
-
getRequestDocRoot
getRequestDocRoot- Returns:
- the request-doc root
-