class ScriptExecutionBuilder {

    public Collection<String> build() {
        final List<String> commands = new ArrayList<String>();
        commands.add(String.format("execute %s", getScriptName()));

        if (!arguments.isEmpty()) {
            final Iterator<Argument> argumentIterator = arguments.iterator();
            commands.add(argumentIterator.next().getCommandLineValue());
            while (argumentIterator.hasNext())
                commands.add("," + argumentIterator.next().getCommandLineValue());
        }

        if (!records.isEmpty()) {
            final Iterator<Entry<String, Record>> iterator = getRecordStructures().entrySet().iterator();
            Entry<String, Record> entry = iterator.next();
            commands.add(String.format("WITH REPLACE(\"%s\", \"%s\")", entry.getKey(),
                    entry.getValue().getName().toUpperCase(Locale.getDefault())));
            while (iterator.hasNext()) {
                entry = iterator.next();
                commands.add(String.format(", REPLACE(\"%s\", \"%s\")", entry.getKey(),
                        entry.getValue().getName().toUpperCase(Locale.getDefault())));
            }
        }

        commands.add("go;" + getScriptName());
        return commands;
    }

    private  ScriptExecutionBuilder(final String scriptName);

}