org.apache.ojb.broker.metadata
Interface JdbcType

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
JdbcTypesHelper.BaseType

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,v 1.6.2.1 2005/03/10 17:55:30 arminw Exp $
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

public static final int MIN_INT
Intern used flag.

See Also:
Constant Field Values
Method Detail

getObjectFromColumn

public 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

public 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

public 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

public 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

public int getType()
Returns the representing sql type.


equals

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


getFieldType

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



(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2