3030import org .hibernate .exception .spi .SQLExceptionConversionDelegate ;
3131import org .hibernate .exception .spi .TemplatedViolatedConstraintNameExtractor ;
3232import org .hibernate .exception .spi .ViolatedConstraintNameExtractor ;
33- import org .hibernate .internal .util .JdbcExceptionHelper ;
3433import org .hibernate .query .sqm .IntervalType ;
3534import org .hibernate .query .common .TemporalUnit ;
3635import org .hibernate .service .ServiceRegistry ;
5049import jakarta .persistence .TemporalType ;
5150
5251import static org .hibernate .exception .spi .TemplatedViolatedConstraintNameExtractor .extractUsingTemplate ;
52+ import static org .hibernate .internal .util .JdbcExceptionHelper .extractErrorCode ;
53+ import static org .hibernate .internal .util .JdbcExceptionHelper .extractSqlState ;
5354import static org .hibernate .type .SqlTypes .BIGINT ;
5455import static org .hibernate .type .SqlTypes .BOOLEAN ;
5556import static org .hibernate .type .SqlTypes .DATE ;
@@ -634,8 +635,8 @@ public ViolatedConstraintNameExtractor getViolatedConstraintNameExtractor() {
634635 */
635636 private static final ViolatedConstraintNameExtractor EXTRACTOR =
636637 new TemplatedViolatedConstraintNameExtractor ( sqle -> {
637- final String sqlState = JdbcExceptionHelper . extractSqlState ( sqle );
638- final int errorCode = JdbcExceptionHelper . extractErrorCode ( sqle );
638+ final String sqlState = extractSqlState ( sqle );
639+ final int errorCode = extractErrorCode ( sqle );
639640 if ( sqlState != null ) {
640641 switch ( sqlState ) {
641642 case "S1000" :
@@ -660,8 +661,8 @@ public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate() {
660661 return null ;
661662 }
662663 return (sqlException , message , sql ) -> {
663- final String sqlState = JdbcExceptionHelper . extractSqlState ( sqlException );
664- final int errorCode = JdbcExceptionHelper . extractErrorCode ( sqlException );
664+ final String sqlState = extractSqlState ( sqlException );
665+ final int errorCode = extractErrorCode ( sqlException );
665666 if ( sqlState != null ) {
666667 switch ( sqlState ) {
667668 case "HY008" :
0 commit comments