Birt调用存储过程总结 - 王显锋的日志 - 网易博客
1. 调用类似
PROCEDURE test_birt_stored_pkg.get_user_info(p_recordset OUT record_set);
record_set 被定义为cursor,如:type record_set is ref cursor;首先定义jdbc数据源,如图:
然后定义存储过程类型的数据集:在选择数据集类型的时候选择Sql stored procedure query,
下一步,选择所要调用的存储过程,选择存储过程的时候要注意格式:
{call 模式名.包名.过程名(arg1,arg2, ...)}
一定要有模式名,否则birt不能够自动探测到参数的个数和类型。
点击finish,birt会自动探测所有的输出列,并显示出来,并且可以对列进行编辑。
birt会自动检测参数个数和类型,并自动生成所有的参数:
定义参数的时候需要注意,所有参数可以用?占位符代替,比如调用类似如下过程的时候:
PROCEDURE get_user_info(p_emp_number in varchar2,
p_errcode out varchar2,
p_errmsg out varchar2,
p_recordset OUT record_set);
调用语句类似:
{callamstest.test_birt_stored_procedure.get_user_info(?,?,?,?)},然后birt可以自动生成对应的参数:
这时候提示输入参数应该有一个非空的默认值,双击对其进行编辑,然后可以关联到报表参数或者其他类型的参数。
然后ok,这样就可以对相应的列进行操作:
Spring JdbcTemplate方法详解 - - 博客频道 - CSDN.NET
- //1.查询一行数据并返回int型结果
- jdbcTemplate.queryForInt("select count(*) from test");
- //2. 查询一行数据并将该行数据转换为Map返回
- jdbcTemplate.queryForMap("select * from test where name='name5'");
- //3.查询一行任何类型的数据,最后一个参数指定返回结果类型
- jdbcTemplate.queryForObject("select count(*) from test", Integer.class);
- //4.查询一批数据,默认将每行数据转换为Map
- jdbcTemplate.queryForList("select * from test");
- //5.只查询一列数据列表,列类型是String类型,列名字是name
- jdbcTemplate.queryForList("
- select name from test where name=?", new Object[]{"name5"}, String.class);
- //6.查询一批数据,返回为SqlRowSet,类似于ResultSet,但不再绑定到连接上
- SqlRowSet rs = jdbcTemplate.queryForRowSet("select * from test");
HtmlUnit - Welcome to HtmlUnit
Features
- Support for the HTTP and HTTPS protocols
- Support for cookies
- Ability to specify whether failing responses from the server should throw exceptions or should be returned as pages of the appropriate type (based on content type)
- Support for submit methods POST and GET (as well as HEAD, DELETE, ...)
- Ability to customize the request headers being sent to the server
- Support for HTML responses
- Wrapper for HTML pages that provides easy access to all information contained inside them
- Support for submitting forms
- Support for clicking links
- Support for walking the DOM model of the HTML document
- Proxy server support
- Support for basic and NTLM authentication
- Excellent JavaScript support (see the JavaScript section below)
JavaScript Support
HtmlUnit provides excellent JavaScript support, simulating the behavior of the configured browser (Firefox or Internet Explorer). It uses the Rhino JavaScript engine for the core language (plus workarounds for some Rhino bugs) and provides the implementation for the objects specific to execution in a browser.
The unit tests of some well-known JavaScript libraries are included in HtmlUnit's own unit tests; based on these unit tests, the following libraries are known to work well with HtmlUnit:
- jQuery 1.2.6: Full support (see unit test here)
- MochiKit 1.4.1: Full support (see unit tests here)
- GWT 2.5.0: Full support (see unit test here)
- Sarissa 0.9.9.3: Full support (see unit test here)
- MooTools 1.2.1: Full support (see unit test here)
- Prototype 1.6.0: Very good support (see unit test here)
- Ext JS 2.2: Very good support (see unit test here)
- Dojo 1.0.2: Good support (see unit test here)
- YUI 2.3.0: Good support (see unit test here)
To disable JavaScript processing for one WebClient, call WebClient.setJavaScriptEnabled(false).
JavaScript code is executed just like in normal browsers when the page loads or when an handler is triggered. Additionally HtmlUnit provides the ability to inject code into an existing page via HtmlPage.executeJavascript(String yourJsCode).