Annotation Interface Out


@Target(PARAMETER) @Retention(RUNTIME) public @interface Out
Indicates an OUT parameter for stored functions or stored procedures.

The annotated parameter type must be Reference and it must be one of parameters of the method that is annotated with Function or Procedure.

 @Dao
 public interface EmployeeDao {

     @Procedure
     void updateSalary(@In Integer id, @Out Reference<BigDecimal> salary);
 }
 
 EmployeeDao dao = new EmployeeDaoImpl(config);
 Reference<BigDecimal> salaryRef = new Reference<BigDecimal>();
 dao.updateSalary(1, salaryRef);
 BigDecimal salary = salaryRef.get();