use of org.pentaho.platform.plugin.services.connections.hql.HQLConnection in project pentaho-platform by pentaho.
the class HQLBaseComponent method getConnection.
protected IPentahoConnection getConnection(final File hbmCfgFile, final String[] classNames) {
IPentahoConnection conn = null;
try {
// $NON-NLS-1$
conn = (HQLConnection) PentahoConnectionFactory.getConnection("HQL", getSession(), this);
HQLConnection hconn = (HQLConnection) conn;
hconn.setConfigFile(hbmCfgFile);
hconn.setClassNames(classNames);
return conn;
} catch (Exception e) {
error(Messages.getInstance().getErrorString("HQLBaseComponent.ERROR_0009_COULD_NOT_ESTABLISH_CONNECTION", getActionName()), // $NON-NLS-1$
e);
}
return null;
}
Aggregations