java.lang.Object
org.simpleflatmapper.csv.CsvWriter.CsvWriterDSL<T>
- Type Parameters:
T- the type of object to write
- Direct Known Subclasses:
CsvWriter.DefaultCsvWriterDSL,CsvWriter.NoColumnCsvWriterDSL
the csv writer DSL
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.simpleflatmapper.lightningcsv.CellWriterprotected final org.simpleflatmapper.reflect.meta.ClassMeta<T>protected final CsvWriter.Column[]protected final org.simpleflatmapper.map.mapper.ContextualSourceFieldMapperImpl<T,Appendable> protected final org.simpleflatmapper.map.MapperConfig<CsvColumnKey,?> protected final boolean -
Method Summary
Modifier and TypeMethodDescriptioncellWriter(org.simpleflatmapper.lightningcsv.CellWriter cellWriter) Create a new DSL object identical to the current one but with the specified cellWriter.Create a new DSL object identical to the current one but with the specified classMeta.Create a new DSL object identical to the current one but with the specified property added.Create a new DSL object identical to the current one but with the specified property added.Create a new DSL object identical to the current one but and append the specified columnsescape(char escape) org.simpleflatmapper.map.MapperConfig<CsvColumnKey,?> mapperConfig(org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig) Create a new DSL object identical to the current one but with the specified mapperConfig.protected CsvWriter.CsvWriterDSL<T>newColumnMapDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, CsvWriter.Column[] columns, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, boolean skipHeaders) protected CsvWriter.CsvWriterDSL<T>newCsvWriterDSL(CsvWriter.Column[] columns, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, org.simpleflatmapper.map.mapper.ContextualSourceFieldMapperImpl<T, Appendable> mapper, org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, boolean skipHeaders) protected CsvWriter.CsvWriterDSL<T>newMapDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, CsvWriter.Column[] columns, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, boolean skipHeaders) quote(char quote) separator(char separator) Create a new DSL object identical to the current one except it will not append the headers to the appendable.to(Appendable appendable) Create a writer on the specified appendable for the type T
-
Field Details
-
columns
-
mapper
protected final org.simpleflatmapper.map.mapper.ContextualSourceFieldMapperImpl<T,Appendable> mapper -
cellWriter
protected final org.simpleflatmapper.lightningcsv.CellWriter cellWriter -
classMeta
-
mapperConfig
-
skipHeaders
protected final boolean skipHeaders
-
-
Method Details
-
to
Create a writer on the specified appendable for the type T- Parameters:
appendable- the appendable to write to- Returns:
- a CsvWriter on the specified appendable
- Throws:
IOException- If an I/O error occurs
-
columns
Create a new DSL object identical to the current one but and append the specified columns- Parameters:
columnNames- the list of property names- Returns:
- the new DSL
-
column
Create a new DSL object identical to the current one but with the specified property added.- Parameters:
column- the property nameproperty- the property properties- Returns:
- the new DSL
-
column
Create a new DSL object identical to the current one but with the specified property added.- Parameters:
column- the property nameformat- the property formatter- Returns:
- the new DSL
-
classMeta
public CsvWriter.CsvWriterDSL<T> classMeta(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta) Create a new DSL object identical to the current one but with the specified classMeta.- Parameters:
classMeta- the classMeta- Returns:
- the new DSL
-
mapperConfig
public CsvWriter.CsvWriterDSL<T> mapperConfig(org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig) Create a new DSL object identical to the current one but with the specified mapperConfig.- Parameters:
mapperConfig- the mapperConfig- Returns:
- the new DSL
-
cellWriter
public CsvWriter.CsvWriterDSL<T> cellWriter(org.simpleflatmapper.lightningcsv.CellWriter cellWriter) Create a new DSL object identical to the current one but with the specified cellWriter.- Parameters:
cellWriter- the cellWriter- Returns:
- the new DSL
-
separator
-
quote
-
escape
-
endOfLine
-
alwaysEscape
-
skipHeaders
Create a new DSL object identical to the current one except it will not append the headers to the appendable.- Returns:
- the new DSL
-
mapperConfig
-
newColumnMapDSL
protected CsvWriter.CsvWriterDSL<T> newColumnMapDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, CsvWriter.Column[] columns, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, boolean skipHeaders) -
newMapDSL
protected CsvWriter.CsvWriterDSL<T> newMapDSL(org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, CsvWriter.Column[] columns, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, boolean skipHeaders) -
newCsvWriterDSL
protected CsvWriter.CsvWriterDSL<T> newCsvWriterDSL(CsvWriter.Column[] columns, org.simpleflatmapper.lightningcsv.CellWriter cellWriter, org.simpleflatmapper.map.mapper.ContextualSourceFieldMapperImpl<T, Appendable> mapper, org.simpleflatmapper.reflect.meta.ClassMeta<T> classMeta, org.simpleflatmapper.map.MapperConfig<CsvColumnKey, ?> mapperConfig, boolean skipHeaders)
-