KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > h2 > expression > ParameterRemote


1 /*
2  * Copyright 2004-2006 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
3  * Initial Developer: H2 Group
4  */

5 package org.h2.expression;
6
7 import java.sql.SQLException JavaDoc;
8
9 import org.h2.message.Message;
10 import org.h2.value.Value;
11
12 public class ParameterRemote implements ParameterInterface {
13
14     private Value value;
15     private int index;
16     
17     public ParameterRemote(int index) {
18         this.index = index;
19     }
20     
21     public void setValue(Value value) {
22         this.value = value;
23     }
24
25     public Value getParamValue() {
26         return value;
27     }
28     
29     public void checkSet() throws SQLException JavaDoc {
30         if (value == null) {
31             throw Message.getSQLException(Message.PARAMETER_NOT_SET_1, String.valueOf(index + 1));
32         }
33     }
34
35 }
36
Popular Tags