📄 relationaldatabasefactory.java
字号:
package pl.sql;
import java.util.Properties;
import pl.PlException;
/**
* This class creates RelatinalDatabase instances.
*
* @author Artem Rudoy
*/
public class RelationalDatabaseFactory
{
public final static RelationalDatabase getRelationalDatabase(
String className, ClassLoader loader, Properties parameters) throws PlException
{
try
{
return getRelationalDatabase(Class.forName(className, true, loader), parameters);
}
catch(ClassNotFoundException e)
{
throw new PlException(e);
}
}
public final static RelationalDatabase getRelationalDatabase(
Class relationalDatabaseClass, Properties parameters) throws PlException
{
try
{
RelationalDatabase rd = (RelationalDatabase)relationalDatabaseClass.newInstance();
rd.init(parameters);
return rd;
}
catch(InstantiationException e)
{
throw new PlException(e);
}
catch(IllegalAccessException e)
{
throw new PlException(e);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -