org.apache.ojb.broker.metadata
Interface JdbcType

All Superinterfaces:
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 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,v 1.1 2007-08-24 22:17:29 ewestfal Exp $
See Also:
FieldType

Field Summary
static int MIN_INT
          Intern used flag.
 
Method Summary
 boolean equals(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).
 Object getObjectFromColumn(CallableStatement stmt, int columnId)
          Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)
 Object getObjectFromColumn(ResultSet rs, CallableStatement stmt, String columnName, int columnId)
          Returns an java object for this jdbc type by extract from the given CallableStatement or ResultSet.
 Object getObjectFromColumn(ResultSet rs, String columnName)
          Convenience method for getObjectFromColumn(ResultSet, CallableStatement, String, int)
 int getType()
          Returns the representing sql type.
 Object sequenceKeyConversion(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

Object getObjectFromColumn(ResultSet rs,
                           CallableStatement stmt,
                           String columnName,
                           int columnId)
                           throws 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:
SQLException

getObjectFromColumn

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

Throws:
SQLException

getObjectFromColumn

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

Throws:
SQLException

sequenceKeyConversion

Object sequenceKeyConversion(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(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object

getFieldType

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



Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.