Oracle的包Package中可以有很多存储,可通过该包的总调入口在java中直接调用。
//java调用oracle的package代码
public boolean cal() throws java.lang.Exception {
CallableStatement cstmt = null;
String procedure = "{call G_IMPORT_CAL.g_entry(?,?,?) }";
cstmt = conn.prepareCall(procedure);
cstmt.setString(1,organkey);
cstmt.setString(2,this.getT18_task_fac().getGranularity());
cstmt.setString(3,this.getT18_task_fac().getStatisticdate());
cstmt.executeUpdate();
cstmt.close();
return true;
}