KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > common > protocol > PreparedStatementSerializationConstants


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Emmanuel Cecchet.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.common.protocol;
23
24 /**
25  * This class contains the data used to serialize PreparedStatement.
26  *
27  * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet</a>
28  * @version 1.0
29  */

30 public final class PreparedStatementSerializationConstants
31 {
32   /** @see java.sql.PreparedStatement#setByte(int, byte) */
33   public static final String JavaDoc BYTE_TAG = "b|";
34   /** @see java.sql.PreparedStatement#setBytes(int, byte[]) */
35   public static final String JavaDoc BYTES_TAG = "B|";
36   /** @see java.sql.PreparedStatement#setBlob(int, java.sql.Blob) */
37   public static final String JavaDoc BLOB_TAG = "c|";
38   /** @see java.sql.PreparedStatement#setClob(int, java.sql.Clob) */
39   public static final String JavaDoc CLOB_TAG = "C|";
40   /** @see java.sql.PreparedStatement#setBoolean(int, boolean) */
41   public static final String JavaDoc BOOLEAN_TAG = "0|";
42   /**
43    * @see java.sql.PreparedStatement#setBigDecimal(int, java.math.BigDecimal)
44    */

45   public static final String JavaDoc BIG_DECIMAL_TAG = "1|";
46   /** @see java.sql.PreparedStatement#setDate(int, java.sql.Date) */
47   public static final String JavaDoc DATE_TAG = "d|";
48   /** @see java.sql.PreparedStatement#setDouble(int, double) */
49   public static final String JavaDoc DOUBLE_TAG = "D|";
50   /** @see java.sql.PreparedStatement#setFloat(int, float) */
51   public static final String JavaDoc FLOAT_TAG = "F|";
52   /** @see java.sql.PreparedStatement#setInt(int, int) */
53   public static final String JavaDoc INTEGER_TAG = "I|";
54   /** @see java.sql.PreparedStatement#setLong(int, long) */
55   public static final String JavaDoc LONG_TAG = "L|";
56   /** Encoding of a named parameter in a CallableStatement */
57   public static final String JavaDoc NAMED_PARAMETER_TAG = "P|";
58   /** Encoding of a NULL value. Also used to as the _TAG for setNull() */
59   public static final String JavaDoc NULL_VALUE = "N|";
60   /**
61    * Special escape _type_ tag used when the string parameter is unfortunately
62    * equal to an encoded null value.
63    */

64   public static final String JavaDoc NULL_STRING_TAG = "n|";
65   /**
66    * @see java.sql.PreparedStatement#setObject(int, java.lang.Object)
67    */

68   public static final String JavaDoc OBJECT_TAG = "O|";
69   /** @see java.sql.PreparedStatement#setRef(int, java.sql.Ref) */
70   public static final String JavaDoc REF_TAG = "R|";
71   /** @see java.sql.PreparedStatement#setShort(int, short) */
72   public static final String JavaDoc SHORT_TAG = "s|";
73   /**
74    * @see java.sql.PreparedStatement#setString(int, java.lang.String)
75    */

76   public static final String JavaDoc STRING_TAG = "S|";
77   /** @see java.sql.PreparedStatement#setTime(int, java.sql.Time) */
78   public static final String JavaDoc TIME_TAG = "t|";
79   /**
80    * @see java.sql.PreparedStatement#setTimestamp(int, java.sql.Timestamp)
81    */

82   public static final String JavaDoc TIMESTAMP_TAG = "T|";
83   /** @see java.sql.PreparedStatement#setURL(int, java.net.URL) */
84   public static final String JavaDoc URL_TAG = "U|";
85   /** Escape for callable statement out parameter */
86   public static final String JavaDoc REGISTER_OUT_PARAMETER = "o|";
87   /** Escape for callable statement out parameter with scale */
88   public static final String JavaDoc REGISTER_OUT_PARAMETER_WITH_SCALE = "w|";
89   /** Escape for callable statement out parameter with type name */
90   public static final String JavaDoc REGISTER_OUT_PARAMETER_WITH_NAME = "W|";
91   /**
92    * Escape for 'void' placeholder when compiling callable statement OUT or
93    * named parameter
94    */

95   public static final String JavaDoc CS_PARAM_TAG = "V|";
96   /** Tag maker for parameters */
97   public static final String JavaDoc TAG_MARKER = "!%";
98   /** Escape for tag maker */
99   public static final String JavaDoc TAG_MARKER_ESCAPE = TAG_MARKER
100                                                                    + ";";
101   /** Tag for parameters start delimiter */
102   public static final String JavaDoc START_PARAM_TAG = "<"
103                                                                    + TAG_MARKER;
104   /** Tag for parameters end delimiter */
105   public static final String JavaDoc END_PARAM_TAG = "|"
106                                                                    + TAG_MARKER
107                                                                    + ">";
108 }
Popular Tags