Java Doc for SQLChar.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) 


java.lang.Object
   org.apache.derby.iapi.types.DataType
      org.apache.derby.iapi.types.SQLChar

All known Subclasses:   org.apache.derby.iapi.types.SQLNationalChar,  org.apache.derby.iapi.types.SQLVarchar,
SQLChar
public class SQLChar extends DataType implements StringDataValue,StreamStorable(Code)
SQLChar satisfies the DataValueDescriptor interfaces (i.e., OrderableDataType). It implements an String holder, e.g. for storing a column value; it can be specified when constructed to not allow nulls. Nullability cannot be changed after construction.

Because OrderableDataType is a subclass of DataType, SQLChar can play a role in either a DataType/ValueRow or a OrderableDataType/KeyRow, interchangeably.



Field Summary
final protected static  intRETURN_SPACE_THRESHOLD
    
 char[][]arg_passer
    
 InputStreamstream
     The value as a stream in the on-disk format.

Constructor Summary
public  SQLChar()
     no-arg constructor, required by Formattable.
public  SQLChar(String val)
    

Method Summary
public  NumberDataValuecharLength(NumberDataValue result)
     This method implements the char_length function for char.
public  ObjectcloneObject()
     From CloneableObject Shallow clone a StreamStorable without objectifying.
public  booleancompare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV)
    
public  intcompare(DataValueDescriptor other)
    
public  StringDataValueconcatenate(StringDataValue leftOperand, StringDataValue rightOperand, StringDataValue result)
    
protected  voidcopyState(SQLChar other)
    
public  BooleanDataValueequals(DataValueDescriptor left, DataValueDescriptor right)
     The = operator as called from the language module, as opposed to the storage module.
public  intestimateMemoryUsage()
    
public  booleangetBoolean()
    
public  bytegetByte()
    
public  char[]getCharArray()
     Get a char array.
public  DataValueDescriptorgetClone()
    
protected  CollationKeygetCollationKey()
    
public  DategetDate(Calendar cal)
    
public static  DategetDate(java.util.Calendar cal, String str, LocaleFinder localeFinder)
    
protected  DateFormatgetDateFormat()
    
protected  DateFormatgetDateFormat(Calendar cal)
    
public  doublegetDouble()
    
public  floatgetFloat()
    
public  intgetInt()
    
public  intgetLength()
    
protected  LocaleFindergetLocaleFinder()
    
public  longgetLong()
    
public  DataValueDescriptorgetNewNull()
    
protected  StringDataValuegetNewVarchar()
     Get a SQLVarchar for a built-in string function.
public  ObjectgetObject()
    
public  shortgetShort()
    
public  InputStreamgetStream()
    
public  StringgetString()
     If possible, use getCharArray() if you don't really need a string.
public  TimegetTime(Calendar cal)
    
public static  TimegetTime(Calendar cal, String str, LocaleFinder localeFinder)
    
protected  DateFormatgetTimeFormat()
    
protected  DateFormatgetTimeFormat(Calendar cal)
    
public  TimestampgetTimestamp(Calendar cal)
    
public static  TimestampgetTimestamp(java.util.Calendar cal, String str, LocaleFinder localeFinder)
    
protected  DateFormatgetTimestampFormat()
    
protected  DateFormatgetTimestampFormat(Calendar cal)
    
public  intgetTypeFormatId()
     Return my format identifier.
public  StringgetTypeName()
    
public  BooleanDataValuegreaterOrEquals(DataValueDescriptor left, DataValueDescriptor right)
     The >= operator as called from the language module, as opposed to the storage module.
public  BooleanDataValuegreaterThan(DataValueDescriptor left, DataValueDescriptor right)
     The > operator as called from the language module, as opposed to the storage module.
protected  intgrowBy()
     returns the reasonable minimum amount by which the array can grow .
final protected  voidhasNonBlankChars(String source, int start, int end)
    
public  inthashCode()
    
protected  booleanisNationalString()
     Return whether or not this is a national character datatype.
public  booleanisNull()
     see if the String value is null.
public  BooleanDataValuelessOrEquals(DataValueDescriptor left, DataValueDescriptor right)
     The <= operator as called from the language module, as opposed to the storage module.
public  BooleanDataValuelessThan(DataValueDescriptor left, DataValueDescriptor right)
     The < operator as called from the language module, as opposed to the storage module.
public  BooleanDataValuelike(DataValueDescriptor pattern)
     This method implements the like function for char (with no escape value).
public  BooleanDataValuelike(DataValueDescriptor pattern, DataValueDescriptor escape)
     This method implements the like function for char with an escape value.
public  voidloadStream()
    
public  NumberDataValuelocate(StringDataValue searchFrom, NumberDataValue start, NumberDataValue result)
     This method implements the locate function for char.
Parameters:
  searchFrom - - The string to search from
Parameters:
  start - - The position to search from in string searchFrom
Parameters:
  result - - The object to returnNote: use getString() to get the string to search for.
public  StringDataValuelower(StringDataValue result)
    
protected  DatenationalGetDate(Calendar cal)
     This implements getDate() for the national types.
protected  TimenationalGetTime(Calendar cal)
     This implements getTime() for the national types.
protected  TimestampnationalGetTimestamp(Calendar cal)
     This implements getTimestamp() for the national types.
protected  intnationalHashCode()
     Implementation of hashCode() for the national character types, put here to make it accessible to all the national types.
public  voidnormalize(DataTypeDescriptor desiredType, DataValueDescriptor source)
     Normalization method - this method may be called when putting a value into a SQLChar, for example, when inserting into a SQLChar column.
protected  voidnormalize(DataTypeDescriptor desiredType, String sourceValue)
    
public  BooleanDataValuenotEquals(DataValueDescriptor left, DataValueDescriptor right)
     The <> operator as called from the language module, as opposed to the storage module.
public  voidreadExternal(ObjectInput in)
    
public  voidreadExternalFromArray(ArrayInputStream in)
     Reads in a string from the specified data input stream.
public  voidrestoreToNull()
    
public  InputStreamreturnStream()
    
public  voidsetBigDecimal(Number bigDecimal)
     Only to be called when an application through JDBC is setting a SQLChar to a java.math.BigDecimal.
protected  voidsetFrom(DataValueDescriptor theValue)
    
final public  voidsetInto(PreparedStatement ps, int position)
     Set the value into a PreparedStatement.
protected  voidsetLocaleFinder(LocaleFinder localeFinder)
    
public  voidsetObjectForCast(Object theValue, boolean instanceOfResultType, String resultTypeClassName)
     Allow any Java type to be cast to a character type using Object.toString.
final public  voidsetStream(InputStream newStream)
     Set this value to the on-disk format stream.
public  voidsetValue(String theValue)
    
public  voidsetValue(boolean theValue)
    
public  voidsetValue(int theValue)
    
public  voidsetValue(double theValue)
    
public  voidsetValue(float theValue)
    
public  voidsetValue(short theValue)
    
public  voidsetValue(long theValue)
    
public  voidsetValue(byte theValue)
    
public  voidsetValue(byte[] theValue)
    
public  voidsetValue(Date theValue, Calendar cal)
    
public  voidsetValue(Time theValue, Calendar cal)
    
public  voidsetValue(Timestamp theValue, Calendar cal)
    
final public  voidsetValue(InputStream theStream, int valueLength)
     Set the value from the stream which is in the on-disk format.
final public  voidsetValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable)
    
public  voidsetWidth(int desiredWidth, int desiredScale, boolean errorOnTrunc)
     Set the width of the to the desired value.
protected  intstringCollatorCompare(SQLChar str2)
     Compare a localized string with this one.
protected static  intstringCompare(String op1, String op2)
     Compare two Strings using standard SQL semantics.
protected  intstringCompare(SQLChar char1, SQLChar char2)
     Compare two SQLChars.
protected static  intstringCompare(char[] op1, int leftlen, char[] op2, int rightlen)
     Compare two Strings using standard SQL semantics.
public  ConcatableDataValuesubstring(NumberDataValue start, NumberDataValue length, ConcatableDataValue result, int maxLen)
     The SQL substr() function.
public  StringtoString()
    
public  StringDataValuetrim(int trimType, StringDataValue result)
     The SQL trim(), ltrim() and rtrim() functions.
public  inttypePrecedence()
    
public  inttypeToBigDecimal()
     CHAR/VARCHAR/LONG VARCHAR implementation.
public  StringDataValueupper(StringDataValue result)
    
public  voidwriteExternal(ObjectOutput out)
     The maximum stored size is based upon the UTF format used to stored the String.

Field Detail
RETURN_SPACE_THRESHOLD
final protected static int RETURN_SPACE_THRESHOLD(Code)
threshold, that decides when we return space back to the VM see getString() where it is used



arg_passer
char[][] arg_passer(Code)



stream
InputStream stream(Code)
The value as a stream in the on-disk format.




Constructor Detail
SQLChar
public SQLChar()(Code)
no-arg constructor, required by Formattable.



SQLChar
public SQLChar(String val)(Code)




Method Detail
charLength
public NumberDataValue charLength(NumberDataValue result) throws StandardException(Code)
This method implements the char_length function for char.
Parameters:
  result - The result of a previous call to this method, nullif not called yet A SQLInteger containing the length of the char value
exception:
  StandardException - Thrown on error
See Also:   ConcatableDataValue.charLength(NumberDataValue)



cloneObject
public Object cloneObject()(Code)
From CloneableObject Shallow clone a StreamStorable without objectifying. This is used to avoid unnecessary objectifying of a stream object. The only difference of this method from getClone is this method does not objectify a stream. beetle 4896



compare
public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)

exception:
  StandardException - thrown on error



compare
public int compare(DataValueDescriptor other) throws StandardException(Code)

exception:
  StandardException - thrown on error



concatenate
public StringDataValue concatenate(StringDataValue leftOperand, StringDataValue rightOperand, StringDataValue result) throws StandardException(Code)

See Also:   StringDataValue.concatenate
exception:
  StandardException - Thrown on error



copyState
protected void copyState(SQLChar other)(Code)



equals
public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The = operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the =
Parameters:
  right - The value on the right side of the = A SQL boolean value telling whether the two parameters are equal
exception:
  StandardException - Thrown on error



estimateMemoryUsage
public int estimateMemoryUsage()(Code)



getBoolean
public boolean getBoolean() throws StandardException(Code)

See Also:   DataValueDescriptor.getBoolean
exception:
  StandardException - Thrown on error



getByte
public byte getByte() throws StandardException(Code)

See Also:   DataValueDescriptor.getByte
exception:
  StandardException - thrown on failure to convert



getCharArray
public char[] getCharArray() throws StandardException(Code)
Get a char array. Typically, this is a simple getter that is cheaper than getString() because we always need to create a char array when doing I/O. Use this instead of getString() where reasonable.

WARNING: may return a character array that has spare characters at the end. MUST be used in conjunction with getLength() to be safe.
exception:
  StandardException - Thrown on error




getClone
public DataValueDescriptor getClone()(Code)

See Also:   DataValueDescriptor.getClone
See Also:   



getCollationKey
protected CollationKey getCollationKey() throws StandardException(Code)



getDate
public Date getDate(Calendar cal) throws StandardException(Code)

See Also:   DataValueDescriptor.getDate
exception:
  StandardException - thrown on failure to convert



getDate
public static Date getDate(java.util.Calendar cal, String str, LocaleFinder localeFinder) throws StandardException(Code)



getDateFormat
protected DateFormat getDateFormat() throws StandardException(Code)



getDateFormat
protected DateFormat getDateFormat(Calendar cal) throws StandardException(Code)



getDouble
public double getDouble() throws StandardException(Code)

See Also:   DataValueDescriptor.getDouble
exception:
  StandardException - thrown on failure to convert



getFloat
public float getFloat() throws StandardException(Code)

See Also:   DataValueDescriptor.getFloat
exception:
  StandardException - thrown on failure to convert



getInt
public int getInt() throws StandardException(Code)

See Also:   DataValueDescriptor.getInt
exception:
  StandardException - thrown on failure to convert



getLength
public int getLength() throws StandardException(Code)

exception:
  StandardException - Thrown on error



getLocaleFinder
protected LocaleFinder getLocaleFinder()(Code)



getLong
public long getLong() throws StandardException(Code)

See Also:   DataValueDescriptor.getLong
exception:
  StandardException - thrown on failure to convert



getNewNull
public DataValueDescriptor getNewNull()(Code)

See Also:   DataValueDescriptor.getNewNull



getNewVarchar
protected StringDataValue getNewVarchar() throws StandardException(Code)
Get a SQLVarchar for a built-in string function. (Could be either a SQLVarchar or SQLNationalVarchar.) a SQLVarchar or SQLNationalVarchar.
exception:
  StandardException - Thrown on error



getObject
public Object getObject() throws StandardException(Code)

exception:
  StandardException - Thrown on error



getShort
public short getShort() throws StandardException(Code)

See Also:   DataValueDescriptor.getShort
exception:
  StandardException - thrown on failure to convert



getStream
public InputStream getStream() throws StandardException(Code)

exception:
  StandardException - Thrown on error



getString
public String getString() throws StandardException(Code)
If possible, use getCharArray() if you don't really need a string. getString() will cause an extra char array to be allocated when it calls the the String() constructor (the first time through), so may be cheaper to use getCharArray().
exception:
  StandardException - Thrown on error



getTime
public Time getTime(Calendar cal) throws StandardException(Code)

See Also:   DataValueDescriptor.getTime
exception:
  StandardException - thrown on failure to convert



getTime
public static Time getTime(Calendar cal, String str, LocaleFinder localeFinder) throws StandardException(Code)

exception:
  StandardException - thrown on failure to convert



getTimeFormat
protected DateFormat getTimeFormat() throws StandardException(Code)



getTimeFormat
protected DateFormat getTimeFormat(Calendar cal) throws StandardException(Code)



getTimestamp
public Timestamp getTimestamp(Calendar cal) throws StandardException(Code)

See Also:   DataValueDescriptor.getTimestamp
exception:
  StandardException - thrown on failure to convert



getTimestamp
public static Timestamp getTimestamp(java.util.Calendar cal, String str, LocaleFinder localeFinder) throws StandardException(Code)

See Also:   DataValueDescriptor.getTimestamp
exception:
  StandardException - thrown on failure to convert



getTimestampFormat
protected DateFormat getTimestampFormat() throws StandardException(Code)



getTimestampFormat
protected DateFormat getTimestampFormat(Calendar cal) throws StandardException(Code)



getTypeFormatId
public int getTypeFormatId()(Code)
Return my format identifier.
See Also:   org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId



getTypeName
public String getTypeName()(Code)



greaterOrEquals
public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The >= operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the >=
Parameters:
  right - The value on the right side of the >= A SQL boolean value telling whether the first operand isgreater than or equal to the second operand
exception:
  StandardException - Thrown on error



greaterThan
public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The > operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the >
Parameters:
  right - The value on the right side of the > A SQL boolean value telling whether the first operand isgreater than the second operand
exception:
  StandardException - Thrown on error



growBy
protected int growBy()(Code)
returns the reasonable minimum amount by which the array can grow . See readExternal. when we know that the array needs to grow by at least one byte, it is not performant to grow by just one byte instead this amount is used to provide a resonable growby size. minimum reasonable growby size



hasNonBlankChars
final protected void hasNonBlankChars(String source, int start, int end) throws StandardException(Code)



hashCode
public int hashCode()(Code)



isNationalString
protected boolean isNationalString()(Code)
Return whether or not this is a national character datatype.



isNull
public boolean isNull()(Code)
see if the String value is null.
See Also:   Storable.isNull



lessOrEquals
public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The <= operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the <=
Parameters:
  right - The value on the right side of the <= A SQL boolean value telling whether the first operand isless than or equal to the second operand
exception:
  StandardException - Thrown on error



lessThan
public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The < operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the <
Parameters:
  right - The value on the right side of the < A SQL boolean value telling whether the first operand isless than the second operand
exception:
  StandardException - Thrown on error



like
public BooleanDataValue like(DataValueDescriptor pattern) throws StandardException(Code)
This method implements the like function for char (with no escape value).
Parameters:
  pattern - The pattern to use A SQL boolean value telling whether the first operand islike the second operand
exception:
  StandardException - Thrown on error



like
public BooleanDataValue like(DataValueDescriptor pattern, DataValueDescriptor escape) throws StandardException(Code)
This method implements the like function for char with an escape value.
Parameters:
  pattern - The pattern to use A SQL boolean value telling whether the first operand islike the second operand
exception:
  StandardException - Thrown on error



loadStream
public void loadStream() throws StandardException(Code)



locate
public NumberDataValue locate(StringDataValue searchFrom, NumberDataValue start, NumberDataValue result) throws StandardException(Code)
This method implements the locate function for char.
Parameters:
  searchFrom - - The string to search from
Parameters:
  start - - The position to search from in string searchFrom
Parameters:
  result - - The object to returnNote: use getString() to get the string to search for. The position in searchFrom the fist occurrence of this.value.0 is returned if searchFrom does not contain this.value.
exception:
  StandardException - Thrown on error



lower
public StringDataValue lower(StringDataValue result) throws StandardException(Code)

See Also:   StringDataValue.lower
See Also:   
exception:
  StandardException - Thrown on error



nationalGetDate
protected Date nationalGetDate(Calendar cal) throws StandardException(Code)
This implements getDate() for the national types. It lives here so it can be shared between all the national types.
exception:
  StandardException - thrown on failure to convert



nationalGetTime
protected Time nationalGetTime(Calendar cal) throws StandardException(Code)
This implements getTime() for the national types. It lives here so it can be shared between all the national types.
exception:
  StandardException - thrown on failure to convert



nationalGetTimestamp
protected Timestamp nationalGetTimestamp(Calendar cal) throws StandardException(Code)
This implements getTimestamp() for the national types. It lives here so it can be shared between all the national types.
exception:
  StandardException - thrown on failure to convert



nationalHashCode
protected int nationalHashCode()(Code)
Implementation of hashCode() for the national character types, put here to make it accessible to all the national types.



normalize
public void normalize(DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException(Code)
Normalization method - this method may be called when putting a value into a SQLChar, for example, when inserting into a SQLChar column. See NormalizeResultSet in execution.
Parameters:
  desiredType - The type to normalize the source column to
Parameters:
  source - The value to normalize
exception:
  StandardException - Thrown for null intonon-nullable column, and fortruncation error



normalize
protected void normalize(DataTypeDescriptor desiredType, String sourceValue) throws StandardException(Code)



notEquals
public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)
The <> operator as called from the language module, as opposed to the storage module.
Parameters:
  left - The value on the left side of the <>
Parameters:
  right - The value on the right side of the <> A SQL boolean value telling whether the two parametersare not equal
exception:
  StandardException - Thrown on error



readExternal
public void readExternal(ObjectInput in) throws IOException(Code)



readExternalFromArray
public void readExternalFromArray(ArrayInputStream in) throws IOException(Code)
Reads in a string from the specified data input stream. The string has been encoded using a modified UTF-8 format.

The first two bytes are read as if by readUnsignedShort. This value gives the number of following bytes that are in the encoded string, not the length of the resulting string. The following bytes are then interpreted as bytes encoding characters in the UTF-8 format and are converted into characters.

This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.
Parameters:
  in - a data input stream.
exception:
  EOFException - if the input stream reaches the endbefore all the bytes.
exception:
  IOException - if an I/O error occurs.
exception:
  UTFDataFormatException - if the bytes do not represent avalid UTF-8 encoding of a Unicode string.
See Also:   java.io.DataInputStream.readUnsignedShort
See Also:   java.io.Externalizable.readExternal




restoreToNull
public void restoreToNull()(Code)

See Also:   Storable.restoreToNull



returnStream
public InputStream returnStream()(Code)



setBigDecimal
public void setBigDecimal(Number bigDecimal) throws StandardException(Code)
Only to be called when an application through JDBC is setting a SQLChar to a java.math.BigDecimal.



setFrom
protected void setFrom(DataValueDescriptor theValue) throws StandardException(Code)



setInto
final public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException(Code)
Set the value into a PreparedStatement.



setLocaleFinder
protected void setLocaleFinder(LocaleFinder localeFinder)(Code)



setObjectForCast
public void setObjectForCast(Object theValue, boolean instanceOfResultType, String resultTypeClassName) throws StandardException(Code)
Allow any Java type to be cast to a character type using Object.toString.
See Also:   DataValueDescriptor.setObjectForCast
exception:
  StandardException - thrown on failure



setStream
final public void setStream(InputStream newStream)(Code)
Set this value to the on-disk format stream.



setValue
public void setValue(String theValue)(Code)



setValue
public void setValue(boolean theValue) throws StandardException(Code)



setValue
public void setValue(int theValue) throws StandardException(Code)



setValue
public void setValue(double theValue) throws StandardException(Code)



setValue
public void setValue(float theValue) throws StandardException(Code)



setValue
public void setValue(short theValue) throws StandardException(Code)



setValue
public void setValue(long theValue) throws StandardException(Code)



setValue
public void setValue(byte theValue) throws StandardException(Code)



setValue
public void setValue(byte[] theValue) throws StandardException(Code)



setValue
public void setValue(Date theValue, Calendar cal) throws StandardException(Code)

exception:
  StandardException - Thrown on error



setValue
public void setValue(Time theValue, Calendar cal) throws StandardException(Code)

exception:
  StandardException - Thrown on error



setValue
public void setValue(Timestamp theValue, Calendar cal) throws StandardException(Code)

exception:
  StandardException - Thrown on error



setValue
final public void setValue(InputStream theStream, int valueLength)(Code)
Set the value from the stream which is in the on-disk format.
Parameters:
  theStream - On disk format of the stream
Parameters:
  valueLength - length of the logical value in characters.



setValueFromResultSet
final public void setValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable) throws SQLException(Code)

See Also:   DataValueDescriptor.setValueFromResultSet
See Also:   
exception:
  SQLException - Thrown on error



setWidth
public void setWidth(int desiredWidth, int desiredScale, boolean errorOnTrunc) throws StandardException(Code)
Set the width of the to the desired value. Used when CASTing. Ideally we'd recycle normalize(), but the behavior is different (we issue a warning instead of an error, and we aren't interested in nullability).
Parameters:
  desiredWidth - the desired length
Parameters:
  desiredScale - the desired scale (ignored)
Parameters:
  errorOnTrunc - throw an error on truncation
exception:
  StandardException - Thrown when errorOnTruncis true and when a shrink will truncate non-whitespaces.



stringCollatorCompare
protected int stringCollatorCompare(SQLChar str2) throws StandardException(Code)
Compare a localized string with this one.
Parameters:
  str2 - The other string -1 - this < str20 - this == str21 - this > str2



stringCompare
protected static int stringCompare(String op1, String op2)(Code)
Compare two Strings using standard SQL semantics.
Parameters:
  op1 - The first String
Parameters:
  op2 - The second String -1 - op1 < op20 - op1 == op21 - op1 > op2



stringCompare
protected int stringCompare(SQLChar char1, SQLChar char2) throws StandardException(Code)
Compare two SQLChars. This method will be overriden in the National char wrappers so that the appropriate comparison is done.
exception:
  StandardException - Thrown on error



stringCompare
protected static int stringCompare(char[] op1, int leftlen, char[] op2, int rightlen)(Code)
Compare two Strings using standard SQL semantics.
Parameters:
  op1 - The first String
Parameters:
  op2 - The second String -1 - op1 < op20 - op1 == op21 - op1 > op2



substring
public ConcatableDataValue substring(NumberDataValue start, NumberDataValue length, ConcatableDataValue result, int maxLen) throws StandardException(Code)
The SQL substr() function.
Parameters:
  start - Start of substr
Parameters:
  length - Length of substr
Parameters:
  result - The result of a previous call to this method,null if not called yet.
Parameters:
  maxLen - Maximum length of the result A ConcatableDataValue containing the result of the substr()
exception:
  StandardException - Thrown on error



toString
public String toString()(Code)



trim
public StringDataValue trim(int trimType, StringDataValue result) throws StandardException(Code)
The SQL trim(), ltrim() and rtrim() functions.
Parameters:
  trimType - Type of trim
Parameters:
  result - The result of a previous call to this method,null if not called yet. A StringDataValue containing the result of the trim()
exception:
  StandardException - Thrown on error



typePrecedence
public int typePrecedence()(Code)

See Also:   DataValueDescriptor.typePrecedence
See Also:   



typeToBigDecimal
public int typeToBigDecimal() throws StandardException(Code)
CHAR/VARCHAR/LONG VARCHAR implementation. Convert to a BigDecimal using getString.



upper
public StringDataValue upper(StringDataValue result) throws StandardException(Code)

See Also:   StringDataValue.upper
See Also:   
exception:
  StandardException - Thrown on error



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
The maximum stored size is based upon the UTF format used to stored the String. The format consists of a two byte length field and a maximum number of three bytes for each character.
This puts an upper limit on the length of a stored String. The maximum stored length is 65535, these leads to the worse case of a maximum string length of 21844 ((65535 - 2) / 3).
Strings with stored length longer than 64K is handled with the following format: (1) 2 byte length: will be assigned 0. (2) UTF formated string data. (3) terminate the string with the following 3 bytes: first byte is: +---+---+---+---+---+---+---+---+ | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | +---+---+---+---+---+---+---+---+ second byte is: +---+---+---+---+---+---+---+---+ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +---+---+---+---+---+---+---+---+ third byte is: +---+---+---+---+---+---+---+---+ | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +---+---+---+---+---+---+---+---+ The UTF format: Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.

First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for the character.
exception:
  IOException - if an I/O error occurs.
since:
   JDK1.0
exception:
  IOException - thrown by writeUTF
See Also:   java.io.DataInputStream




Methods inherited from org.apache.derby.iapi.types.DataType
public void checkHostVariable(int declaredLength) throws StandardException(Code)(Java Doc)
public Object cloneObject()(Code)(Java Doc)
public DataValueDescriptor coalesce(DataValueDescriptor[] argumentsList, DataValueDescriptor returnValue) throws StandardException(Code)(Java Doc)
public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)(Java Doc)
final protected StandardException dataTypeConversion(String targetType)(Code)(Java Doc)
public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
protected static int flip(int operator)(Code)(Java Doc)
void genericSetObject(Object theValue) throws StandardException(Code)(Java Doc)
public boolean getBoolean() throws StandardException(Code)(Java Doc)
public byte getByte() throws StandardException(Code)(Java Doc)
public byte[] getBytes() throws StandardException(Code)(Java Doc)
public Date getDate(Calendar cal) throws StandardException(Code)(Java Doc)
public double getDouble() throws StandardException(Code)(Java Doc)
public float getFloat() throws StandardException(Code)(Java Doc)
public int getInt() throws StandardException(Code)(Java Doc)
public long getLong() throws StandardException(Code)(Java Doc)
protected String getNationalString(LocaleFinder localeFinder) throws StandardException(Code)(Java Doc)
public Object getObject() throws StandardException(Code)(Java Doc)
public short getShort() throws StandardException(Code)(Java Doc)
public InputStream getStream() throws StandardException(Code)(Java Doc)
public Time getTime(Calendar cal) throws StandardException(Code)(Java Doc)
public Timestamp getTimestamp(Calendar cal) throws StandardException(Code)(Java Doc)
public String getTraceString() throws StandardException(Code)(Java Doc)
String getTypeName(String className)(Code)(Java Doc)
public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue in(DataValueDescriptor left, DataValueDescriptor[] inList, boolean orderedList) throws StandardException(Code)(Java Doc)
final protected StandardException invalidFormat()(Code)(Java Doc)
final public BooleanDataValue isNotNull()(Code)(Java Doc)
final public BooleanDataValue isNullOp()(Code)(Java Doc)
public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
public void normalize(DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException(Code)(Java Doc)
public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc)
final protected StandardException outOfRange()(Code)(Java Doc)
public void setBigDecimal(Number bigDecimal) throws StandardException(Code)(Java Doc)
protected void setFrom(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc)
public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException(Code)(Java Doc)
public void setInto(ResultSet rs, int position) throws SQLException, StandardException(Code)(Java Doc)
void setObject(Object theValue) throws StandardException(Code)(Java Doc)
public void setObjectForCast(Object theValue, boolean instanceOfResultType, String resultTypeClassName) throws StandardException(Code)(Java Doc)
public void setToNull()(Code)(Java Doc)
public void setValue(Time theValue) throws StandardException(Code)(Java Doc)
public void setValue(Time theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(Timestamp theValue) throws StandardException(Code)(Java Doc)
public void setValue(Timestamp theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(Date theValue) throws StandardException(Code)(Java Doc)
public void setValue(Date theValue, Calendar cal) throws StandardException(Code)(Java Doc)
public void setValue(String theValue) throws StandardException(Code)(Java Doc)
public void setValue(int theValue) throws StandardException(Code)(Java Doc)
public void setValue(double theValue) throws StandardException(Code)(Java Doc)
public void setValue(float theValue) throws StandardException(Code)(Java Doc)
public void setValue(short theValue) throws StandardException(Code)(Java Doc)
public void setValue(long theValue) throws StandardException(Code)(Java Doc)
public void setValue(byte theValue) throws StandardException(Code)(Java Doc)
public void setValue(boolean theValue) throws StandardException(Code)(Java Doc)
public void setValue(byte[] theValue) throws StandardException(Code)(Java Doc)
final public void setValue(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc)
public void setValue(InputStream theStream, int valueLength) throws StandardException(Code)(Java Doc)
public void throwLangSetMismatch(Object value) throws StandardException(Code)(Java Doc)
void throwLangSetMismatch(String argTypeName) throws StandardException(Code)(Java Doc)
public int typePrecedence()(Code)(Java Doc)
public int typeToBigDecimal() throws StandardException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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