HHH-6944 : Remove OracleSQLExceptionConversionDelegate
This commit is contained in:
parent
5081861dd8
commit
b8acbc85e6
|
@ -22,8 +22,6 @@
|
||||||
* Boston, MA 02110-1301 USA
|
* Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
package org.hibernate.dialect;
|
package org.hibernate.dialect;
|
||||||
import org.hibernate.exception.internal.OracleSQLExceptionConversionDelegate;
|
|
||||||
import org.hibernate.exception.spi.SQLExceptionConversionDelegate;
|
|
||||||
import org.hibernate.sql.ANSIJoinFragment;
|
import org.hibernate.sql.ANSIJoinFragment;
|
||||||
import org.hibernate.sql.JoinFragment;
|
import org.hibernate.sql.JoinFragment;
|
||||||
|
|
||||||
|
@ -47,9 +45,4 @@ public class Oracle10gDialect extends Oracle9iDialect {
|
||||||
public JoinFragment createOuterJoinFragment() {
|
public JoinFragment createOuterJoinFragment() {
|
||||||
return new ANSIJoinFragment();
|
return new ANSIJoinFragment();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
|
|
||||||
return new OracleSQLExceptionConversionDelegate( this );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
/*
|
|
||||||
* Hibernate, Relational Persistence for Idiomatic Java
|
|
||||||
*
|
|
||||||
* Copyright (c) 2012, Red Hat Inc. or third-party contributors as
|
|
||||||
* indicated by the @author tags or express copyright attribution
|
|
||||||
* statements applied by the authors. All third-party contributions are
|
|
||||||
* distributed under license by Red Hat Inc.
|
|
||||||
*
|
|
||||||
* This copyrighted material is made available to anyone wishing to use, modify,
|
|
||||||
* copy, or redistribute it subject to the terms and conditions of the GNU
|
|
||||||
* Lesser General Public License, as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this distribution; if not, write to:
|
|
||||||
* Free Software Foundation, Inc.
|
|
||||||
* 51 Franklin Street, Fifth Floor
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
package org.hibernate.exception.internal;
|
|
||||||
|
|
||||||
import java.sql.SQLException;
|
|
||||||
|
|
||||||
import org.hibernate.JDBCException;
|
|
||||||
import org.hibernate.PessimisticLockException;
|
|
||||||
import org.hibernate.exception.spi.AbstractSQLExceptionConversionDelegate;
|
|
||||||
import org.hibernate.exception.spi.ConversionContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A {@link org.hibernate.exception.spi.SQLExceptionConversionDelegate}
|
|
||||||
* implementation specific to Oracle.
|
|
||||||
*
|
|
||||||
* @author Gail Badner
|
|
||||||
*/
|
|
||||||
public class OracleSQLExceptionConversionDelegate extends AbstractSQLExceptionConversionDelegate {
|
|
||||||
private static final int PESSIMISTIC_LOCK_ERROR_CODE = 30006;
|
|
||||||
|
|
||||||
public OracleSQLExceptionConversionDelegate(ConversionContext conversionContext) {
|
|
||||||
super( conversionContext );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JDBCException convert(SQLException sqlException, String message, String sql) {
|
|
||||||
if ( sqlException.getErrorCode() == PESSIMISTIC_LOCK_ERROR_CODE ) {
|
|
||||||
return new PessimisticLockException( message, sqlException, sql );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return null; // allow other delegates the chance to look
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue