org.objectweb.cjdbc.common.exceptions
Class SQLExceptionFactory

java.lang.Object
  extended byorg.objectweb.cjdbc.common.exceptions.SQLExceptionFactory

public class SQLExceptionFactory
extends java.lang.Object

This class defines a SQLExceptionFactory

Version:
1.0
Author:
Marc Wick

Constructor Summary
SQLExceptionFactory()
           
 
Method Summary
static java.sql.SQLException getSQLException(java.util.List exceptions, java.lang.String cjdbcMessage)
          creates a new SQLException with the cjdbcMessage, if all exceptions in the list have the same errorcode and sqlstate the returned SQLExcepion will be constructed with this values otherwise with null and 0
static java.sql.SQLException getSQLException(java.sql.SQLException sqlEx, java.lang.String cjdbcMessage)
          creates a new SQLException with the cjdbcMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLExceptionFactory

public SQLExceptionFactory()
Method Detail

getSQLException

public static java.sql.SQLException getSQLException(java.sql.SQLException sqlEx,
                                                    java.lang.String cjdbcMessage)
creates a new SQLException with the cjdbcMessage

Parameters:
sqlEx - the original exception
cjdbcMessage - the cjdbc message to use for the new sqlexception
Returns:
a new SQLException

getSQLException

public static java.sql.SQLException getSQLException(java.util.List exceptions,
                                                    java.lang.String cjdbcMessage)
creates a new SQLException with the cjdbcMessage, if all exceptions in the list have the same errorcode and sqlstate the returned SQLExcepion will be constructed with this values otherwise with null and 0

Parameters:
exceptions - list of exceptions
cjdbcMessage - the cjdbc message
Returns:
a new SQLException


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.