. java- hibernate " " aspectJ.
(Oracle 10G) - , ORA-01722. , 100%.
, , unboxing . , jdbc unboxing ( ). jdbc, 1.4 1.6.
, , :
private void execute(final Long userId, final String rfc) {
Object[] args = new Object[]{ userId, rfc };
getJdbcTemplate().update("call schema.package.setUserAndRFC(?,?)", args);
}
, Statement :
private void execute(final Long userId, final String rfc) {
getJdbcTemplate().update(prepareStatement(userId.longValue(), rfc));
}
private PreparedStatementCreator prepareStatement(final long userId, final String rfc) {
return new PreparedStatementCreator() {
@Override
public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
PreparedStatement statement = con.prepareStatement("call schema.package.setUserAndRFC(?,?) ");
statement.setLong(1, userId);
statement.setString(2, rfc);
return statement;
}
};
}
, .
, , , . ( , .) , , " " - - . .
, , , 100%.