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
     1 package info.globalcode.sql.dk;
     2 
     3 import java.sql.Types;
     4 
     5 /**
     6  *
     7  * @author Ing. František Kučera (frantovo.cz)
     8  */
     9 public class Parameter {
    10 
    11 	/**
    12 	 * @see Types
    13 	 */
    14 	public static final int DEFAULT_TYPE = Types.VARCHAR;
    15 	private Object value;
    16 	private int type;
    17 
    18 	public Parameter() {
    19 	}
    20 
    21 	public Parameter(Object value, Integer type) {
    22 		this.value = value;
    23 		if (type == null) {
    24 			this.type = DEFAULT_TYPE;
    25 		} else {
    26 			this.type = type;
    27 		}
    28 	}
    29 
    30 	public Object getValue() {
    31 		return value;
    32 	}
    33 
    34 	public void setValue(Object value) {
    35 		this.value = value;
    36 	}
    37 
    38 	/**
    39 	 * @see java.sql.Types
    40 	 */
    41 	public int getType() {
    42 		return type;
    43 	}
    44 
    45 	/**
    46 	 * @see java.sql.Types
    47 	 */
    48 	public void setType(int type) {
    49 		this.type = type;
    50 	}
    51 }