HHH-6073
This commit is contained in:
parent
a67b6028c1
commit
5e8e49d3ae
|
@ -1858,4 +1858,8 @@ public interface HibernateLogger extends BasicLogger {
|
|||
@LogMessage( level = WARN )
|
||||
@Message( value = "Setting entity-identifier value binding where one already existed : %s.", id = 429 )
|
||||
void entityIdentifierValueBindingExists(String name);
|
||||
|
||||
@LogMessage( level = WARN )
|
||||
@Message( value = "The DerbyDialect dialect has been deprecated; use one of the version-specific dialects instead", id = 430 )
|
||||
void deprecatedDerbyDialect();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,10 @@ import org.jboss.logging.Logger;
|
|||
* http://www.jroller.com/comments/kenlars99/Weblog/cloudscape_soon_to_be_derby
|
||||
*
|
||||
* @author Simon Johnston
|
||||
*
|
||||
* @deprecated HHH-6073
|
||||
*/
|
||||
@Deprecated
|
||||
public class DerbyDialect extends DB2Dialect {
|
||||
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, DerbyDialect.class.getName());
|
||||
|
@ -50,6 +53,7 @@ public class DerbyDialect extends DB2Dialect {
|
|||
|
||||
public DerbyDialect() {
|
||||
super();
|
||||
LOG.deprecatedDerbyDialect();
|
||||
registerFunction( "concat", new DerbyConcatFunction() );
|
||||
registerFunction( "trim", new AnsiTrimFunction() );
|
||||
determineDriverVersion();
|
||||
|
|
|
@ -23,10 +23,8 @@
|
|||
*/
|
||||
package org.hibernate.dialect;
|
||||
|
||||
import org.hibernate.HibernateLogger;
|
||||
import org.hibernate.dialect.function.AnsiTrimFunction;
|
||||
import org.hibernate.dialect.function.DerbyConcatFunction;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -39,9 +37,6 @@ import org.jboss.logging.Logger;
|
|||
* @author Scott Marlow
|
||||
*/
|
||||
public class DerbyTenFiveDialect extends DerbyDialect {
|
||||
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, DerbyTenFiveDialect.class.getName());
|
||||
|
||||
public DerbyTenFiveDialect() {
|
||||
super();
|
||||
registerFunction( "concat", new DerbyConcatFunction() );
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
*/
|
||||
package org.hibernate.dialect;
|
||||
|
||||
import org.hibernate.HibernateLogger;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
/**
|
||||
* Hibernate Dialect for Cloudscape 10 - aka Derby. This implements both an
|
||||
* override for the identity column generator as well as for the case statement
|
||||
|
@ -36,19 +33,12 @@ import org.jboss.logging.Logger;
|
|||
* @author Scott Marlow
|
||||
*/
|
||||
public class DerbyTenSixDialect extends DerbyTenFiveDialect {
|
||||
|
||||
private static final HibernateLogger LOG = Logger.getMessageLogger(HibernateLogger.class, DerbyTenSixDialect.class.getName());
|
||||
|
||||
public DerbyTenSixDialect() {
|
||||
super();
|
||||
}
|
||||
|
||||
private boolean isTenPointFiveReleaseOrNewer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsSequences() {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,15 +82,15 @@ public class StandardDialectResolver extends AbstractDialectResolver {
|
|||
if ( "Apache Derby".equals( databaseName ) ) {
|
||||
int driverVersionMajor = metaData.getDriverMajorVersion();
|
||||
int driverVersionMinor = metaData.getDriverMinorVersion();
|
||||
if ( driverVersionMajor > 10 || ( driverVersionMajor == 10 && driverVersionMinor >= 5 ) ) {
|
||||
if ( driverVersionMinor >= 6 ) {
|
||||
return new DerbyTenSixDialect();
|
||||
}
|
||||
else {
|
||||
return new DerbyTenFiveDialect();
|
||||
}
|
||||
if ( driverVersionMajor > 10 || ( driverVersionMajor == 10 && driverVersionMinor >= 6 ) ) {
|
||||
return new DerbyTenSixDialect();
|
||||
}
|
||||
else if ( driverVersionMajor == 10 && driverVersionMinor == 5 ) {
|
||||
return new DerbyTenFiveDialect();
|
||||
}
|
||||
else {
|
||||
return new DerbyDialect();
|
||||
}
|
||||
return new DerbyDialect();
|
||||
}
|
||||
|
||||
if ( "ingres".equalsIgnoreCase( databaseName ) ) {
|
||||
|
|
Loading…
Reference in New Issue