提交 c4fffda5 authored 作者: Thomas Mueller's avatar Thomas Mueller

The H2DatabaseProvider for ActiveObjects is now included in the tools section.

上级 9c3816f0
/*
* Copyright 2004-2008 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: Michael Manske
*/
package net.java.ao.db;
import java.sql.Driver;
/**
* This is a database provider for ActiveObjects.
* See also https://activeobjects.dev.java.net .
* Usage:
* <pre>
* EntityManager manager = new EntityManager(new H2DatabaseProvider(
* dbProperties.getProperty("db.uri"),
* dbProperties.getProperty("db.username"),
* dbProperties.getProperty("db.password")));
* </pre>
*
* @author Michael Manske
* @author Thomas Mueller
*/
public class H2DatabaseProvider extends HSQLDatabaseProvider {
/**
* Create a new provider.
*
* @param uri the databae uri
* @param username the user name
* @param password the password
*/
public H2DatabaseProvider(String uri, String username, String password) {
super(uri, username, password);
}
public Class< ? extends Driver> getDriverClass() throws ClassNotFoundException {
return (Class< ? extends Driver>) Class.forName("org.h2.Driver");
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论