java/sql-dk/src/info/globalcode/sql/dk/Parameter.java
branchv_0
changeset 4 f5c3350f3d78
parent 1 f32dac78d13a
child 16 5b8fcd35d4d6
--- a/java/sql-dk/src/info/globalcode/sql/dk/Parameter.java	Sun Dec 15 20:25:15 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/Parameter.java	Sun Dec 15 22:07:51 2013 +0100
@@ -1,14 +1,32 @@
 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;
 	}