java/sql-dk/src/info/globalcode/sql/dk/Parameter.java
branchv_0
changeset 4 f5c3350f3d78
parent 1 f32dac78d13a
child 16 5b8fcd35d4d6
equal deleted inserted replaced
3:efdf2b886feb 4:f5c3350f3d78
     1 package info.globalcode.sql.dk;
     1 package info.globalcode.sql.dk;
       
     2 
       
     3 import java.sql.Types;
     2 
     4 
     3 /**
     5 /**
     4  *
     6  *
     5  * @author Ing. František Kučera (frantovo.cz)
     7  * @author Ing. František Kučera (frantovo.cz)
     6  */
     8  */
     7 public class Parameter {
     9 public class Parameter {
     8 
    10 
       
    11 	/**
       
    12 	 * @see Types
       
    13 	 */
       
    14 	public static final int DEFAULT_TYPE = Types.VARCHAR;
     9 	private Object value;
    15 	private Object value;
    10 	private int type;
    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 	}
    11 
    29 
    12 	public Object getValue() {
    30 	public Object getValue() {
    13 		return value;
    31 		return value;
    14 	}
    32 	}
    15 
    33