本文整理汇总了Java中org.jooq.ExecuteListener类的典型用法代码示例。如果您正苦于以下问题:Java ExecuteListener类的具体用法?Java ExecuteListener怎么用?Java ExecuteListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExecuteListener类属于org.jooq包,在下文中一共展示了ExecuteListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setupDatabase
import org.jooq.ExecuteListener; //导入依赖的package包/类
private void setupDatabase() {
System.setProperty("org.jooq.no-logo", "true");
dataSource = dataSourceFactory.createDataSource("cattle");
DataSourceConnectionProvider dscp = new DataSourceConnectionProvider(dataSource);
ThreadLocalTransactionProvider tp = new ThreadLocalTransactionProvider(dscp, false);
LoggerListener logger = new LoggerListener();
logger.setMaxLength(1000);
ExecuteListener[] listeners = new ExecuteListener[] { logger, new StopWatchListener() };
Settings settings = dbSetting("cattle");
jooqConfig = new DefaultConfiguration()
.set(getSQLDialect("cattle"))
.set(settings)
.set(dscp)
.set(tp)
.set(DefaultExecuteListenerProvider.providers(listeners));
}
开发者ID:rancher,项目名称:cattle,代码行数:21,代码来源:Bootstrap.java
示例2: init
import org.jooq.ExecuteListener; //导入依赖的package包/类
@PostConstruct
public void init() {
String prop = "db." + name + ".database";
String database = ArchaiusUtil.getString(prop).get();
if ( database == null ) {
throw new IllegalStateException("Failed to find config for [" + prop + "]");
}
try {
SQLDialect dialect = SQLDialect.valueOf(database.trim().toUpperCase());
set(dialect);
} catch ( IllegalArgumentException e ) {
throw new IllegalArgumentException("Invalid SQLDialect [" + database.toUpperCase() + "]", e);
}
if ( connectionProvider == null ) {
set(new AutoCommitConnectionProvider(dataSource));
} else {
set(connectionProvider);
}
settings.setRenderSchema(false);
String renderNameStyle = ArchaiusUtil.getString("db." + name + "." + database + ".render.name.style").get();
if ( renderNameStyle != null ) {
settings.setRenderNameStyle(RenderNameStyle.valueOf(renderNameStyle.trim().toUpperCase()));
}
set(settings);
if ( listeners != null && listeners.size() > 0 ) {
settings().setExecuteLogging(false);
set(DefaultExecuteListenerProvider.providers(listeners.toArray(new ExecuteListener[listeners.size()])));
}
}
开发者ID:cloudnautique,项目名称:cloud-cattle,代码行数:36,代码来源:Configuration.java
示例3: init
import org.jooq.ExecuteListener; //导入依赖的package包/类
@PostConstruct
public void init() {
String prop = "db." + name + ".database";
String database = ArchaiusUtil.getString(prop).get();
if ( database == null ) {
throw new IllegalStateException("Failed to find config for [" + prop + "]");
}
try {
SQLDialect dialect = SQLDialect.valueOf(database.trim().toUpperCase());
set(dialect);
} catch ( IllegalArgumentException e ) {
throw new IllegalArgumentException("Invalid SQLDialect [" + database.toUpperCase() + "]", e);
}
if ( connectionProvider == null ) {
set(new AutoCommitConnectionProvider(dataSource));
} else {
set(connectionProvider);
}
Settings settings = new Settings();
settings.setRenderSchema(false);
String renderNameStyle = ArchaiusUtil.getString("db." + name + "." + database + ".render.name.style").get();
if ( renderNameStyle != null ) {
settings.setRenderNameStyle(RenderNameStyle.valueOf(renderNameStyle.trim().toUpperCase()));
}
set(settings);
if ( listeners != null && listeners.size() > 0 ) {
settings().setExecuteLogging(false);
set(DefaultExecuteListenerProvider.providers(listeners.toArray(new ExecuteListener[listeners.size()])));
}
}
开发者ID:ibuildthecloud,项目名称:dstack,代码行数:37,代码来源:Configuration.java
示例4: provide
import org.jooq.ExecuteListener; //导入依赖的package包/类
@Override
public ExecuteListener provide() {
return null;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:JooqAutoConfigurationTests.java
示例5: getListeners
import org.jooq.ExecuteListener; //导入依赖的package包/类
public List<ExecuteListener> getListeners() {
return listeners;
}
开发者ID:cloudnautique,项目名称:cloud-cattle,代码行数:4,代码来源:Configuration.java
示例6: setListeners
import org.jooq.ExecuteListener; //导入依赖的package包/类
public void setListeners(List<ExecuteListener> listeners) {
this.listeners = listeners;
}
开发者ID:cloudnautique,项目名称:cloud-cattle,代码行数:4,代码来源:Configuration.java
注:本文中的org.jooq.ExecuteListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论