If it helps anyone, I successfully used the following:
Code:
<class name="Star" table="STARS">
<id name="id" column="id"/> <!-- Long -->
<property name="name"/> <!-- String -->
<property name="mass"/> <!-- Double -->
<loader query-ref="loadStarSP"/>
<sql-insert check="none" callable="true">{call USER1.createStarHB (?, ?, ?)}</sql-insert>
<sql-update check="none" callable="true">{call USER1.updateStarHB(?,?,?)}</sql-update>
<sql-delete check="none" callable="true">{call USER1.deleteStarHB(?)}</sql-delete>
</class>
<sql-query name="loadStarSP" callable="true">
<return class="Star"/>
{ ? = call USER1.loadStarHB(?)}
</sql-query>
<sql-query name="selectAllStars" callable="true" >
<return class="Star"/>
{ ? = call USER1.selectAllStars()}
</sql-query>
Code:
CREATE OR REPLACE FUNCTION loadStarHB( in_id in STARS.ID%type)
RETURN SYS_REFCURSOR AS
st_cursor SYS_REFCURSOR;
BEGIN
OPEN st_cursor FOR
SELECT * FROM STARS WHERE ID = in_id;
RETURN st_cursor;
END;
CREATE OR REPLACE PROCEDURE createStarHB(
in_name in STARS.NAME%type,
in_mass in STARS.MASS%type,
in_id in STARS.ID%type)
AS
BEGIN
INSERT INTO STARS (NAME, MASS, ID) VALUES ( in_name, in_mass, in_id );
END;
CREATE OR REPLACE PROCEDURE updateStarHB(
in_name in STARS.NAME%type,
in_mass in STARS.MASS%type,
in_id in STARS.ID%type)
AS
BEGIN
update STARS set
NAME=in_name, MASS=in_mass
where ID=in_id;
END;
CREATE OR REPLACE PROCEDURE deleteStarHB(
in_id in STARS.ID%type
) AS
BEGIN
delete from STARS where ID=in_id;
END;
CREATE OR REPLACE FUNCTION selectAllStars()
RETURN SYS_REFCURSOR
AS
st_cursor SYS_REFCURSOR;
BEGIN
OPEN st_cursor FOR
SELECT *
FROM STARS;
RETURN st_cursor;
END;