/*
 * $Id: VKCSysParameter.java,v 1.8 2007/08/01 14:56:52 marbobo Exp $
 *
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 *
 * $Log: VKCSysParameter.java,v $
 * Revision 1.8  2007/08/01 14:56:52  marbobo
 * + WebDav-Logging implementiert
 * - Sessionbegrenzung wird nicht mehr auf WebDav angewendet
 *
 * Revision 1.7  2004/05/11 19:08:15  marbobo
 * + Internationalisierung der Systemparameter
 *
 * Revision 1.6  2004/03/09 18:40:37  bigmac
 * Anpassungen an VKCSysParameterSerializer
 *
 * Revision 1.5  2003/09/09 13:22:18  jonyp
 * datatype added
 *
 * Revision 1.4  2003/09/08 12:09:54  jonyp
 * different changes
 *
 *
 */
package vkc.db.entities;

import java.io.Serializable;


/**
 * Class represents information about sysparameters
 * <p>
 * @author JonyP
 */
public final class VKCSysParameter implements Serializable {

    public static int STRING = 0;
    public static int INTEGER = 1;
    public static int BOOLEAN = 2;
        
    private Integer sysParameterId = new Integer(-1);
	private String  context = null;
	private String  contextKey = null;
    private String  name = null;
	private String  nameKey = null;
    private String  valuestring = null;
    private String  description = null;
	private String  descrKey = null;
    private Integer sortRank = null;
    private boolean readOnly = true;
    private Integer hide = null;
    private boolean allowNull = false;
    private Integer datatype = null;

    public VKCSysParameter() {
    }

	public Integer getSysParameterId() {
		return sysParameterId;
	}

	public String getContext() {
		return context;
	}

	public String getName() {
			return name;
	}

	public String getValuestring() {
			return valuestring;
	}

    public String getDescription() {
        return description;
    }

    public boolean isReadOnly() {
        return readOnly;
    }

    public Integer getHide() {
        return hide;
    }

	public boolean getAllowNull() {
		return allowNull;
	}

	public void setSysParameterId(Integer id) {
		sysParameterId = id;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValuestring(String valuestring) {
			this.valuestring = valuestring;
	}

    public void setDescription(String string) {
        description = string;
    }
  
    public void setReadOnly(boolean b) {
        readOnly = b;
    }

	public void setHide(Integer hide) {
		this.hide = hide;
	}
	
	public void setAllowNull(boolean b) {
		allowNull = b;
	}
	
	public Integer getDatatype() {
		return datatype;
	}
	
	public void setDatatype(Integer integer) {
		datatype = integer;
	}
	
	public boolean isBooleanType() {
		return datatype.intValue() == BOOLEAN;
	}

	public boolean isStringType() {
		return datatype.intValue() == STRING;
	}

	public boolean isIntegerType() {
		return datatype.intValue() == INTEGER;
	}

	public String getContextKey() {
		return contextKey;
	}

	public String getDescrKey() {
		return descrKey;
	}

	public String getNameKey() {
		return nameKey;
	}

	public void setContextKey(String string) {
		contextKey = string;
	}

	public void setDescrKey(String string) {
		descrKey = string;
	}

	public void setNameKey(String string) {
		nameKey = string;
	}

    public final Integer getSortRank() {
        return sortRank;
    }
    public final void setSortRank(Integer sortRank) {
        this.sortRank = sortRank;
    }
}