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
public abstract class AbstractDataWriter extends java.lang.Object implements IDataWriter
An abstract writer-implementation - contains helper getters for all writer parameters
-
-
Field Summary
Fields Modifier and Type Field Description protected int
rowCounter
-
Constructor Summary
Constructors Constructor Description AbstractDataWriter()
AbstractDataWriter
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getColumnsCount()
protected long
getDuration()
protected ISqlGenerator
getGenerator()
protected IRequestOptions
getOptions()
protected org.w3c.dom.Element
getRequestDocRoot()
getRequestDocRootprotected java.sql.ResultSet
getResultSet()
protected java.sql.ResultSetMetaData
getResultSetMetaData()
int
getRowCount()
Number of rows writtenprotected boolean
isEscapeXMLType(int colNo)
isXMLTypeprotected void
setEscapeXMLType(int colNo, boolean isXMLType)
setXMLTypeprotected abstract void
write()
replace the write method from interfacevoid
write(IRequestOptions options, ISqlGenerator generator, java.sql.ResultSet resultSet, long duration)
Write the result-set and (possible) input option-
Methods 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
-
-
-
-
Method Detail
-
write
protected abstract void write() throws java.lang.Exception
replace the write method from interface- Throws:
java.lang.Exception
-
write
public final void write(IRequestOptions options, ISqlGenerator generator, java.sql.ResultSet resultSet, long duration) throws java.lang.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:
java.lang.Exception
- See Also:
IDataWriter.write(de.businesscode.bcdui.wrs.IRequestOptions, de.businesscode.bcdui.wrs.load.ISqlGenerator, java.sql.ResultSet, long)
-
getOptions
protected final IRequestOptions getOptions()
- Returns:
- the options
-
getGenerator
protected final ISqlGenerator getGenerator()
- Returns:
- the generator
-
getResultSet
protected final java.sql.ResultSet 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:
IDataWriter.getColumnsCount()
-
getResultSetMetaData
protected final java.sql.ResultSetMetaData 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
protected final org.w3c.dom.Element getRequestDocRoot()
getRequestDocRoot- Returns:
- the request-doc root
-
-