@Override public SimpleJdbcCall withProcedureName(String procedureName) { setProcedureName(procedureName); setFunction(false); return this; }
@Override public SimpleJdbcCall withFunctionName(String functionName) { setProcedureName(functionName); setFunction(true); return this; }
public SimpleJdbcCall withProcedureName(String procedureName) { setProcedureName(procedureName); setFunction(false); return this; }
public SimpleJdbcCall withFunctionName(String functionName) { setProcedureName(functionName); setFunction(true); return this; }
@Override public SimpleJdbcCall withProcedureName(String procedureName) { setProcedureName(procedureName); setFunction(false); return this; }
@Override public SimpleJdbcCall withFunctionName(String functionName) { setProcedureName(functionName); setFunction(true); return this; }
public JdbcInsertCommand(DataSource dataSource, Table table, List<Object[]> argsList) { this.jdbcCall = new SimpleJdbcCall(dataSource); this.jdbcCall.setProcedureName(SQLNaming.getInsertProcedureName(table.name, table.myPackage.model.project.databaseEngine)); this.table = table; this.argsList = argsList; }
public JdbcUpdateCommand(DataSource dataSource, Table table, List<Object[]> argsList) { this.jdbcCall = new SimpleJdbcCall(dataSource); this.jdbcCall.setProcedureName(SQLNaming.getUpdateProcedureName(table.name, table.myPackage.model.project.databaseEngine)); this.table = table; this.argsList = argsList; }
SimpleJdbcCall call = Util.getSimpleJdbcCallInstance(); call.setProcedureName("PROCED_CONDOMINIAL"); call.declareParameters( new SqlParameter("CONDOMINIO", Types.VARCHAR), new SqlParameter("BLOCO", Types.VARCHAR),, new SqlOutParameter("P_NUMERO", Types.NUMERIC), new SqlOutParameter("P_LOG", Types.VARCHAR)); Map<String, Object> parametros = new HashMap<String, Object>(); parametros.put("CONDOMINIO_IC", descricaoCondominio); parametros.put("BLOCO_IC", imovelCondominial.getBloco()); Map<String, Object> out = call.execute(parametros); BigDecimal chave = (BigDecimal) out.get("P_NUMERO"); imovelCondominial.setId(chave.longValue());