org.etlunit.io.file.OrderedDataFileWriterImpl Maven / Gradle / Ivy
package org.etlunit.io.file;
import java.io.IOException;
import java.util.*;
class OrderedDataFileWriterImpl implements DataFileWriter
{
private final RelationalDataFileWriterImpl writerImpl;
private final DataFileSchema schema;
private final FlatFile flatFile;
private final List names;
public OrderedDataFileWriterImpl(DataFile.DataConverter converter, FlatFile flatFile) throws IOException
{
writerImpl = new RelationalDataFileWriterImpl(converter, flatFile);
schema = flatFile.getDataFileSchema();
names = schema.getColumnNames();
this.flatFile = flatFile;
}
@Override
public void close() throws IOException
{
// run a sort operation on the set, then pass on to the relational writer
Collections.sort(setData, new Comparator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy