本文整理汇总了Java中com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation类的典型用法代码示例。如果您正苦于以下问题:Java TransactionIsolation类的具体用法?Java TransactionIsolation怎么用?Java TransactionIsolation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TransactionIsolation类属于com.avaje.ebeaninternal.server.lib.sql包,在下文中一共展示了TransactionIsolation类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureDbConfig
import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
@Override
public void configureDbConfig(ServerConfig config) {
Validate.notNull(config, "Config cannot be null");
DataSourceConfig ds = new DataSourceConfig();
ds.setDriver(configuration.getString("database.driver"));
ds.setUrl(configuration.getString("database.url"));
ds.setUsername(configuration.getString("database.username"));
ds.setPassword(configuration.getString("database.password"));
ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));
if (ds.getDriver().contains("sqlite")) {
config.setDatabasePlatform(new SQLitePlatform());
config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
}
config.setDataSourceConfig(ds);
}
示例2: configureDbConfig
import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
public void configureDbConfig(ServerConfig config) {
Validate.notNull(config, "Config cannot be null");
DataSourceConfig ds = new DataSourceConfig();
ds.setDriver(configuration.getString("database.driver"));
ds.setUrl(configuration.getString("database.url"));
ds.setUsername(configuration.getString("database.username"));
ds.setPassword(configuration.getString("database.password"));
ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));
if (ds.getDriver().contains("sqlite")) {
config.setDatabasePlatform(new SQLitePlatform());
config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
}
config.setDataSourceConfig(ds);
}
示例3: initialize
import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowOpened(WindowEvent e) {
ServerConfig config = new ServerConfig();
config.setDefaultServer(true);
final DataSourceConfig dataSourceConfig = new DataSourceConfig();
dataSourceConfig
.setUrl("jdbc:sqlite:C:/Users/markus/Entwickeln/Java/CraftBukkitTestServer/plugins/SmoothWorldUpdater/SmoothWorldUpdater.db");
dataSourceConfig.setDriver("org.sqlite.JDBC");
dataSourceConfig.setMinConnections(1);
dataSourceConfig.setMaxConnections(25);
dataSourceConfig.setUsername("");
dataSourceConfig.setPassword("");
dataSourceConfig.setIsolationLevel(TransactionIsolation
.getLevel("READ_UNCOMMITTED"));
config.setName("default");
config.setDataSourceConfig(dataSourceConfig);
config.addClass(de.hapm.swu.data.ChunkInfo.class);
config.addClass(de.hapm.swu.data.ChunkInfoId.class);
config.addClass(de.hapm.swu.data.BlockTypeInfo.class);
config.addClass(de.hapm.swu.data.WorldInfo.class);
server = EbeanServerFactory.create(config);
visualizer = new ChunkInfoVisualizer();
visualizer.setProvider(new EbeanChunkInfoProvider(server));
chunkInfoPanel.setVisualizer(visualizer);
chunkInfoPanel.start();
}
});
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
chunkInfoPanel = new ChunkInfoVisualizerPanel();
frame.getContentPane().add(chunkInfoPanel, BorderLayout.CENTER);
}
示例4: configureDbConfig
import com.avaje.ebeaninternal.server.lib.sql.TransactionIsolation; //导入依赖的package包/类
public void configureDbConfig(ServerConfig config) {
DataSourceConfig ds = new DataSourceConfig();
ds.setDriver(configuration.getString("database.driver"));
ds.setUrl(configuration.getString("database.url"));
ds.setUsername(configuration.getString("database.username"));
ds.setPassword(configuration.getString("database.password"));
ds.setIsolationLevel(TransactionIsolation.getLevel(configuration.getString("database.isolation")));
if (ds.getDriver().contains("sqlite")) {
config.setDatabasePlatform(new SQLitePlatform());
config.getDatabasePlatform().getDbDdlSyntax().setIdentity("");
}
config.setDataSourceConfig(ds);
}