All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rtdi.hanaappserver.utils.InstallerStatement Maven / Gradle / Ivy

There is a newer version: 0.8.7
Show newest version
package io.rtdi.hanaappserver.utils;

public class InstallerStatement {
	private InstallType type;
	private InstallObject installobject;
	private InstallErrorBehavior errorbehavior;
	private String sql;
	
	public InstallerStatement(InstallType type, InstallObject installobject, InstallErrorBehavior errorbehavior, String sql) {
		this.type = type;
		this.installobject = installobject;
		this.errorbehavior = errorbehavior;
		this.sql = sql;
	}
	
	public InstallType getType() {
		return type;
	}
	public InstallObject getInstallObject() {
		if (installobject == null) {
			return InstallObject.NO_OBJECT;
		} else {
			return installobject;
		}
	}
	public InstallErrorBehavior getErrorbehavior() {
		return errorbehavior;
	}
	public String getSql() {
		return sql;
	}

	@Override
	public String toString() {
		String conditiontext = "";
		if (installobject != null) {
			switch (installobject.getCondition()) {
			case IFEXISTS:
				conditiontext = "IF EXISTS ";
				break;
			case IFNOTEXISTS:
				conditiontext = "IF NOT EXISTS ";
				break;
			default:
				break;
			}
		}
		return conditiontext + sql;
	}

	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy