Ю
public class DBConnection {
public static Connection getConnection() {
try {
DelegatorInterface delegatorInterface = ComponentAccessor.getComponent(DelegatorInterface.class);
String helperName = delegatorInterface.getGroupHelperName("default");
return ConnectionFactory.getConnection(helperName);
} catch (Exception e) {
return null;
}
}
}
groovy:
Connection connection = DBConnection.getConnection()
def cur = new Sql(connection)
def out = cur.rows("select * from AO_AA9326_OPTION")
connection.close()

