本文整理汇总了Java中org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo类的典型用法代码示例。如果您正苦于以下问题:Java DialectResolutionInfo类的具体用法?Java DialectResolutionInfo怎么用?Java DialectResolutionInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DialectResolutionInfo类属于org.hibernate.engine.jdbc.dialect.spi包,在下文中一共展示了DialectResolutionInfo类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: determineDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
/**
* Determine the appropriate Dialect to use given the connection.
*
* @param resolutionInfoSource Access to DialectResolutionInfo used to resolve the Dialect.
*
* @return The appropriate dialect instance.
*
* @throws HibernateException No connection given or no resolver could make
* the determination from the given connection.
*/
private Dialect determineDialect(DialectResolutionInfoSource resolutionInfoSource) {
if ( resolutionInfoSource == null ) {
throw new HibernateException( "Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set" );
}
final DialectResolutionInfo info = resolutionInfoSource.getDialectResolutionInfo();
final Dialect dialect = dialectResolver.resolveDialect( info );
if ( dialect == null ) {
throw new HibernateException(
"Unable to determine Dialect to use [name=" + info.getDatabaseName() +
", majorVersion=" + info.getDatabaseMajorVersion() +
"]; user must register resolver or explicitly set 'hibernate.dialect'"
);
}
return dialect;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:DialectFactoryImpl.java
示例2: matches
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Override
public boolean matches(Object object) {
DialectResolver actual = (DialectResolver) object;
DialectResolutionInfo info = mock(DialectResolutionInfo.class);
when(info.getDatabaseName()).thenReturn(databaseName);
if ("SQLite".equals(databaseName)) {
return actual.resolveDialect(info) instanceof SQLiteDialect;
} else {
return actual.resolveDialect(info) == null;
}
}
开发者ID:ZsoltFabok,项目名称:sqlite-dialect,代码行数:13,代码来源:SQLiteMetadataBuilderInitializerTest.java
示例3: resolveDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Override
public Dialect resolveDialect(DialectResolutionInfo info) {
if ("DB2".equals(info.getDatabaseName())) {
LOG.debug("DB2 detected returning DB2390Dialect");
return new DB2390Dialect();
}
return null;
}
开发者ID:psd2-in-a-box,项目名称:mid-tier,代码行数:9,代码来源:DB2DialectResolver.java
示例4: resolveDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Override
public Dialect resolveDialect(DialectResolutionInfo dialectResolutionInfo) {
if ("MySQL".equals(dialectResolutionInfo.getDatabaseName())) {
return dialectResolutionInfo.getDatabaseMajorVersion() >= 5 ? new Mysql5BitBooleanDialect() : new MySQLDialect();
}
return null;
}
开发者ID:aerogear,项目名称:aerogear-unifiedpush-server,代码行数:8,代码来源:MysqlDialectResolver.java
示例5: resolveDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Override
public Dialect resolveDialect(DialectResolutionInfo info) {
if (info.getDatabaseName().equals("SQLite"))
return dialect;
return null;
}
开发者ID:ZsoltFabok,项目名称:sqlite-dialect,代码行数:7,代码来源:SQLiteMetadataBuilderInitializer.java
示例6: resolveDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Nullable
@Override
public Dialect resolveDialect(DialectResolutionInfo info) {
return (info.getDatabaseName().equals(HsqlDatabaseProperties.PRODUCT_NAME) ? SdcctHsqlDialect.INSTANCE : null);
}
开发者ID:esacinc,项目名称:sdcct,代码行数:6,代码来源:SdcctHsqlDialect.java
示例7: resolveDialect
import org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo; //导入依赖的package包/类
@Override
public Dialect resolveDialect(final DialectResolutionInfo info) {
return new AllowMissingIdentitySupportDialect(super.resolveDialect(info));
}
开发者ID:liefke,项目名称:org.fastnate,代码行数:5,代码来源:AllowMissingIdentitySupportDialectResolver.java
注:本文中的org.hibernate.engine.jdbc.dialect.spi.DialectResolutionInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论