package de.superx.job; import java.io.File; public class UnloadAction extends ActionNode { public String sql; public String unlFile; public String dataSource; public String sqlVarSource; public String sourceVersions; public String databaseSystem; public UnloadAction(String id, String sql, String unlFile, String dataSource, String sqlVarSource, Integer systemInfoId, String sourceVersions) { super(makeName(id, unlFile, dataSource), null, systemInfoId, true, ActionType.UNLOAD); this.sql = sql; this.unlFile = unlFile; this.dataSource = dataSource; this.sqlVarSource = sqlVarSource; this.sourceVersions = sourceVersions; } public UnloadAction(String id, String sql, String unlFile, String dataSource, String sqlVarSource, Integer systemInfoId, String sourceVersions, String databaseSystem) { this(id, sql, unlFile, dataSource, sqlVarSource, systemInfoId, sourceVersions); this.databaseSystem = databaseSystem; } public UnloadAction() { super(); } private static String makeName(String id, String unlFile, String dataSource) { String name = "Unload " + id + " " + unlFile.substring(unlFile.lastIndexOf(File.separatorChar) + 1); if (dataSource != null && !dataSource.isEmpty()) { name += " (" + dataSource + ")"; } return name; } }