File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\expression\ParameterInterface.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.expression;
8
9 import org.h2.message.DbException;
10 import org.h2.value.Value;
11
12 /**
13 * The interface for client side (remote) and server side parameters.
14 */
15 public interface ParameterInterface {
16
17 /**
18 * Set the value of the parameter.
19 *
20 * @param value the new value
21 * @param closeOld if the old value (if one is set) should be closed
22 */
23 void setValue(Value value, boolean closeOld);
24
25 /**
26 * Get the value of the parameter if set.
27 *
28 * @return the value or null
29 */
30 Value getParamValue();
31
32 /**
33 * Check if the value is set.
34 *
35 * @throws DbException if not set.
36 */
37 void checkSet() throws DbException;
38
39 /**
40 * Is the value of a parameter set.
41 *
42 * @return true if set
43 */
44 boolean isValueSet();
45
46 /**
47 * Get the expected data type of the parameter if no value is set, or the
48 * data type of the value if one is set.
49 *
50 * @return the data type
51 */
52 int getType();
53
54 /**
55 * Get the expected precision of this parameter.
56 *
57 * @return the expected precision
58 */
59 long getPrecision();
60
61 /**
62 * Get the expected scale of this parameter.
63 *
64 * @return the expected scale
65 */
66 int getScale();
67
68 /**
69 * Check if this column is nullable.
70 *
71 * @return Column.NULLABLE_*
72 */
73 int getNullable();
74
75 }
76