org.apache.ojb.broker.metadata
Interface JdbcType

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JdbcTypesHelper.BaseType, JdbcTypesHelper.T_Array, JdbcTypesHelper.T_BigInt, JdbcTypesHelper.T_Binary, JdbcTypesHelper.T_Bit, JdbcTypesHelper.T_Blob, JdbcTypesHelper.T_Boolean, JdbcTypesHelper.T_Char, JdbcTypesHelper.T_Clob, JdbcTypesHelper.T_Datalink, JdbcTypesHelper.T_Date, JdbcTypesHelper.T_Decimal, JdbcTypesHelper.T_Double, JdbcTypesHelper.T_Float, JdbcTypesHelper.T_Integer, JdbcTypesHelper.T_LongVarBinary, JdbcTypesHelper.T_LongVarChar, JdbcTypesHelper.T_Numeric, JdbcTypesHelper.T_Real, JdbcTypesHelper.T_Ref, JdbcTypesHelper.T_SmallInt, JdbcTypesHelper.T_Struct, JdbcTypesHelper.T_Time, JdbcTypesHelper.T_Timestamp, JdbcTypesHelper.T_TinyInt, JdbcTypesHelper.T_VarBinary, JdbcTypesHelper.T_Varchar

public interface JdbcType
extends java.io.Serializable

Represents a jdbc sql type object defined by the JDBC 3.0 specification to handle data conversion (see JDBC 3.0 specification Appendix B, Data Type Conversion Tables).

Version:
$Id: JdbcType.java 365232 2005-12-21 22:36:07Z tomdz $
See Also:
FieldType

Field Summary
static int MIN_INT
          Intern used flag.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 FieldType getFieldType()
          Returns the associated FieldType (java field type mapped to this sql type).
 java.lang.Object getObjectFromColumn(java.sql.CallableStatement stmt, int columnId)
          Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)
 java.lang.Object getObjectFromColumn(java.sql.ResultSet rs, java.sql.CallableStatement stmt, java.lang.String columnName, int columnId)
          Returns an java object for this jdbc type by extract from the given CallableStatement or ResultSet.
 java.lang.Object getObjectFromColumn(java.sql.ResultSet rs, java.lang.String columnName)
          Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)
 int getType()
          Returns the representing sql type.
 java.lang.Object sequenceKeyConversion(java.lang.Long identifier)
          Convert the given Long value to a java object representation of this jdbc type.
 

Field Detail

MIN_INT

static final int MIN_INT
Intern used flag.

See Also:
Constant Field Values
Method Detail

getObjectFromColumn

java.lang.Object getObjectFromColumn(java.sql.ResultSet rs,
                                     java.sql.CallableStatement stmt,
                                     java.lang.String columnName,
                                     int columnId)
                                     throws java.sql.SQLException
Returns an java object for this jdbc type by extract from the given CallableStatement or ResultSet.
NOTE: For internal use only!!
Exactly one of the arguments of type CallableStatement or ResultSet have to be non-null. If the 'columnId' argument is equals MIN_INT, then the given 'columnName' argument is used to lookup column. Else the given 'columnId' is used as column index.

Throws:
java.sql.SQLException

getObjectFromColumn

java.lang.Object getObjectFromColumn(java.sql.CallableStatement stmt,
                                     int columnId)
                                     throws java.sql.SQLException
Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)

Throws:
java.sql.SQLException

getObjectFromColumn

java.lang.Object getObjectFromColumn(java.sql.ResultSet rs,
                                     java.lang.String columnName)
                                     throws java.sql.SQLException
Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)

Throws:
java.sql.SQLException

sequenceKeyConversion

java.lang.Object sequenceKeyConversion(java.lang.Long identifier)
                                       throws SequenceManagerException
Convert the given Long value to a java object representation of this jdbc type.

Throws:
SequenceManagerException

getType

int getType()
Returns the representing sql type.


equals

boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object

getFieldType

FieldType getFieldType()
Returns the associated FieldType (java field type mapped to this sql type).



(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30