Class CSVWriter
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- org.pentaho.reporting.engine.classic.core.function.AbstractFunction
-
- org.pentaho.reporting.engine.classic.core.modules.output.csv.CSVWriter
-
- All Implemented Interfaces:
Serializable
,Cloneable
,EventListener
,ReportListener
,Expression
,Function
,OutputFunction
public class CSVWriter extends AbstractFunction implements OutputFunction
Deprecated.Will be removed in the future, as PDI is a better CSV generator.The CSV Writer is the content creation function used to create the CSV content. This implementation does no layouting, the DataRow's raw data is written to the supplied writer.- Author:
- Thomas Morgner.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CSVWriter()
Deprecated.DefaulConstructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clearInlineSubreports(SubReportProcessType inlineExecution)
Deprecated.Object
clone()
Deprecated.Clones the expression.boolean
createRollbackInformation()
Deprecated.OutputFunction
deriveForPagebreak()
Deprecated.This method simply clones the function.OutputFunction
deriveForStorage()
Deprecated.This method simply clones the function.int
getDependencyLevel()
Deprecated.The dependency level defines the level of execution for this function.InlineSubreportMarker[]
getInlineSubreports()
Deprecated.String
getSeparator()
Deprecated.Gets the separator which is used to separate columns in a row.Object
getValue()
Deprecated.Return a selfreference of this CSVWriter.Writer
getWriter()
Deprecated.Returns the writer used to output the generated data.void
groupBodyFinished(ReportEvent event)
Deprecated.void
groupFinished(ReportEvent event)
Deprecated.Writes the GroupFooter of the active group.void
groupStarted(ReportEvent event)
Deprecated.Writes the GroupHeader of the current group.boolean
isEnableGroupFooter()
Deprecated.boolean
isEnableGroupHeader()
Deprecated.boolean
isEnableItemband()
Deprecated.boolean
isEnableReportFooter()
Deprecated.boolean
isEnableReportHeader()
Deprecated.boolean
isWriteDataRowNames()
Deprecated.Returns whether to print dataRow column names as header.boolean
isWriteStateColumns()
Deprecated.void
itemsAdvanced(ReportEvent event)
Deprecated.Writes the current ItemBand.void
itemsFinished(ReportEvent event)
Deprecated.Receives notification that a group of item bands has been completed.void
itemsStarted(ReportEvent event)
Deprecated.Receives notification that a group of item bands is about to be processed.void
reportFinished(ReportEvent event)
Deprecated.Writes the ReportFooter.void
reportStarted(ReportEvent event)
Deprecated.Writes the ReportHeader and (if defined) the dataRow names.void
restart(ReportState state)
Deprecated.void
setDependencyLevel(int deplevel)
Deprecated.Overrides the depency level.void
setEnableGroupFooter(boolean enableGroupFooter)
Deprecated.void
setEnableGroupHeader(boolean enableGroupHeader)
Deprecated.void
setEnableItemband(boolean enableItemband)
Deprecated.void
setEnableReportFooter(boolean enableReportFooter)
Deprecated.void
setEnableReportHeader(boolean enableReportHeader)
Deprecated.void
setSeparator(String separator)
Deprecated.Defines the separator, which is used to separate columns in a row.void
setWriteDataRowNames(boolean writeDataRowNames)
Deprecated.Defines, whether to print column names in the first row.void
setWriter(Writer w)
Deprecated.Defines the writer which should be used to output the generated data.void
setWriteStateColumns(boolean writeStateColumns)
Deprecated.-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractFunction
reportDone, reportInitialized, summaryRowSelection
-
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setName, setPreserve, setRuntime
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getDataRow, getInstance, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setName, setRuntime
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.event.ReportListener
reportDone, reportInitialized, summaryRowSelection
-
-
-
-
Method Detail
-
isWriteDataRowNames
public boolean isWriteDataRowNames()
Deprecated.Returns whether to print dataRow column names as header.- Returns:
- true, if column names are printed, false otherwise.
-
setWriteDataRowNames
public void setWriteDataRowNames(boolean writeDataRowNames)
Deprecated.Defines, whether to print column names in the first row.- Parameters:
writeDataRowNames
- true, if column names are printed, false otherwise
-
isWriteStateColumns
public boolean isWriteStateColumns()
Deprecated.
-
setWriteStateColumns
public void setWriteStateColumns(boolean writeStateColumns)
Deprecated.
-
isEnableGroupFooter
public boolean isEnableGroupFooter()
Deprecated.
-
setEnableGroupFooter
public void setEnableGroupFooter(boolean enableGroupFooter)
Deprecated.
-
isEnableGroupHeader
public boolean isEnableGroupHeader()
Deprecated.
-
setEnableGroupHeader
public void setEnableGroupHeader(boolean enableGroupHeader)
Deprecated.
-
isEnableItemband
public boolean isEnableItemband()
Deprecated.
-
setEnableItemband
public void setEnableItemband(boolean enableItemband)
Deprecated.
-
isEnableReportFooter
public boolean isEnableReportFooter()
Deprecated.
-
setEnableReportFooter
public void setEnableReportFooter(boolean enableReportFooter)
Deprecated.
-
isEnableReportHeader
public boolean isEnableReportHeader()
Deprecated.
-
setEnableReportHeader
public void setEnableReportHeader(boolean enableReportHeader)
Deprecated.
-
getWriter
public Writer getWriter()
Deprecated.Returns the writer used to output the generated data.- Returns:
- the writer
-
setWriter
public void setWriter(Writer w)
Deprecated.Defines the writer which should be used to output the generated data.- Parameters:
w
- the writer
-
setSeparator
public void setSeparator(String separator)
Deprecated.Defines the separator, which is used to separate columns in a row.- Parameters:
separator
- the separator string, never null.- Throws:
NullPointerException
- if the separator is null.IllegalArgumentException
- if the separator is an empty string.
-
getSeparator
public String getSeparator()
Deprecated.Gets the separator which is used to separate columns in a row.- Returns:
- the separator, never null.
-
reportStarted
public void reportStarted(ReportEvent event)
Deprecated.Writes the ReportHeader and (if defined) the dataRow names.- Specified by:
reportStarted
in interfaceReportListener
- Overrides:
reportStarted
in classAbstractFunction
- Parameters:
event
- the event.
-
reportFinished
public void reportFinished(ReportEvent event)
Deprecated.Writes the ReportFooter.- Specified by:
reportFinished
in interfaceReportListener
- Overrides:
reportFinished
in classAbstractFunction
- Parameters:
event
- the event.
-
groupStarted
public void groupStarted(ReportEvent event)
Deprecated.Writes the GroupHeader of the current group.- Specified by:
groupStarted
in interfaceReportListener
- Overrides:
groupStarted
in classAbstractFunction
- Parameters:
event
- the event.
-
groupFinished
public void groupFinished(ReportEvent event)
Deprecated.Writes the GroupFooter of the active group.- Specified by:
groupFinished
in interfaceReportListener
- Overrides:
groupFinished
in classAbstractFunction
- Parameters:
event
- the event.
-
itemsStarted
public void itemsStarted(ReportEvent event)
Deprecated.Receives notification that a group of item bands is about to be processed.The next events will be itemsAdvanced events until the itemsFinished event is raised.
- Specified by:
itemsStarted
in interfaceReportListener
- Overrides:
itemsStarted
in classAbstractFunction
- Parameters:
event
- The event.
-
itemsFinished
public void itemsFinished(ReportEvent event)
Deprecated.Receives notification that a group of item bands has been completed.The itemBand is finished, the report starts to close open groups.
- Specified by:
itemsFinished
in interfaceReportListener
- Overrides:
itemsFinished
in classAbstractFunction
- Parameters:
event
- The event.
-
itemsAdvanced
public void itemsAdvanced(ReportEvent event)
Deprecated.Writes the current ItemBand.- Specified by:
itemsAdvanced
in interfaceReportListener
- Overrides:
itemsAdvanced
in classAbstractFunction
- Parameters:
event
- the event.
-
getValue
public Object getValue()
Deprecated.Return a selfreference of this CSVWriter. This selfreference is used to confiugre the output process.- Specified by:
getValue
in interfaceExpression
- Returns:
- this CSVWriter.
-
getDependencyLevel
public int getDependencyLevel()
Deprecated.The dependency level defines the level of execution for this function. Higher dependency functions are executed before lower dependency functions. For ordinary functions and expressions, the range for dependencies is defined to start from 0 (lowest dependency possible) to 2^31 (upper limit of int). PageLayouter functions override the default behaviour an place them self at depency level -1, an so before any user defined function.- Specified by:
getDependencyLevel
in interfaceExpression
- Overrides:
getDependencyLevel
in classAbstractExpression
- Returns:
- the level.
-
setDependencyLevel
public void setDependencyLevel(int deplevel)
Deprecated.Overrides the depency level. Should be lower than any other function depency.- Specified by:
setDependencyLevel
in interfaceExpression
- Overrides:
setDependencyLevel
in classAbstractExpression
- Parameters:
deplevel
- the new depency level.
-
deriveForStorage
public OutputFunction deriveForStorage()
Deprecated.This method simply clones the function. The CSVWriter does not maintain large internal states and therefore need not to be aware of any advanced optimizations.- Specified by:
deriveForStorage
in interfaceOutputFunction
- Returns:
- the derived function.
-
deriveForPagebreak
public OutputFunction deriveForPagebreak()
Deprecated.This method simply clones the function. The CSVWriter does not maintain large internal states and therefore need not to be aware of any advanced optimizations.- Specified by:
deriveForPagebreak
in interfaceOutputFunction
- Returns:
- the derived function.
-
clone
public Object clone() throws CloneNotSupportedException
Deprecated.Clones the expression. The expression should be reinitialized after the cloning.Expressions maintain no state, cloning is done at the beginning of the report processing to disconnect the expression from any other object space.
- Specified by:
clone
in interfaceExpression
- Overrides:
clone
in classAbstractExpression
- Returns:
- a clone of this expression.
- Throws:
CloneNotSupportedException
- this should never happen.
-
getInlineSubreports
public InlineSubreportMarker[] getInlineSubreports()
Deprecated.- Specified by:
getInlineSubreports
in interfaceOutputFunction
-
clearInlineSubreports
public void clearInlineSubreports(SubReportProcessType inlineExecution)
Deprecated.- Specified by:
clearInlineSubreports
in interfaceOutputFunction
-
groupBodyFinished
public void groupBodyFinished(ReportEvent event)
Deprecated.- Specified by:
groupBodyFinished
in interfaceOutputFunction
-
restart
public void restart(ReportState state)
Deprecated.- Specified by:
restart
in interfaceOutputFunction
-
createRollbackInformation
public boolean createRollbackInformation()
Deprecated.- Specified by:
createRollbackInformation
in interfaceOutputFunction
-
-