A restartable T:Summer.Batch.Item.ItemWriterthat writes to a T:Summer.Batch.IO.IResource. A T:LineAggregator is used to write lines from items. More...
Public Member Functions | |
FlatFileItemWriter () | |
Default constructor More... | |
void | AfterPropertiesSet () |
override void | Write (IList< T > items) |
Writes items to the target resource. More... | |
override void | Open (ExecutionContext executionContext) |
Open the stream for the provided ExecutionContext. More... | |
override void | Close () |
If any resources are needed for the stream to operate they need to be destroyed here. Once this method has been called all other methods (except open) may throw an exception. More... | |
override void | Update (ExecutionContext executionContext) |
Indicates that the execution context provided during open is about to be saved. If any state is remaining, but has not been put in the context, it should be added here. More... | |
override void | Flush () |
Flushes the underlying stream. More... | |
Public Member Functions inherited from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport | |
string | GetExecutionContextKey (string key) |
Transform the given key to use the name of this instance as prefix. More... | |
virtual void | Dispose () |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Implements IDisposable. More... | |
Properties | |
IResource | Resource [set] |
The T:Summer.Batch.IO.IResource to write to. More... | |
ILineAggregator< T > | LineAggregator [set] |
The T:LineAggregator that transforms an item into a line. More... | |
IHeaderWriter | HeaderWriter [set] |
The T:HeaderWriter to use. Can be null if there are no header to write. More... | |
IFooterWriter | FooterWriter [set] |
The T:FooterWriter to use. Can be null if there are no footer to write. More... | |
string | LineSeparator [set] |
The line separator to use. Default is P:System.Environment.NewLine. More... | |
bool | AppendAllowed [set] |
Indicates that the target resource should be appended if it already exists. Default is false . More... | |
bool | DeleteIfExists [set] |
Indicates that the target resource should be deleted if it exists. Ignored if P:AppendAllowed is true . Default is false . More... | |
bool | DeleteIfEmpty [set] |
Indicates that the target resource should be deleted if no lines were written. Default is false . More... | |
Encoding | Encoding [set] |
The encoding to use to write to the resource. Default is P:System.Text.Encoding.Default. More... | |
bool | Transactional [set] |
Indicates that the writer should take part in the active transaction. During a transaction, data are written at commit. Defaults is true . More... | |
bool | AutoFlush [set] |
Indicates that the buffer should be flushed after each write Default is false . More... | |
bool | SaveState [set] |
Indicates that the state of the item writer should be savec in the execution context when M:Update is called. More... | |
Properties inherited from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport | |
string | Name [set] |
The name of the component that will be used as prefix for keys in the execution context. More... | |
Properties inherited from Summer.Batch.Infrastructure.Item.File.IResourceAwareItemWriterItemStream< T > | |
IResource | Resource [set] |
The T:Summer.Batch.Common.IO.IResource to write to. More... | |
Detailed Description
A restartable T:Summer.Batch.Item.ItemWriterthat writes to a T:Summer.Batch.IO.IResource. A T:LineAggregator is used to write lines from items.
- Template Parameters
-
T
- Type Constraints
-
T : class
Constructor & Destructor Documentation
Default constructor
Member Function Documentation
void Summer.Batch.Infrastructure.Item.File.FlatFileItemWriter< T >.AfterPropertiesSet | ( | ) |
- See also
- IInitializationPostOperations::AfterPropertiesSet
Implements Summer.Batch.Common.Factory.IInitializationPostOperations.
|
virtual |
If any resources are needed for the stream to operate they need to be destroyed here. Once this method has been called all other methods (except open) may throw an exception.
- Exceptions
-
ItemStreamException
Reimplemented from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport.
|
protectedvirtual |
Implements IDisposable.
- Parameters
-
disposing
Reimplemented from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport.
|
virtual |
Flushes the underlying stream.
Reimplemented from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport.
|
virtual |
Open the stream for the provided ExecutionContext.
- Parameters
-
executionContext current step's ExecutionContext. Will be the executionContext from the last run of the step on a restart.
- Exceptions
-
ItemStreamException ArgumentException if execution context is null
Reimplemented from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport.
|
virtual |
Indicates that the execution context provided during open is about to be saved. If any state is remaining, but has not been put in the context, it should be added here.
- Parameters
-
executionContext to be updated
- Exceptions
-
ItemStreamException ArgumentException if execution context is null
Reimplemented from Summer.Batch.Infrastructure.Item.Util.ItemStreamSupport.
|
virtual |
Writes items to the target resource.
- Parameters
-
items an enumerable containing the items to write
Implements Summer.Batch.Infrastructure.Item.Support.AbstractItemStreamItemWriter< T >.
Property Documentation
|
set |
Indicates that the target resource should be appended if it already exists. Default is false
.
|
set |
Indicates that the buffer should be flushed after each write Default is false
.
|
set |
Indicates that the target resource should be deleted if no lines were written. Default is false
.
|
set |
Indicates that the target resource should be deleted if it exists. Ignored if P:AppendAllowed is true
. Default is false
.
|
set |
The encoding to use to write to the resource. Default is P:System.Text.Encoding.Default.
|
set |
The T:FooterWriter to use. Can be null if there are no footer to write.
|
set |
The T:HeaderWriter to use. Can be null if there are no header to write.
|
set |
The T:LineAggregator that transforms an item into a line.
|
set |
The line separator to use. Default is P:System.Environment.NewLine.
|
set |
The T:Summer.Batch.IO.IResource to write to.
|
set |
Indicates that the state of the item writer should be savec in the execution context when M:Update is called.
|
set |
Indicates that the writer should take part in the active transaction. During a transaction, data are written at commit. Defaults is true
.
The documentation for this class was generated from the following file:
- Summer.Batch.Infrastructure/Item/File/FlatFileItemWriter.cs