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 intprotected final longprotected final ISqlGeneratorprotected final IRequestOptionsprotected final ElementgetRequestDocRootprotected final ResultSetprotected final ResultSetMetaDataintNumber of rows writtenprotected booleanisEscapeXMLType(int colNo) isXMLTypeprotected voidsetEscapeXMLType(int colNo, boolean isXMLType) setXMLTypeprotected abstract voidwrite()replace the write method from interfacefinal voidwrite(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, waitMethods 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:IDataWriterWrite the result-set and (possible) input option- Specified by:
writein 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:
getRowCountin interfaceIDataWriter- Returns:
- The number of rows written with last write
-
getColumnsCount
public final int getColumnsCount()- Specified by:
getColumnsCountin 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
-