KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jorm > naming > api > PNCStringCoder


1 /**
2  * JORM: an implementation of a generic mapping system for persistent Java
3  * objects. Two mapping are supported: to RDBMS and to binary files.
4  * Copyright (C) 2001-2003 France Telecom R&D - INRIA
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * Contact: jorm-team@objectweb.org
21  *
22  */

23
24 package org.objectweb.jorm.naming.api;
25
26 import java.util.Date JavaDoc;
27 import java.math.BigDecimal JavaDoc;
28 import java.math.BigInteger JavaDoc;
29
30 /**
31  * Used to encode/decode a composite name to/from a String. For the decode
32  * process, there are the typed getter methods (XXX getXXX()). It supposes that
33  * the coder knows the String representing the encoded value. For the encode
34  * process, there are the setter methods (putXXX(XXX val)) in order to add
35  * new sub values to the encoded String. After all putXXX has been done, the
36  * encoded value is retrieved using the getStringCode method.
37  * @author P. D?chamboux
38  */

39 public interface PNCStringCoder {
40     byte getByte() throws PExceptionNameCoding;
41
42     Byte JavaDoc getObyte() throws PExceptionNameCoding;
43
44     char getChar() throws PExceptionNameCoding;
45
46     Character JavaDoc getOchar() throws PExceptionNameCoding;
47
48     short getShort() throws PExceptionNameCoding;
49
50     Short JavaDoc getOshort() throws PExceptionNameCoding;
51
52     int getInt() throws PExceptionNameCoding;
53
54     Integer JavaDoc getOint() throws PExceptionNameCoding;
55
56     long getLong() throws PExceptionNameCoding;
57
58     Long JavaDoc getOlong() throws PExceptionNameCoding;
59
60     String JavaDoc getString() throws PExceptionNameCoding;
61
62     Date JavaDoc getDate() throws PExceptionNameCoding;
63
64     BigInteger JavaDoc getBigInteger() throws PExceptionNameCoding;
65
66     BigDecimal JavaDoc getBigDecimal() throws PExceptionNameCoding;
67
68     byte[] getByteArray() throws PExceptionNameCoding;
69
70     char[] getCharArray() throws PExceptionNameCoding;
71
72     void putByte(byte val) throws PExceptionNameCoding;
73
74     void putObyte(Byte JavaDoc val) throws PExceptionNameCoding;
75
76     void putChar(char val) throws PExceptionNameCoding;
77
78     void putOchar(Character JavaDoc val) throws PExceptionNameCoding;
79
80     void putShort(short val) throws PExceptionNameCoding;
81
82     void putOshort(Short JavaDoc val) throws PExceptionNameCoding;
83
84     void putInt(int val) throws PExceptionNameCoding;
85
86     void putOint(Integer JavaDoc val) throws PExceptionNameCoding;
87
88     void putLong(long val) throws PExceptionNameCoding;
89
90     void putOlong(Long JavaDoc val) throws PExceptionNameCoding;
91
92     void putString(String JavaDoc val) throws PExceptionNameCoding;
93
94     void putDate(Date JavaDoc val) throws PExceptionNameCoding;
95
96     void putBigInteger(BigInteger JavaDoc val) throws PExceptionNameCoding;
97
98     void putBigDecimal(BigDecimal JavaDoc val) throws PExceptionNameCoding;
99
100     void putByteArray(byte[] val) throws PExceptionNameCoding;
101
102     void putCharArray(char[] val) throws PExceptionNameCoding;
103
104     String JavaDoc getStringCode() throws PExceptionNameCoding;
105 }
106
Popular Tags