Source Code Cross Referenced for GenericConglomerate.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » store » access » conglomerate » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.store.access.conglomerate 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.impl.store.access.conglomerate.GenericConglomerate
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to you under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:
022:        package org.apache.derby.impl.store.access.conglomerate;
023:
024:        import org.apache.derby.iapi.reference.SQLState;
025:
026:        import org.apache.derby.iapi.services.sanity.SanityManager;
027:
028:        import org.apache.derby.iapi.error.StandardException;
029:
030:        import org.apache.derby.iapi.store.access.conglomerate.Conglomerate;
031:
032:        import org.apache.derby.iapi.types.DataValueDescriptor;
033:        import org.apache.derby.iapi.types.Orderable;
034:
035:        import org.apache.derby.iapi.types.DataType;
036:
037:        import java.sql.ResultSet;
038:        import java.sql.SQLException;
039:
040:        /**
041:
042:         A class that implements the methods shared across all implementations of
043:         the Conglomerate interface.
044:
045:         **/
046:
047:        public abstract class GenericConglomerate extends DataType implements 
048:                Conglomerate {
049:
050:            /**************************************************************************
051:             * Public Methods implementing DataValueDescriptor interface.
052:             **************************************************************************
053:             */
054:
055:            /**
056:             * Gets the length of the data value.  The meaning of this is
057:             * implementation-dependent.  For string types, it is the number of
058:             * characters in the string.  For numeric types, it is the number of
059:             * bytes used to store the number.  This is the actual length
060:             * of this value, not the length of the type it was defined as.
061:             * For example, a VARCHAR value may be shorter than the declared
062:             * VARCHAR (maximum) length.
063:             *
064:             * @return	The length of the data value
065:             *
066:             * @exception StandardException   On error
067:             * 
068:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getLength
069:             */
070:            public int getLength() throws StandardException {
071:                throw (StandardException
072:                        .newException(SQLState.HEAP_UNIMPLEMENTED_FEATURE));
073:            }
074:
075:            /**
076:             * Gets the value in the data value descriptor as a String.
077:             * Throws an exception if the data value is not a string.
078:             *
079:             * @return	The data value as a String.
080:             *
081:             * @exception StandardException   Thrown on error
082:             *
083:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getString
084:             */
085:            public String getString() throws StandardException {
086:                throw (StandardException
087:                        .newException(SQLState.HEAP_UNIMPLEMENTED_FEATURE));
088:            }
089:
090:            /**
091:             * Gets the value in the data value descriptor as a Java Object.
092:             * The type of the Object will be the Java object type corresponding
093:             * to the data value's SQL type. JDBC defines a mapping between Java
094:             * object types and SQL types - we will allow that to be extended
095:             * through user type definitions. Throws an exception if the data
096:             * value is not an object (yeah, right).
097:             *
098:             * @return	The data value as an Object.
099:             *
100:             * @exception StandardException   Thrown on error
101:             *
102:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getObject
103:             */
104:            public Object getObject() throws StandardException {
105:                return (this );
106:            }
107:
108:            /**
109:             * <U>Shallow copy</U>. 
110:             * <p> 
111:             * Clone the DataValueDescriptor and copy its contents.
112:             * We clone the data value wrapper (e.g. SQLDecimal)
113:             * and reuse its contents (the underlying BigDecimal).
114:             * The resultant DataValueDescriptor will point to the same
115:             * value as the original DataValueDescriptor (unless the value
116:             * is a primitive type, e.g. SQLInteger/integer).
117:             *
118:             * @return A clone of the DataValueDescriptor reusing its contents.
119:             *
120:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getClone
121:             */
122:            public DataValueDescriptor getClone() {
123:                if (SanityManager.DEBUG)
124:                    SanityManager.THROWASSERT("Not implemented!.");
125:
126:                return (null);
127:            }
128:
129:            /**
130:             * Get a new null value of the same type as this data value.
131:             *
132:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getNewNull
133:             */
134:            public DataValueDescriptor getNewNull() {
135:                if (SanityManager.DEBUG)
136:                    SanityManager.THROWASSERT("Not implemented!.");
137:
138:                return (null);
139:            }
140:
141:            /**
142:             * Set the value based on the value for the specified DataValueDescriptor
143:             * from the specified ResultSet.
144:             *
145:             * @param resultSet		The specified ResultSet.
146:             * @param colNumber		The 1-based column # into the resultSet.
147:             * @param isNullable	Whether or not the column is nullable
148:             *						(No need to call wasNull() if not)
149:             * 
150:             * @exception StandardException		Thrown on error
151:             * @exception SQLException		Error accessing the result set
152:             *
153:             * @see org.apache.derby.iapi.types.DataValueDescriptor#setValueFromResultSet
154:             */
155:            public void setValueFromResultSet(ResultSet resultSet,
156:                    int colNumber, boolean isNullable)
157:                    throws StandardException, SQLException {
158:                throw (StandardException
159:                        .newException(SQLState.HEAP_UNIMPLEMENTED_FEATURE));
160:            }
161:
162:            /**
163:             * Set the value of this DataValueDescriptor from another.
164:             *
165:             * @param theValue	The Date value to set this DataValueDescriptor to
166:             *
167:             * @see org.apache.derby.iapi.types.DataValueDescriptor#setValue
168:             */
169:            protected void setFrom(DataValueDescriptor theValue)
170:                    throws StandardException {
171:                throw (StandardException
172:                        .newException(SQLState.HEAP_UNIMPLEMENTED_FEATURE));
173:            }
174:
175:            /**
176:             * Get the SQL name of the datatype
177:             *
178:             * @return	The SQL name of the datatype
179:             *
180:             * @see org.apache.derby.iapi.types.DataValueDescriptor#getTypeName
181:             */
182:            public String getTypeName() {
183:                if (SanityManager.DEBUG)
184:                    SanityManager.THROWASSERT("Not implemented!.");
185:
186:                return (null);
187:            }
188:
189:            /**
190:             * Compare this Orderable with a given Orderable for the purpose of
191:             * index positioning.  This method treats nulls as ordered values -
192:             * that is, it treats SQL null as equal to null and less than all
193:             * other values.
194:             *
195:             * @param other		The Orderable to compare this one to.
196:             *
197:             * @return  <0 - this Orderable is less than other.
198:             * 			 0 - this Orderable equals other.
199:             *			>0 - this Orderable is greater than other.
200:             *
201:             *			The code should not explicitly look for -1, or 1.
202:             *
203:             * @exception StandardException		Thrown on error
204:             *
205:             * @see DataValueDescriptor#compare
206:             */
207:            public int compare(DataValueDescriptor other)
208:                    throws StandardException {
209:                throw (StandardException
210:                        .newException(SQLState.HEAP_UNIMPLEMENTED_FEATURE));
211:            }
212:        }
ww__w.__ja_v_a2__s_.com_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.