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

TypeId
final public class TypeId implements Formatable(Code)
The TypeId interface provides methods to get information about datatype ids.

The equals(Object) method can be used to determine if two typeIds are for the same type, which defines type id equality.
author:
   Jeff Lichtman



Field Summary
final public static  StringARRAY_NAME
    
final public static  StringBINARY_NAME
    
final public static  intBIT_MAXWIDTH
    
final public static  StringBIT_NAME
    
final public static  intBIT_PRECEDENCE
    
final public static  intBLOB_MAXWIDTH
    
final public static  StringBLOB_NAME
    
final public static  intBLOB_PRECEDENCE
    
final public static  TypeIdBOOLEAN_ID
    
final public static  intBOOLEAN_MAXWIDTH
    
final public static  StringBOOLEAN_NAME
    
final public static  intBOOLEAN_PRECEDENCE
    
final public static  TypeIdCHAR_ID
    
final public static  intCHAR_MAXWIDTH
    
final public static  StringCHAR_NAME
    
final public static  intCHAR_PRECEDENCE
    
final public static  intCLOB_MAXWIDTH
    
final public static  StringCLOB_NAME
    
final public static  intCLOB_PRECEDENCE
    
final public static  StringDATALINK_NAME
    
final public static  intDATE_MAXWIDTH
    
final public static  StringDATE_NAME
    
final public static  intDATE_PRECEDENCE
    
final public static  intDECIMAL_MAXWIDTH
    
final public static  StringDECIMAL_NAME
    
final public static  intDECIMAL_PRECEDENCE
    
final public static  intDECIMAL_PRECISION
    
final public static  intDECIMAL_SCALE
    
final public static  intDOUBLE_MAXWIDTH
    
final public static  StringDOUBLE_NAME
    
final public static  intDOUBLE_PRECEDENCE
    
final public static  intDOUBLE_PRECISION
    
final public static  intDOUBLE_PRECISION_IN_DIGITS
    
final public static  intDOUBLE_SCALE
    
final public static  StringFLOAT_NAME
    
final public static  TypeIdINTEGER_ID
    
final public static  StringINTEGER_NAME
    
final public static  intINT_MAXWIDTH
    
final public static  intINT_PRECEDENCE
    
final public static  intINT_PRECISION
    
final public static  intINT_SCALE
    
final public static  intLONGINT_MAXWIDTH
    
final public static  StringLONGINT_NAME
    
final public static  intLONGINT_PRECEDENCE
    
final public static  intLONGINT_PRECISION
     Various fixed numbers related to datatypes.
final public static  intLONGINT_SCALE
    
final public static  StringLONGVARBINARY_NAME
    
final public static  intLONGVARBIT_MAXWIDTH
    
final public static  StringLONGVARBIT_NAME
    
final public static  intLONGVARBIT_PRECEDENCE
    
final public static  intLONGVARCHAR_MAXWIDTH
    
final public static  StringLONGVARCHAR_NAME
    
final public static  intLONGVARCHAR_PRECEDENCE
    
final public static  intNATIONAL_CHAR_MAXWIDTH
    
final public static  StringNATIONAL_CHAR_NAME
    
final public static  intNATIONAL_CHAR_PRECEDENCE
    
final public static  intNATIONAL_LONGVARCHAR_MAXWIDTH
    
final public static  StringNATIONAL_LONGVARCHAR_NAME
    
final public static  intNATIONAL_LONGVARCHAR_PRECEDENCE
    
final public static  intNATIONAL_VARCHAR_MAXWIDTH
    
final public static  StringNATIONAL_VARCHAR_NAME
    
final public static  intNATIONAL_VARCHAR_PRECEDENCE
    
final public static  intNCLOB_MAXWIDTH
    
final public static  StringNCLOB_NAME
    
final public static  intNCLOB_PRECEDENCE
    
final public static  StringNUMERIC_NAME
    
final public static  intNUMERIC_PRECEDENCE
    
final public static  intREAL_MAXWIDTH
    
final public static  StringREAL_NAME
    
final public static  intREAL_PRECEDENCE
    
final public static  intREAL_PRECISION
    
final public static  intREAL_PRECISION_IN_DIGITS
    
final public static  intREAL_SCALE
    
final public static  StringREF_NAME
    
final public static  intREF_PRECEDENCE
    
final public static  StringROWID_NAME
    
final public static  intSMALLINT_MAXWIDTH
    
final public static  StringSMALLINT_NAME
    
final public static  intSMALLINT_PRECEDENCE
    
final public static  intSMALLINT_PRECISION
    
final public static  intSMALLINT_SCALE
    
final public static  StringSQLXML_NAME
    
final public static  StringSTRUCT_NAME
    
final public static  intTIMESTAMP_MAXWIDTH
    
final public static  StringTIMESTAMP_NAME
    
final public static  intTIMESTAMP_PRECEDENCE
    
final public static  intTIMESTAMP_SCALE
    
final public static  intTIME_MAXWIDTH
    
final public static  StringTIME_NAME
    
final public static  intTIME_PRECEDENCE
    
final public static  intTIME_SCALE
    
final public static  intTINYINT_MAXWIDTH
    
final public static  StringTINYINT_NAME
    
final public static  intTINYINT_PRECEDENCE
    
final public static  intTINYINT_PRECISION
    
final public static  intTINYINT_SCALE
    
final public static  intUSER_PRECEDENCE
     The following constants define the type precedence hierarchy.
final public static  StringVARBINARY_NAME
    
final public static  intVARBIT_MAXWIDTH
    
final public static  StringVARBIT_NAME
    
final public static  intVARBIT_PRECEDENCE
    
final public static  intVARCHAR_MAXWIDTH
    
final public static  StringVARCHAR_NAME
    
final public static  intVARCHAR_PRECEDENCE
    
final public static  intXML_MAXWIDTH
    
final public static  StringXML_NAME
    
final public static  intXML_PRECEDENCE
    
static  DataValueDescriptordecimalImplementation
     Implementation of DECIMAL datatype for generating holders through getNull.

Constructor Summary
public  TypeId(int formatId)
     1 argmument constructor.
public  TypeId(int formatId, BaseTypeIdImpl baseTypeId)
    
public  TypeId(int formatId, BaseTypeIdImpl baseTypeId, boolean classNameWasDelimitedIdentifier)
    

Method Summary
public  booleanequals(Object that)
     we want equals to say if these are the same type id or not.
public  intgetApproximateLengthInBytes(DataTypeDescriptor dts)
     Get the approximate length of this type in bytes. For most datatypes this is just going to be dts.getMaximumWidth().
public  BaseTypeIdImplgetBaseTypeId()
     Get the base type id that is embedded in this type id.
public static  TypeIdgetBuiltInTypeId(int JDBCTypeId)
     Get a TypeId of the given JDBC type.
public static  TypeIdgetBuiltInTypeId(String SQLTypeName)
    
public  booleangetClassNameWasDelimitedIdentifier()
     For user types, tell whether or not the class name was a delimited identifier.
public  StringgetCorrespondingJavaTypeName()
     Get the name of the corresponding Java type. Each SQL type has a corresponding Java type.
final public  intgetJDBCTypeId()
     JDBC has its own idea of type identifiers which is different from the Cloudscape internal type ids.
public  intgetMaximumMaximumWidth()
     Get the maximum maximum width of the type (that's not a typo).
public  intgetMaximumPrecision()
     Get the maximum precision of the type.
public  intgetMaximumScale()
     Get the maximum scale of the type.
public  DataValueDescriptorgetNull()
     Get SQL null value.
public  intgetPrecision(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
    
public  StringgetResultSetMetaDataTypeName()
     Get the name of the corresponding Java type.
public static  TypeIdgetSQLTypeForJavaType(String javaTypeName)
     Get a TypeId for the class that corresponds to the given Java type name.
public  StringgetSQLTypeName()
     Returns the SQL name of the datatype.
public  intgetScale(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
    
public  intgetTypeFormatId()
     Get the formatID which corresponds to this class.
public static  TypeIdgetUserDefinedTypeId(String className, boolean delimitedIdentifier)
    
public  inthashCode()
    
public  booleanisBitTypeId()
    
public  booleanisBlobTypeId()
    
public  booleanisBooleanTypeId()
    
public  booleanisClobTypeId()
    
public  booleanisConcatableTypeId()
    
public  booleanisDateTimeTimeStampTypeID()
    
public  booleanisDateTimeTimeStampTypeId()
    
public  booleanisDecimalTypeId()
    
public  booleanisDoubleTypeId()
    
public  booleanisFixedStringTypeId()
    
public  booleanisFloatingPointTypeId()
    
public  booleanisLOBTypeId()
    
public  booleanisLongConcatableTypeId()
    
public  booleanisLongVarcharTypeId()
    
public  booleanisNationalStringTypeId()
     Does this type id represent a national character string.
public  booleanisNumericTypeId()
    
public  booleanisRealTypeId()
    
public  booleanisRefTypeId()
    
public  booleanisStringTypeId()
     Does this TypeId represent a TypeId for a StringDataType.
public  booleanisUserDefinedTypeId()
    
public  booleanisXMLTypeId()
    
public  booleanorderable(ClassFactory cf)
     Tell whether this type is orderable, that is, can participate in comparisons.
public  voidreadExternal(ObjectInput in)
     Read this object from a stream of stored objects.
public  voidsetNestedTypeId(BaseTypeIdImpl typeId)
     Set the nested BaseTypeId in this TypeId.
public  booleanstreamStorable()
    
public  StringtoParsableString(DataTypeDescriptor dts)
     Converts this TypeId, given a data type descriptor (including length/precision), to a string.
public  inttypePrecedence()
     Each built-in type in JSQL has a precedence.
final public  booleanuserType()
     Tell whether this is a built-in type.
public  booleanvariableLength()
     Does type hava a declared variable length (defined by the application). Examples are CHAR(10), CLOB(1M). Unbounded long types, like LONG VARCHAR return false here. boolean true if type is variable length false if not.
public  voidwriteExternal(ObjectOutput out)
     Write this object to a stream of stored objects.

Field Detail
ARRAY_NAME
final public static String ARRAY_NAME(Code)



BINARY_NAME
final public static String BINARY_NAME(Code)



BIT_MAXWIDTH
final public static int BIT_MAXWIDTH(Code)



BIT_NAME
final public static String BIT_NAME(Code)



BIT_PRECEDENCE
final public static int BIT_PRECEDENCE(Code)



BLOB_MAXWIDTH
final public static int BLOB_MAXWIDTH(Code)



BLOB_NAME
final public static String BLOB_NAME(Code)



BLOB_PRECEDENCE
final public static int BLOB_PRECEDENCE(Code)



BOOLEAN_ID
final public static TypeId BOOLEAN_ID(Code)



BOOLEAN_MAXWIDTH
final public static int BOOLEAN_MAXWIDTH(Code)



BOOLEAN_NAME
final public static String BOOLEAN_NAME(Code)



BOOLEAN_PRECEDENCE
final public static int BOOLEAN_PRECEDENCE(Code)



CHAR_ID
final public static TypeId CHAR_ID(Code)



CHAR_MAXWIDTH
final public static int CHAR_MAXWIDTH(Code)



CHAR_NAME
final public static String CHAR_NAME(Code)



CHAR_PRECEDENCE
final public static int CHAR_PRECEDENCE(Code)



CLOB_MAXWIDTH
final public static int CLOB_MAXWIDTH(Code)



CLOB_NAME
final public static String CLOB_NAME(Code)



CLOB_PRECEDENCE
final public static int CLOB_PRECEDENCE(Code)



DATALINK_NAME
final public static String DATALINK_NAME(Code)



DATE_MAXWIDTH
final public static int DATE_MAXWIDTH(Code)



DATE_NAME
final public static String DATE_NAME(Code)



DATE_PRECEDENCE
final public static int DATE_PRECEDENCE(Code)



DECIMAL_MAXWIDTH
final public static int DECIMAL_MAXWIDTH(Code)



DECIMAL_NAME
final public static String DECIMAL_NAME(Code)



DECIMAL_PRECEDENCE
final public static int DECIMAL_PRECEDENCE(Code)



DECIMAL_PRECISION
final public static int DECIMAL_PRECISION(Code)



DECIMAL_SCALE
final public static int DECIMAL_SCALE(Code)



DOUBLE_MAXWIDTH
final public static int DOUBLE_MAXWIDTH(Code)



DOUBLE_NAME
final public static String DOUBLE_NAME(Code)



DOUBLE_PRECEDENCE
final public static int DOUBLE_PRECEDENCE(Code)



DOUBLE_PRECISION
final public static int DOUBLE_PRECISION(Code)



DOUBLE_PRECISION_IN_DIGITS
final public static int DOUBLE_PRECISION_IN_DIGITS(Code)



DOUBLE_SCALE
final public static int DOUBLE_SCALE(Code)



FLOAT_NAME
final public static String FLOAT_NAME(Code)



INTEGER_ID
final public static TypeId INTEGER_ID(Code)



INTEGER_NAME
final public static String INTEGER_NAME(Code)



INT_MAXWIDTH
final public static int INT_MAXWIDTH(Code)



INT_PRECEDENCE
final public static int INT_PRECEDENCE(Code)



INT_PRECISION
final public static int INT_PRECISION(Code)



INT_SCALE
final public static int INT_SCALE(Code)



LONGINT_MAXWIDTH
final public static int LONGINT_MAXWIDTH(Code)



LONGINT_NAME
final public static String LONGINT_NAME(Code)



LONGINT_PRECEDENCE
final public static int LONGINT_PRECEDENCE(Code)



LONGINT_PRECISION
final public static int LONGINT_PRECISION(Code)
Various fixed numbers related to datatypes.



LONGINT_SCALE
final public static int LONGINT_SCALE(Code)



LONGVARBINARY_NAME
final public static String LONGVARBINARY_NAME(Code)



LONGVARBIT_MAXWIDTH
final public static int LONGVARBIT_MAXWIDTH(Code)



LONGVARBIT_NAME
final public static String LONGVARBIT_NAME(Code)



LONGVARBIT_PRECEDENCE
final public static int LONGVARBIT_PRECEDENCE(Code)



LONGVARCHAR_MAXWIDTH
final public static int LONGVARCHAR_MAXWIDTH(Code)



LONGVARCHAR_NAME
final public static String LONGVARCHAR_NAME(Code)



LONGVARCHAR_PRECEDENCE
final public static int LONGVARCHAR_PRECEDENCE(Code)



NATIONAL_CHAR_MAXWIDTH
final public static int NATIONAL_CHAR_MAXWIDTH(Code)



NATIONAL_CHAR_NAME
final public static String NATIONAL_CHAR_NAME(Code)



NATIONAL_CHAR_PRECEDENCE
final public static int NATIONAL_CHAR_PRECEDENCE(Code)



NATIONAL_LONGVARCHAR_MAXWIDTH
final public static int NATIONAL_LONGVARCHAR_MAXWIDTH(Code)



NATIONAL_LONGVARCHAR_NAME
final public static String NATIONAL_LONGVARCHAR_NAME(Code)



NATIONAL_LONGVARCHAR_PRECEDENCE
final public static int NATIONAL_LONGVARCHAR_PRECEDENCE(Code)



NATIONAL_VARCHAR_MAXWIDTH
final public static int NATIONAL_VARCHAR_MAXWIDTH(Code)



NATIONAL_VARCHAR_NAME
final public static String NATIONAL_VARCHAR_NAME(Code)



NATIONAL_VARCHAR_PRECEDENCE
final public static int NATIONAL_VARCHAR_PRECEDENCE(Code)



NCLOB_MAXWIDTH
final public static int NCLOB_MAXWIDTH(Code)



NCLOB_NAME
final public static String NCLOB_NAME(Code)



NCLOB_PRECEDENCE
final public static int NCLOB_PRECEDENCE(Code)



NUMERIC_NAME
final public static String NUMERIC_NAME(Code)



NUMERIC_PRECEDENCE
final public static int NUMERIC_PRECEDENCE(Code)



REAL_MAXWIDTH
final public static int REAL_MAXWIDTH(Code)



REAL_NAME
final public static String REAL_NAME(Code)



REAL_PRECEDENCE
final public static int REAL_PRECEDENCE(Code)



REAL_PRECISION
final public static int REAL_PRECISION(Code)



REAL_PRECISION_IN_DIGITS
final public static int REAL_PRECISION_IN_DIGITS(Code)



REAL_SCALE
final public static int REAL_SCALE(Code)



REF_NAME
final public static String REF_NAME(Code)



REF_PRECEDENCE
final public static int REF_PRECEDENCE(Code)



ROWID_NAME
final public static String ROWID_NAME(Code)



SMALLINT_MAXWIDTH
final public static int SMALLINT_MAXWIDTH(Code)



SMALLINT_NAME
final public static String SMALLINT_NAME(Code)



SMALLINT_PRECEDENCE
final public static int SMALLINT_PRECEDENCE(Code)



SMALLINT_PRECISION
final public static int SMALLINT_PRECISION(Code)



SMALLINT_SCALE
final public static int SMALLINT_SCALE(Code)



SQLXML_NAME
final public static String SQLXML_NAME(Code)



STRUCT_NAME
final public static String STRUCT_NAME(Code)



TIMESTAMP_MAXWIDTH
final public static int TIMESTAMP_MAXWIDTH(Code)



TIMESTAMP_NAME
final public static String TIMESTAMP_NAME(Code)



TIMESTAMP_PRECEDENCE
final public static int TIMESTAMP_PRECEDENCE(Code)



TIMESTAMP_SCALE
final public static int TIMESTAMP_SCALE(Code)



TIME_MAXWIDTH
final public static int TIME_MAXWIDTH(Code)



TIME_NAME
final public static String TIME_NAME(Code)



TIME_PRECEDENCE
final public static int TIME_PRECEDENCE(Code)



TIME_SCALE
final public static int TIME_SCALE(Code)



TINYINT_MAXWIDTH
final public static int TINYINT_MAXWIDTH(Code)



TINYINT_NAME
final public static String TINYINT_NAME(Code)



TINYINT_PRECEDENCE
final public static int TINYINT_PRECEDENCE(Code)



TINYINT_PRECISION
final public static int TINYINT_PRECISION(Code)



TINYINT_SCALE
final public static int TINYINT_SCALE(Code)



USER_PRECEDENCE
final public static int USER_PRECEDENCE(Code)
The following constants define the type precedence hierarchy.



VARBINARY_NAME
final public static String VARBINARY_NAME(Code)



VARBIT_MAXWIDTH
final public static int VARBIT_MAXWIDTH(Code)



VARBIT_NAME
final public static String VARBIT_NAME(Code)



VARBIT_PRECEDENCE
final public static int VARBIT_PRECEDENCE(Code)



VARCHAR_MAXWIDTH
final public static int VARCHAR_MAXWIDTH(Code)



VARCHAR_NAME
final public static String VARCHAR_NAME(Code)



VARCHAR_PRECEDENCE
final public static int VARCHAR_PRECEDENCE(Code)



XML_MAXWIDTH
final public static int XML_MAXWIDTH(Code)



XML_NAME
final public static String XML_NAME(Code)



XML_PRECEDENCE
final public static int XML_PRECEDENCE(Code)



decimalImplementation
static DataValueDescriptor decimalImplementation(Code)
Implementation of DECIMAL datatype for generating holders through getNull. Set by the booted DataValueFactory implementation.




Constructor Detail
TypeId
public TypeId(int formatId)(Code)
1 argmument constructor. Needed for Formatable interface to work.
Parameters:
  formatId - Format id of specific type id.



TypeId
public TypeId(int formatId, BaseTypeIdImpl baseTypeId)(Code)
Constructor for a TypeId
Parameters:
  formatId - Format id of specific type id.
Parameters:
  baseTypeId - The Base type id



TypeId
public TypeId(int formatId, BaseTypeIdImpl baseTypeId, boolean classNameWasDelimitedIdentifier)(Code)
Constructor for a TypeId for user defined types
Parameters:
  formatId - Format id of specific type id.
Parameters:
  baseTypeId - The Base type id
Parameters:
  classNameWasDelimitedIdentifier - Whether or not the class namewas a delimited identifier




Method Detail
equals
public boolean equals(Object that)(Code)
we want equals to say if these are the same type id or not.



getApproximateLengthInBytes
public int getApproximateLengthInBytes(DataTypeDescriptor dts)(Code)
Get the approximate length of this type in bytes. For most datatypes this is just going to be dts.getMaximumWidth(). Some types, such as bit, will override this.
Parameters:
  dts - Data type descriptor that holds the length/precision etc. as necessary the length in bytes



getBaseTypeId
public BaseTypeIdImpl getBaseTypeId()(Code)
Get the base type id that is embedded in this type id. The base type id is an object with a minimal implementation of TypeId that is intended to be usable on the client side.



getBuiltInTypeId
public static TypeId getBuiltInTypeId(int JDBCTypeId)(Code)
Get a TypeId of the given JDBC type. This factory method is intended to be used for built-in types. For user-defined types, we will need a factory method that takes a Java type name.
Parameters:
  JDBCTypeId - The JDBC Id of the type, as listed injava.sql.Types The appropriate TypeId, or null if there is no suchTypeId.



getBuiltInTypeId
public static TypeId getBuiltInTypeId(String SQLTypeName)(Code)



getClassNameWasDelimitedIdentifier
public boolean getClassNameWasDelimitedIdentifier()(Code)
For user types, tell whether or not the class name was a delimited identifier. For all other types, return false. Whether or not the class name was a delimited identifier.



getCorrespondingJavaTypeName
public String getCorrespondingJavaTypeName()(Code)
Get the name of the corresponding Java type. Each SQL type has a corresponding Java type. When a SQL value is passed to a Java method, it is translated to its corresponding Java type. For example, when a SQL date column is passed to a method, it is translated to a java.sql.Date. The name of the corresponding Java type.



getJDBCTypeId
final public int getJDBCTypeId()(Code)
JDBC has its own idea of type identifiers which is different from the Cloudscape internal type ids. The JDBC type ids are defined as public final static ints in java.sql.Types. This method translates a Cloudscape internal TypeId to a JDBC type id. For java objects this returns JAVA_OBJECT in Java2 and OTHER in JDK 1.1. For Boolean datatypes, this returns Type.BOOLEAN in JDK1.4 and Type.BIT for jdks prior to 1.4 The JDBC type Id for this type



getMaximumMaximumWidth
public int getMaximumMaximumWidth()(Code)
Get the maximum maximum width of the type (that's not a typo). For types with variable length, this is the absolute maximum for the type. The maximum maximum width of the type



getMaximumPrecision
public int getMaximumPrecision()(Code)
Get the maximum precision of the type. For types with variable precision, this is an arbitrary high precision. The maximum precision of the type



getMaximumScale
public int getMaximumScale()(Code)
Get the maximum scale of the type. For types with variable scale, this is an arbitrary high scale. The maximum scale of the type



getNull
public DataValueDescriptor getNull()(Code)
Get SQL null value. SQL null value for this type.



getPrecision
public int getPrecision(DataTypeDescriptor leftType, DataTypeDescriptor rightType)(Code)
Get the precision of the merge of two Decimals
Parameters:
  leftType - the left type
Parameters:
  rightType - the left type the resultant precision



getResultSetMetaDataTypeName
public String getResultSetMetaDataTypeName()(Code)
Get the name of the corresponding Java type. This method is used directly from EmbedResultSetMetaData (jdbc) to return the corresponding type (as choosen by getObject). It solves a specific problem for BLOB types where the getCorrespondingJavaTypeName() is used internall for casting which doesn't work if changed from byte[] to java.sql.Blob. So we do it here instread, to avoid unexpected sideeffects. The name of the corresponding Java type.



getSQLTypeForJavaType
public static TypeId getSQLTypeForJavaType(String javaTypeName)(Code)
Get a TypeId for the class that corresponds to the given Java type name.
Parameters:
  javaTypeName - The name of the Java type A TypeId for the SQL type that corresponds tothe Java type, null if there is no corresponding type.



getSQLTypeName
public String getSQLTypeName()(Code)
Returns the SQL name of the datatype. If it is a user-defined type, it returns the full Java path name for the datatype, meaning the dot-separated path including the package names. A String containing the SQL name of this type.



getScale
public int getScale(DataTypeDescriptor leftType, DataTypeDescriptor rightType)(Code)
Get the scale of the merge of two decimals
Parameters:
  leftType - the left type
Parameters:
  rightType - the left type the resultant precision



getTypeFormatId
public int getTypeFormatId()(Code)
Get the formatID which corresponds to this class. the formatID of this class



getUserDefinedTypeId
public static TypeId getUserDefinedTypeId(String className, boolean delimitedIdentifier)(Code)



hashCode
public int hashCode()(Code)



isBitTypeId
public boolean isBitTypeId()(Code)
Is this a type id for a bit type? Whether or not this a type id for a bit type.



isBlobTypeId
public boolean isBlobTypeId()(Code)
Is this a Blob? true if this is BLOB



isBooleanTypeId
public boolean isBooleanTypeId()(Code)
Is this a type id for a boolean type? Whether or not this a type id for a boolean type.



isClobTypeId
public boolean isClobTypeId()(Code)
Is this a Clob? true if this is CLOB or NCLOB



isConcatableTypeId
public boolean isConcatableTypeId()(Code)
Is this a type id for a concatable type? Whether or not this a type id for a concatable type.



isDateTimeTimeStampTypeID
public boolean isDateTimeTimeStampTypeID()(Code)
Is this DATE/TIME or TIMESTAMP? true if this DATE/TIME or TIMESTAMP



isDateTimeTimeStampTypeId
public boolean isDateTimeTimeStampTypeId()(Code)
Is this a TypeId for DATE/TIME/TIMESTAMP true if this is a DATE/TIME/TIMESTAMP



isDecimalTypeId
public boolean isDecimalTypeId()(Code)
Is this a type id for a decimal type? Whether or not this a type id for a decimal type.



isDoubleTypeId
public boolean isDoubleTypeId()(Code)
Is this a TypeId for DOUBLE true if this is a DOUBLE



isFixedStringTypeId
public boolean isFixedStringTypeId()(Code)
Is this a fixed string type? true if this is CHAR or NCHAR



isFloatingPointTypeId
public boolean isFloatingPointTypeId()(Code)
Is this a TypeId for floating point (REAL/DOUBLE) true if this is a REAL or DOUBLE



isLOBTypeId
public boolean isLOBTypeId()(Code)
Is this a type id for a LOB type? Whether or not this a type id for a LOB type.



isLongConcatableTypeId
public boolean isLongConcatableTypeId()(Code)
Is this a type id for a long concatable type? Whether or not this a type id for a long concatable type.



isLongVarcharTypeId
public boolean isLongVarcharTypeId()(Code)
Is this a LongVarchar? true if this is LongVarchar



isNationalStringTypeId
public boolean isNationalStringTypeId()(Code)
Does this type id represent a national character string. If this returns true then isStringTypeId will also return true.



isNumericTypeId
public boolean isNumericTypeId()(Code)
Is this a type id for a numeric type? Whether or not this a type id for a numeric type.



isRealTypeId
public boolean isRealTypeId()(Code)
Is this a TypeId for REAL true if this is a REAL



isRefTypeId
public boolean isRefTypeId()(Code)
Is this a type id for a ref type? Whether or not this a type id for a ref type.



isStringTypeId
public boolean isStringTypeId()(Code)
Does this TypeId represent a TypeId for a StringDataType. Whether or not this TypeId represents a TypeId for a StringDataType.



isUserDefinedTypeId
public boolean isUserDefinedTypeId()(Code)
Is this a type id for a user defined type? Whether or not this a type id for a user defined type.



isXMLTypeId
public boolean isXMLTypeId()(Code)
Is this an XML doc? true if this is XML



orderable
public boolean orderable(ClassFactory cf)(Code)
Tell whether this type is orderable, that is, can participate in comparisons.
Parameters:
  cf - A ClassFactory true for orderable types, false for non-orderable types.



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)
Read this object from a stream of stored objects.
Parameters:
  in - read this.
exception:
  IOException - thrown on error
exception:
  ClassNotFoundException - thrown on error



setNestedTypeId
public void setNestedTypeId(BaseTypeIdImpl typeId)(Code)
Set the nested BaseTypeId in this TypeId.



streamStorable
public boolean streamStorable()(Code)
Is this type StreamStorable? true if this type has variable length.



toParsableString
public String toParsableString(DataTypeDescriptor dts)(Code)
Converts this TypeId, given a data type descriptor (including length/precision), to a string. E.g. VARCHAR(30) For most data types, we just return the SQL type name.
Parameters:
  dts - Data type descriptor that holds the length/precision etc. as necessary String version of datatype, suitable for running throughthe Parser.



typePrecedence
public 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. NOTE: char, varchar, and longvarchar must appear at the bottom of the hierarchy, but above USER_PRECEDENCE, since we allow the implicit conversion of those types to any other built-in system type. The precedence of this type.



userType
final public boolean userType()(Code)
Tell whether this is a built-in type. NOTE: There are 3 "classes" of types: built-in - system provided types which are implemented internally (int, smallint, etc.) system built-in - system provided types, independent of implementation (date, time, etc.) user types - types implemented outside of the system (java.lang.Integer, asdf.asdf.asdf, etc.) true for built-in types, false for user-defined types.



variableLength
public boolean variableLength()(Code)
Does type hava a declared variable length (defined by the application). Examples are CHAR(10), CLOB(1M). Unbounded long types, like LONG VARCHAR return false here. boolean true if type is variable length false if not.



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)
Write this object to a stream of stored objects.
Parameters:
  out - write bytes here.
exception:
  IOException - thrown on error



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.