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 type object.
Note: Be careful when use JdbcType variables or caching JdbcType instances, because instances could become invalid during runtime (see MetadataManager).

Version:
$Id: JdbcType.java,v 1.4 2004/02/17 16:39:34 arminw Exp $
Author:
Armin Waibel

Field Summary
static int MIN_INT
          Intern used flag.
static long serialVersionUID
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 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

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

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.



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14