Saya menulis parameterType
&Map
contoh. Ini berfungsi pada data pengujian saya.
XML:
<update id="isPublicObject" parameterType="map" statementType="CALLABLE">
declare
v_bool BOOLEAN := TRUE;
begin
v_bool := PACKNAME.STF$IS_PUBLIC_OBJECT(#{id});
#{result,jdbcType=VARCHAR,mode=OUT} := CASE WHEN v_bool THEN 'TRUE' ELSE 'FALSE' END;
end;
</update>
Pemeta:
public interface PLSQLMapper {
public void isPublicObject(Map<String, Object> parameterMap);
}
Utama:
PLSQLMapper mapper = session.getMapper(PLSQLMapper.class);
Map<String, Object> parameterMap = new HashMap<String, Object>();
parameterMap.put("id", 1);
mapper.isPublicObject(parameterMap);
System.out.println("result: " + parameterMap.get("result"));