Source Code Cross Referenced for NumberDataValue.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » types » 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.iapi.types 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.iapi.types.NumberDataValue
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.iapi.types;
023:
024:        import org.apache.derby.iapi.error.StandardException;
025:
026:        public interface NumberDataValue extends DataValueDescriptor {
027:            /**
028:             * The minimum scale when dividing Decimals
029:             */
030:            public static final int MIN_DECIMAL_DIVIDE_SCALE = 4;
031:            public static final int MAX_DECIMAL_PRECISION_SCALE = 31;
032:
033:            /**
034:             * The SQL + operator.
035:             *
036:             * @param addend1	One of the addends
037:             * @param addend2	The other addend
038:             * @param result	The result of the previous call to this method, null
039:             *					if not called yet.
040:             *
041:             * @return	The sum of the two addends
042:             *
043:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
044:             */
045:            public NumberDataValue plus(NumberDataValue addend1,
046:                    NumberDataValue addend2, NumberDataValue result)
047:                    throws StandardException;
048:
049:            /**
050:             * The SQL - operator.
051:             *
052:             * @param left		The left operand
053:             * @param right		The right operand
054:             * @param result	The result of the previous call to this method, null
055:             *					if not called yet.
056:             *
057:             * @return	left - right
058:             *
059:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
060:             */
061:            public NumberDataValue minus(NumberDataValue left,
062:                    NumberDataValue right, NumberDataValue result)
063:                    throws StandardException;
064:
065:            /**
066:             * The SQL * operator.
067:             *
068:             * @param left		The left operand
069:             * @param right		The right operand
070:             * @param result	The result of the previous call to this method, null
071:             *					if not called yet.
072:             *
073:             * @return	left * right
074:             *
075:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
076:             */
077:            public NumberDataValue times(NumberDataValue left,
078:                    NumberDataValue right, NumberDataValue result)
079:                    throws StandardException;
080:
081:            /**
082:             * The SQL / operator.
083:             *
084:             * @param dividend		The numerator
085:             * @param divisor		The denominator
086:             * @param result		The result of the previous call to this method, null
087:             *						if not called yet.
088:             *
089:             * @return	dividend / divisor
090:             *
091:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
092:             */
093:            public NumberDataValue divide(NumberDataValue dividend,
094:                    NumberDataValue divisor, NumberDataValue result)
095:                    throws StandardException;
096:
097:            /**
098:             * The SQL / operator.
099:             *
100:             * @param dividend		The numerator
101:             * @param divisor		The denominator
102:             * @param result		The result of the previous call to this method, null
103:             *						if not called yet.
104:             * @param scale			The scale of the result, for decimal type.  If pass
105:             *						in value < 0, can calculate it dynamically.
106:             *
107:             * @return	dividend / divisor
108:             *
109:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
110:             */
111:            public NumberDataValue divide(NumberDataValue dividend,
112:                    NumberDataValue divisor, NumberDataValue result, int scale)
113:                    throws StandardException;
114:
115:            /**
116:             * The SQL mod operator.
117:             *
118:             * @param dividend		The numerator
119:             * @param divisor		The denominator
120:             * @param result		The result of the previous call to this method, null
121:             *						if not called yet.
122:             *
123:             * @return	dividend / divisor
124:             *
125:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
126:             */
127:            public NumberDataValue mod(NumberDataValue dividend,
128:                    NumberDataValue divisor, NumberDataValue result)
129:                    throws StandardException;
130:
131:            /**
132:             * The SQL unary - operator.  Negates this NumberDataValue.
133:             *
134:             * @param result	The result of the previous call to this method, null
135:             *					if not called yet.
136:             *
137:             * @return	- operand
138:             *
139:             * @exception StandardException		Thrown on error, if result is non-null then its value will be unchanged.
140:             */
141:            public NumberDataValue minus(NumberDataValue result)
142:                    throws StandardException;
143:
144:            /**
145:             * The SQL ABSOLUTE operator.  Absolute value of this NumberDataValue.
146:             *
147:             * @param result    The result of the previous call to this method, null
148:             *                  if not called yet.
149:             *
150:             * @exception StandardException     Thrown on error, if result is non-null then its value will be unchanged.
151:             */
152:            public NumberDataValue absolute(NumberDataValue result)
153:                    throws StandardException;
154:
155:            /**
156:             * The SQL SQRT operator.  Sqrt value of this NumberDataValue.
157:             *
158:             * @param result    The result of the previous call to this method, null
159:             *                  if not call yet.
160:             * 
161:             * @exception StandardException     Thrown on error (a negative number), if result is non-null then its value will be unchanged.
162:             */
163:            public NumberDataValue sqrt(NumberDataValue result)
164:                    throws StandardException;
165:
166:            /**
167:             * Set the value of this NumberDataValue to the given value.
168:               This is only intended to be called when mapping values from
169:               the Java space into the SQL space, e.g. parameters and return
170:               types from procedures and functions. Each specific type is only
171:               expected to handle the explicit type according the JDBC.
172:               <UL>
173:               <LI> SMALLINT from java.lang.Integer
174:               <LI> INTEGER from java.lang.Integer
175:               <LI> LONG from java.lang.Long
176:               <LI> FLOAT from java.lang.Float
177:               <LI> DOUBLE from java.lang.Double
178:               <LI> DECIMAL from java.math.BigDecimal
179:               </UL>
180:             *
181:             * @param theValue	An Number containing the value to set this
182:             *					NumberDataValue to.  Null means set the value
183:             *					to SQL null.
184:             *
185:             */
186:            public void setValue(Number theValue) throws StandardException;
187:
188:            /**
189:            	Return the SQL precision of this specific DECIMAL value.
190:            	This does not match the return from BigDecimal.precision()
191:            	added in J2SE 5.0, which represents the precision of the unscaled value.
192:            	If the value does not represent a SQL DECIMAL then
193:            	the return is undefined.
194:             */
195:            public int getDecimalValuePrecision();
196:
197:            /**
198:            	Return the SQL scale of this specific DECIMAL value.
199:            	This does not match the return from BigDecimal.scale()
200:            	since in J2SE 5.0 onwards that can return negative scales.
201:            	If the value does not represent a SQL DECIMAL then
202:            	the return is undefined.
203:             */
204:            public int getDecimalValueScale();
205:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.