Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.KeyConstraintViolatedException


        if(logger != null) logger.error(msg.toString());

        // throw a specific type of runtime exception for a key constraint.
        if("23000".equals(stateCode) || "23505".equals(stateCode))
        {
            throw new KeyConstraintViolatedException(shortMsg, ex);
        }
        else
        {
            throw new PersistenceBrokerSQLException(shortMsg, ex);
        }
View Full Code Here


             */
            if (SQL_STATE_KEY_VIOLATED.equals(stateCode)
                ||
                SQL_STATE_FK_VIOLATED.equals(stateCode))
            {
                throw new KeyConstraintViolatedException(msg.toString(), e);
            }
            else
            {
                throw new PersistenceBrokerSQLException(msg.toString(), e);
            }
View Full Code Here

        {
            String msg = "SQLException during the execution of the update SQL query: " + sqlStatement;
            logger.error(msg, e);
            if (SQL_STATE_KEY_VIOLATED.equals(e.getSQLState()))
            {
                throw new KeyConstraintViolatedException(msg, e);
            }
            else
            {
                throw new PersistenceBrokerSQLException(msg, e);
            }
View Full Code Here

                + "): "
                + e.getMessage();
            logger.error(msg,e);
            if (SQL_STATE_KEY_VIOLATED.equals(e.getSQLState()))
            {
                throw new KeyConstraintViolatedException(msg, e);
            }
            throw new PersistenceBrokerSQLException(msg, e);
        }
        finally
        {          
View Full Code Here

            /**
             * throw a specific type of runtime exception for a key constraint.
             */
            if (SQL_STATE_KEY_VIOLATED.equals(e.getSQLState()))
            {
                throw new KeyConstraintViolatedException(msg.toString(), e);
            }
            else
            {
                throw new PersistenceBrokerSQLException(msg.toString(), e);
            }
View Full Code Here

                    + "): "
                    + e.getMessage(),
                e);
            if (SQL_STATE_KEY_VIOLATED.equals(e.getSQLState()))
            {
                throw new KeyConstraintViolatedException(e);
            }
            else
            {
                throw new PersistenceBrokerSQLException(e);
            }
View Full Code Here

                    + e.getMessage(),
                e);
           
            if (SQL_STATE_KEY_VIOLATED.equals(e.getSQLState()))
            {
                throw new KeyConstraintViolatedException(e);
            }
            throw new PersistenceBrokerSQLException(e);
        }
        finally
        {          
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.KeyConstraintViolatedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.