java/sql-dk/src/info/globalcode/sql/dk/Parameter.java
author František Kučera <franta-hg@frantovo.cz>
Sun, 15 Dec 2013 22:07:51 +0100
branchv_0
changeset 4 f5c3350f3d78
parent 1 f32dac78d13a
child 16 5b8fcd35d4d6
permissions -rw-r--r--
data/types CLI options parsing

package info.globalcode.sql.dk;

import java.sql.Types;

/**
 *
 * @author Ing. František Kučera (frantovo.cz)
 */
public class Parameter {

	/**
	 * @see Types
	 */
	public static final int DEFAULT_TYPE = Types.VARCHAR;
	private Object value;
	private int type;

	public Parameter() {
	}

	public Parameter(Object value, Integer type) {
		this.value = value;
		if (type == null) {
			this.type = DEFAULT_TYPE;
		} else {
			this.type = type;
		}
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	/**
	 * @see java.sql.Types
	 */
	public int getType() {
		return type;
	}

	/**
	 * @see java.sql.Types
	 */
	public void setType(int type) {
		this.type = type;
	}
}