Java Doc for DataValueDescriptor.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 Reference  Class Diagram Java Document (Java Doc) 


org.apache.derby.iapi.types.DataValueDescriptor

All known Subclasses:   org.apache.derby.iapi.types.DataType,
DataValueDescriptor
public interface DataValueDescriptor extends Storable,Orderable(Code)
The DataValueDescriptor interface provides methods to get the data from a column returned by a statement. This interface has the same methods as NoCastDataValueDescriptor - the only reason it exists is for purposes of internal documentation, to make it clear when the different getXXX methods throw exceptions for illegal conversions.

This interface matches the getXXX methods on java.sql.ResultSet. This means everyone satisfies getString and getObject; all of the numeric types, within the limits of representation, satisfy all of the numeric getXXX methods; all of the character types satisfy all of the getXXX methods except getBytes and getBinaryStream; all of the binary types satisfy getBytes and all of the getXXXStream methods; Date satisfies getDate and getTimestamp; Time satisfies getTime; and Timestamp satisfies all of the date/time getXXX methods. The "preferred" method (one that will always work, I presume) is the one that matches the type most closely. See the comments below for "preferences". See the JDBC guide for details.

This interface does not include the getXXXStream methods.

The preferred methods for JDBC are:

CHAR and VARCHAR - getString()

BIT - getBoolean()

TINYINT - getByte()

SMALLINT - getShort()

INTEGER - getInt()

BIGINT - getLong()

REAL - getFloat()

FLOAT and DOUBLE - getDouble()

DECIMAL and NUMERIC - getBigDecimal()

BINARY and VARBINARY - getBytes()

DATE - getDate()

TIME - getTime()

TIMESTAMP - getTimestamp()

No JDBC type corresponds to getObject(). Use this for user-defined types or to get the JDBC types as java Objects. All primitive types will be wrapped in their corresponding Object type, i.e. int will be wrapped in an Integer.

getStream()
author:
   Jeff Lichtman





Method Summary
public  voidcheckHostVariable(int declaredLength)
     Check the value to seem if it conforms to the restrictions imposed by DB2/JCC on host variables for this type.
public  DataValueDescriptorcoalesce(DataValueDescriptor[] list, DataValueDescriptor returnValue)
     The SQL language COALESCE/VALUE function.
 intcompare(DataValueDescriptor other)
     Compare this Orderable with a given Orderable for the purpose of index positioning.
 booleancompare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV)
     Compare this Orderable with a given Orderable for the purpose of qualification and sorting.
public  BooleanDataValueequals(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language = operator.
 intestimateMemoryUsage()
     Estimate the memory usage in bytes of the data value and the overhead of the class.
 booleangetBoolean()
     Gets the value in the data value descriptor as a boolean.
 bytegetByte()
     Gets the value in the data value descriptor as a byte.
 byte[]getBytes()
     Gets the value in the data value descriptor as a byte array.
public  DataValueDescriptorgetClone()
     Clone this DataValueDescriptor.
 DategetDate(java.util.Calendar cal)
     Gets the value in the data value descriptor as a java.sql.Date.
 doublegetDouble()
     Gets the value in the data value descriptor as a double.
 floatgetFloat()
     Gets the value in the data value descriptor as a float.
 intgetInt()
     Gets the value in the data value descriptor as an int.
 intgetLength()
     Gets the length of the data value.
 longgetLong()
     Gets the value in the data value descriptor as a long.
public  DataValueDescriptorgetNewNull()
     Get a new null value of the same type as this data value.
 ObjectgetObject()
     Gets the value in the data value descriptor as a Java Object. The type of the Object will be the Java object type corresponding to the data value's SQL type.
 shortgetShort()
     Gets the value in the data value descriptor as a short.
 InputStreamgetStream()
     Gets the value in the data value descriptor as a Java InputStream.
 StringgetString()
     Gets the value in the data value descriptor as a String.
 TimegetTime(java.util.Calendar cal)
     Gets the value in the data value descriptor as a java.sql.Time.
 TimestampgetTimestamp(java.util.Calendar cal)
     Gets the value in the data value descriptor as a java.sql.Timestamp.
 StringgetTraceString()
     Gets the value in the data value descriptor as a trace string. If the value itself is not suitable for tracing purposes, a more suitable representation is returned.
public  StringgetTypeName()
    
public  BooleanDataValuegreaterOrEquals(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language >= operator.
public  BooleanDataValuegreaterThan(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language > operator.
public  BooleanDataValuein(DataValueDescriptor left, DataValueDescriptor[] inList, boolean orderedList)
     The SQL language IN operator.
public  BooleanDataValueisNotNull()
     The SQL "IS NOT NULL" operator.
public  BooleanDataValueisNullOp()
     The SQL "IS NULL" operator.
public  BooleanDataValuelessOrEquals(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language <= operator.
public  BooleanDataValuelessThan(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language < operator.
public  voidnormalize(DataTypeDescriptor dtd, DataValueDescriptor source)
     Normalize the source value to this type described by this class and the passed in DataTypeDescriptor.
public  BooleanDataValuenotEquals(DataValueDescriptor left, DataValueDescriptor right)
     The SQL language <> operator.
public  voidreadExternalFromArray(ArrayInputStream ais)
     Read the DataValueDescriptor from the stream.

Initialize the data value by reading it's values from the ArrayInputStream.

public  voidsetBigDecimal(Number bigDecimal)
     Set this value from an application supplied java.math.BigDecimal. This is to support the PreparedStatement.setBigDecimal method and similar JDBC methods that allow an application to pass in a BigDecimal to any SQL type. Parameter is declared as java.lang.Number to allow compilation under J2ME/CDC/Foundation.
public  voidsetInto(PreparedStatement ps, int position)
     Set this value into a PreparedStatement.
public  voidsetInto(ResultSet rs, int position)
     Set this value into a ResultSet for a subsequent ResultSet.insertRow or ResultSet.updateRow.
public  voidsetObjectForCast(Object value, boolean instanceOfResultType, String resultTypeClassName)
     Set this value from an Object.
 voidsetToNull()
     Set the value to SQL null.
public  voidsetValue(int theValue)
    
public  voidsetValue(double theValue)
    
public  voidsetValue(float theValue)
     Set the value of this DataValueDescriptor to the given double value
Parameters:
  theValue - A Double containing the value to set thisDataValueDescriptor to.
public  voidsetValue(short theValue)
    
public  voidsetValue(long theValue)
    
public  voidsetValue(byte theValue)
    
public  voidsetValue(boolean theValue)
     Set the value.
public  voidsetValue(byte[] theValue)
     Set the value of this DataValueDescriptor.
public  voidsetValue(String theValue)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Time theValue)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Time theValue, Calendar cal)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Timestamp theValue)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Timestamp theValue, Calendar cal)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Date theValue)
     Set the value of this DataValueDescriptor.
public  voidsetValue(Date theValue, Calendar cal)
     Set the value of this DataValueDescriptor.
public  voidsetValue(DataValueDescriptor theValue)
     Set the value of this DataValueDescriptor from another.
public  voidsetValue(InputStream theStream, int valueLength)
     Set the value to be the contents of the stream. The reading of the stream may be delayed until execution time. The format of the stream is required to be the format of this type.
Parameters:
  theStream - stream of correctly formatted data
Parameters:
  valueLength - logical length of the stream's value in units of this type (e.g.
public  voidsetValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable)
     Set the value based on the value for the specified DataValueDescriptor from the specified ResultSet.
 inttypePrecedence()
     Each built-in type in JSQL has a precedence.
 inttypeToBigDecimal()
     How should this value be obtained so that it can be converted to a BigDecimal representation.



Method Detail
checkHostVariable
public void checkHostVariable(int declaredLength) throws StandardException(Code)
Check the value to seem if it conforms to the restrictions imposed by DB2/JCC on host variables for this type.
exception:
  StandardException - Variable is too big.



coalesce
public DataValueDescriptor coalesce(DataValueDescriptor[] list, DataValueDescriptor returnValue) throws StandardException(Code)
The SQL language COALESCE/VALUE function. This method is called from the language module.
Parameters:
  list - The list of the arguments. Function will return the first non-nullable argument if any.
Parameters:
  returnValue - The return value is the correct datatype for this function.The return value of this method is the type of the 2nd parameter. A DataValueDescriptor which will be either null or first non-null argument
exception:
  StandardException - Thrown on error



compare
int compare(DataValueDescriptor other) throws StandardException(Code)
Compare this Orderable with a given Orderable for the purpose of index positioning. This method treats nulls as ordered values - that is, it treats SQL null as equal to null and less than all other values.
Parameters:
  other - The Orderable to compare this one to. <0 - this Orderable is less than other.0 - this Orderable equals other.>0 - this Orderable is greater than other.The code should not explicitly look for -1, or 1.
exception:
  StandardException - Thrown on error



compare
boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)
Compare this Orderable with a given Orderable for the purpose of qualification and sorting. The caller gets to determine how nulls should be treated - they can either be ordered values or unknown values.
Parameters:
  op - Orderable.ORDER_OP_EQUALS means do an = comparison.Orderable.ORDER_OP_LESSTHAN means compare this < other.Orderable.ORDER_OP_LESSOREQUALS means compare this <= other.
Parameters:
  other - The DataValueDescriptor to compare this one to.
Parameters:
  orderedNulls - True means to treat nulls as ordered values,that is, treat SQL null as equal to null, and lessthan all other values.False means to treat nulls as unknown values,that is, the result of any comparison with a nullis the UNKNOWN truth value.
Parameters:
  unknownRV - The return value to use if the result of thecomparison is the UNKNOWN truth value. In otherwords, if orderedNulls is false, and a null isinvolved in the comparison, return unknownRV.This parameter is not used orderedNulls is true. true if the comparison is true (duh!)
exception:
  StandardException - Thrown on error



equals
public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language = operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



estimateMemoryUsage
int estimateMemoryUsage()(Code)
Estimate the memory usage in bytes of the data value and the overhead of the class. the estimated memory usage



getBoolean
boolean getBoolean() throws StandardException(Code)
Gets the value in the data value descriptor as a boolean. Throws an exception if the data value is not a boolean. For DataValueDescriptor, this is the preferred interface for BIT, but for this no-casting interface, it isn't, because BIT is stored internally as a Bit, not as a Boolean. The data value as a boolean.
exception:
  StandardException - Thrown on error



getByte
byte getByte() throws StandardException(Code)
Gets the value in the data value descriptor as a byte. Throws an exception if the data value is not a byte. The data value as a byte.
exception:
  StandardException - Thrown on error



getBytes
byte[] getBytes() throws StandardException(Code)
Gets the value in the data value descriptor as a byte array. Throws an exception if the data value is not a byte array. The data value as a byte[].
exception:
  StandardException - Thrown on error



getClone
public DataValueDescriptor getClone()(Code)
Clone this DataValueDescriptor. Results in a new object that has the same value as this but can be modified independently. A clone of the DataValueDescriptor with the same initial value as this.



getDate
Date getDate(java.util.Calendar cal) throws StandardException(Code)
Gets the value in the data value descriptor as a java.sql.Date. Throws an exception if the data value is not a Date.
Parameters:
  cal - calendar for object creation The data value as a java.sql.Date.
exception:
  StandardException - Thrown on error



getDouble
double getDouble() throws StandardException(Code)
Gets the value in the data value descriptor as a double. Throws an exception if the data value is not a double. The data value as a double.
exception:
  StandardException - Thrown on error



getFloat
float getFloat() throws StandardException(Code)
Gets the value in the data value descriptor as a float. Throws an exception if the data value is not a float. The data value as a float.
exception:
  StandardException - Thrown on error



getInt
int getInt() throws StandardException(Code)
Gets the value in the data value descriptor as an int. Throws an exception if the data value is not an int. The data value as a int.
exception:
  StandardException - Thrown on error



getLength
int getLength() throws StandardException(Code)
Gets the length of the data value. The meaning of this is implementation-dependent. For string types, it is the number of characters in the string. For numeric types, it is the number of bytes used to store the number. This is the actual length of this value, not the length of the type it was defined as. For example, a VARCHAR value may be shorter than the declared VARCHAR (maximum) length. The length of the data value
exception:
  StandardException - On error



getLong
long getLong() throws StandardException(Code)
Gets the value in the data value descriptor as a long. Throws an exception if the data value is not a long. The data value as a long.
exception:
  StandardException - Thrown on error



getNewNull
public DataValueDescriptor getNewNull()(Code)
Get a new null value of the same type as this data value.



getObject
Object getObject() throws StandardException(Code)
Gets the value in the data value descriptor as a Java Object. The type of the Object will be the Java object type corresponding to the data value's SQL type. JDBC defines a mapping between Java object types and SQL types - we will allow that to be extended through user type definitions. Throws an exception if the data value is not an object (yeah, right). The data value as an Object.
exception:
  StandardException - Thrown on error



getShort
short getShort() throws StandardException(Code)
Gets the value in the data value descriptor as a short. Throws an exception if the data value is not a short. The data value as a short.
exception:
  StandardException - Thrown on error



getStream
InputStream getStream() throws StandardException(Code)
Gets the value in the data value descriptor as a Java InputStream. Only data types that implements StreamStorable will have stream states. The stream state of the data value.
exception:
  StandardException - Throws an exception if the data valuecannot be received as a stream.



getString
String getString() throws StandardException(Code)
Gets the value in the data value descriptor as a String. Throws an exception if the data value is not a string. The data value as a String.
exception:
  StandardException - Thrown on error



getTime
Time getTime(java.util.Calendar cal) throws StandardException(Code)
Gets the value in the data value descriptor as a java.sql.Time. Throws an exception if the data value is not a Time.
Parameters:
  cal - calendar for object creation The data value as a java.sql.Time.
exception:
  StandardException - Thrown on error



getTimestamp
Timestamp getTimestamp(java.util.Calendar cal) throws StandardException(Code)
Gets the value in the data value descriptor as a java.sql.Timestamp. Throws an exception if the data value is not a Timestamp.
Parameters:
  cal - calendar for object creation The data value as a java.sql.Timestamp.
exception:
  StandardException - Thrown on error



getTraceString
String getTraceString() throws StandardException(Code)
Gets the value in the data value descriptor as a trace string. If the value itself is not suitable for tracing purposes, a more suitable representation is returned. For instance, data values represented as streams are not materialized. Instead, information about the associated stream is given.



getTypeName
public String getTypeName()(Code)
Get the SQL name of the datatype The SQL name of the datatype



greaterOrEquals
public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language >= operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



greaterThan
public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language > operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



in
public BooleanDataValue in(DataValueDescriptor left, DataValueDescriptor[] inList, boolean orderedList) throws StandardException(Code)
The SQL language IN operator. This method is called from the language module. This method allows us to optimize and short circuit the search if the list is ordered.
Parameters:
  left - The value on the left side of the operator
Parameters:
  inList - The values in the IN list
Parameters:
  orderedList - True means that the values in the IN list are ordered,false means they are not. A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



isNotNull
public BooleanDataValue isNotNull()(Code)
The SQL "IS NOT NULL" operator. Returns true if this value is not null. True if this value is not null.



isNullOp
public BooleanDataValue isNullOp()(Code)
The SQL "IS NULL" operator. Returns true if this value is null. True if this value is null.



lessOrEquals
public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language <= operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



lessThan
public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language < operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



normalize
public void normalize(DataTypeDescriptor dtd, DataValueDescriptor source) throws StandardException(Code)
Normalize the source value to this type described by this class and the passed in DataTypeDescriptor. The type of the DataTypeDescriptor must match this class.



notEquals
public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The SQL language <> operator. This method is called from the language module. The storage module uses the compare method in Orderable.
Parameters:
  left - The value on the left side of the operator
Parameters:
  right - The value on the right side of the operator A BooleanDataValue telling the result of the comparison
exception:
  StandardException - Thrown on error



readExternalFromArray
public void readExternalFromArray(ArrayInputStream ais) throws IOException, ClassNotFoundException(Code)
Read the DataValueDescriptor from the stream.

Initialize the data value by reading it's values from the ArrayInputStream. This interface is provided as a way to achieve possible performance enhancement when reading an array can be optimized over reading from a generic stream from readExternal().
Parameters:
  ais - The array stream positioned at the beginning of the byte stream to read from.
exception:
  IOException - Usual error is if you try to read past limit on the stream.
exception:
  ClassNotFoundException - If a necessary class can not be found while reading the object fromthe stream.




setBigDecimal
public void setBigDecimal(Number bigDecimal) throws StandardException(Code)
Set this value from an application supplied java.math.BigDecimal. This is to support the PreparedStatement.setBigDecimal method and similar JDBC methods that allow an application to pass in a BigDecimal to any SQL type. Parameter is declared as java.lang.Number to allow compilation under J2ME/CDC/Foundation. This method will not be called in any environment that does not support java.math.BigDecimal.
Parameters:
  bigDecimal - required to be a BigDecimal or null.



setInto
public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException(Code)
Set this value into a PreparedStatement. This method must handle setting NULL into the PreparedStatement.
exception:
  SQLException - thrown by the PreparedStatement object
exception:
  StandardException - thrown by me accessing my value.



setInto
public void setInto(ResultSet rs, int position) throws SQLException, StandardException(Code)
Set this value into a ResultSet for a subsequent ResultSet.insertRow or ResultSet.updateRow. This method will only be called for non-null values.
exception:
  SQLException - thrown by the ResultSet object
exception:
  StandardException - thrown by me accessing my value.



setObjectForCast
public void setObjectForCast(Object value, boolean instanceOfResultType, String resultTypeClassName) throws StandardException(Code)
Set this value from an Object. Used from CAST of a Java type to another type, including SQL types. If the passed instanceOfResultType is false then the object is not an instance of the declared type resultTypeClassName. Usually an exception should be thrown.
Parameters:
  value - The new value
Parameters:
  instanceOfResultType - Whether or not the new value is an instanceof the result type.
Parameters:
  resultTypeClassName - The class name of the resulting (declared) type (for error messages only).
exception:
  StandardException - Thrown on error



setToNull
void setToNull()(Code)
Set the value to SQL null.



setValue
public void setValue(int theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given int value
Parameters:
  theValue - The value to set this DataValueDescriptor to
exception:
  StandardException - Thrown on error



setValue
public void setValue(double theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given double value
Parameters:
  theValue - The value to set this DataValueDescriptor to
exception:
  StandardException - Thrown on error



setValue
public void setValue(float theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given double value
Parameters:
  theValue - A Double containing the value to set thisDataValueDescriptor to. Null means set the valueto SQL null.
exception:
  StandardException - Thrown on error



setValue
public void setValue(short theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given short value
Parameters:
  theValue - The value to set this DataValueDescriptor to
exception:
  StandardException - Thrown on error



setValue
public void setValue(long theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given long value
Parameters:
  theValue - The value to set this DataValueDescriptor to
exception:
  StandardException - Thrown on error



setValue
public void setValue(byte theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor to the given byte value
Parameters:
  theValue - The value to set this DataValueDescriptor to



setValue
public void setValue(boolean theValue) throws StandardException(Code)
Set the value.
Parameters:
  theValue - Contains the boolean value to set this to



setValue
public void setValue(byte[] theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The byte value to set this DataValueDescriptor to



setValue
public void setValue(String theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The String value to set this DataValueDescriptor to



setValue
public void setValue(Time theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Time value to set this DataValueDescriptor to



setValue
public void setValue(Time theValue, Calendar cal) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Time value to set this DataValueDescriptor to
Parameters:
  cal - The time zone from the calendar is used to construct the database time value



setValue
public void setValue(Timestamp theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Timestamp value to set this DataValueDescriptor to



setValue
public void setValue(Timestamp theValue, Calendar cal) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Timestamp value to set this DataValueDescriptor to
Parameters:
  cal - The time zone from the calendar is used to construct the database timestamp value



setValue
public void setValue(Date theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Date value to set this DataValueDescriptor to



setValue
public void setValue(Date theValue, Calendar cal) throws StandardException(Code)
Set the value of this DataValueDescriptor.
Parameters:
  theValue - The Date value to set this DataValueDescriptor to
Parameters:
  cal - The time zone from the calendar is used to construct the database date value



setValue
public void setValue(DataValueDescriptor theValue) throws StandardException(Code)
Set the value of this DataValueDescriptor from another.
Parameters:
  theValue - The Date value to set this DataValueDescriptor to



setValue
public void setValue(InputStream theStream, int valueLength) throws StandardException(Code)
Set the value to be the contents of the stream. The reading of the stream may be delayed until execution time. The format of the stream is required to be the format of this type.
Parameters:
  theStream - stream of correctly formatted data
Parameters:
  valueLength - logical length of the stream's value in units of this type (e.g. chars for string types).



setValueFromResultSet
public void setValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable) throws StandardException, SQLException(Code)
Set the value based on the value for the specified DataValueDescriptor from the specified ResultSet.
Parameters:
  resultSet - The specified ResultSet.
Parameters:
  colNumber - The 1-based column # into the resultSet.
Parameters:
  isNullable - Whether or not the column is nullable(No need to call wasNull() if not)
exception:
  StandardException - Thrown on error
exception:
  SQLException - Error accessing the result set



typePrecedence
int typePrecedence()(Code)
Each built-in type in JSQL has a precedence. This precedence determines how to do type promotion when using binary operators. For example, float has a higher precedence than int, so when adding an int to a float, the result type is float. The precedence for some types is arbitrary. For example, it doesn't matter what the precedence of the boolean type is, since it can't be mixed with other types. But the precedence for the number types is critical. The SQL standard requires that exact numeric types be promoted to approximate numeric when one operator uses both. Also, the precedence is arranged so that one will not lose precision when promoting a type. The precedence of this type.



typeToBigDecimal
int typeToBigDecimal() throws StandardException(Code)
How should this value be obtained so that it can be converted to a BigDecimal representation. Types.CHAR for String conversion through getStringTypes.DECIMAL for BigDecimal through getObject or Types.BIGINTfor long conversion through getLong
exception:
  StandardException - Conversion is not possible



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.