org.castor.jdo.util
Class JDOUtils
java.lang.Object
org.castor.jdo.util.JDOUtils
public final class JDOUtils
extends java.lang.Object
Common static methods for Castor JDO.
$Revision: 7121 $ $Date: 2006-05-24 08:49:08 -0600 (Wed, 24 May 2006) $static void | closeConnection(Connection conn) - Closes the Connection without throwing SQLException.
|
static void | closeDatabase(Database db) - Closes the Database without throwing exceptions.
|
static void | closeResultSet(ResultSet rs) - Closes the ResultSet without throwing SQLException.
|
static void | closeStatement(Statement stmt) - Closes the Statement without throwing SQLException.
|
static ClassDescriptor | getClassDescriptor(String db, Class type) - Return ClassDescriptor for given type in named database .
|
closeConnection
public static void closeConnection(Connection conn)
Closes the Connection without throwing SQLException. A warning is added
to the log if SQLException is thrown.
conn
- The Connection to close
closeDatabase
public static void closeDatabase(Database db)
Closes the Database without throwing exceptions. An active transaction will
silently rolled back. Warnings are added to the log if any exception occures.
db
- The database to close.
closeResultSet
public static void closeResultSet(ResultSet rs)
Closes the ResultSet without throwing SQLException. A warning is added to
the log if SQLException is thrown.
rs
- The ResultSet to close
closeStatement
public static void closeStatement(Statement stmt)
Closes the Statement without throwing SQLException. A warning is added to
the log if SQLException is thrown.
stmt
- The Statement to close
getClassDescriptor
public static ClassDescriptor getClassDescriptor(String db,
Class type)
throws MappingException
Return ClassDescriptor for given type in named database .
db
- The database's name.type
- The class.
- ClassDescriptor if exists, otherwise null.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com