KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > types > ConcatableDataValue


1 /*
2
3    Derby - Class org.apache.derby.iapi.types.ConcatableDataValue
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.types;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 /**
27  * The ConcatableDataValue interface corresponds to the
28  * SQL 92 string value data type. It is implemented by
29  * datatypes that have a length, and can be concatenated.
30  * It is implemented by the character datatypes and the
31  * bit datatypes.
32  *
33  * The following methods are defined herein:
34  * charLength()
35  *
36  * The following is defined by the sub classes (bit and char)
37  * concatenate()
38  *
39  * @author jamie
40  */

41 public interface ConcatableDataValue extends DataValueDescriptor, VariableSizeDataValue
42 {
43
44     /**
45      * The SQL char_length() function.
46      *
47      * @param result The result of a previous call to this method,
48      * null if not called yet.
49      *
50      * @return A NumberDataValue containing the result of the char_length
51      *
52      * @exception StandardException Thrown on error
53      */

54     public NumberDataValue charLength(NumberDataValue result)
55                             throws StandardException;
56
57     /**
58      * substr() function matchs DB2 syntax and behaviour.
59      *
60      * @param start Start of substr
61      * @param length Length of substr
62      * @param result The result of a previous call to this method,
63      * null if not called yet.
64      * @param maxLen Maximum length of the result string
65      *
66      * @return A ConcatableDataValue containing the result of the substr()
67      *
68      * @exception StandardException Thrown on error
69      */

70     public ConcatableDataValue substring(
71                 NumberDataValue start,
72                 NumberDataValue length,
73                 ConcatableDataValue result,
74                 int maxLen)
75         throws StandardException;
76 }
77
Popular Tags