class MultiLineTradeItemWriter implements ItemWriter<Trade>, ItemStream {

	private FlatFileItemWriter<String> delegate;

	@Override
	public void write(Chunk<? extends Trade> items) throws Exception {<FILL_FUNCTION_BODY>}

	public void setDelegate(FlatFileItemWriter<String> delegate) {
		this.delegate = delegate;
	}

	@Override
	public void close() throws ItemStreamException {
		this.delegate.close();
	}

	@Override
	public void open(ExecutionContext executionContext) throws ItemStreamException {
		this.delegate.open(executionContext);
	}

	@Override
	public void update(ExecutionContext executionContext) throws ItemStreamException {
		this.delegate.update(executionContext);
	}

}

		Chunk<String> lines = new Chunk<>();

		for (Trade t : items) {
			lines.add("BEGIN");
			lines.add("INFO," + t.getIsin() + "," + t.getCustomer());
			lines.add("AMNT," + t.getQuantity() + "," + t.getPrice());
			lines.add("END");
		}

		this.delegate.write(lines);
	
<no_super_class>