Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.ResultSetExtractor


    NamedParameterJdbcTemplate jt = new NamedParameterJdbcTemplate(mockDataSource);
    Map params = new HashMap();
    params.put("id", new SqlParameterValue(Types.DECIMAL, new Integer(1)));
    params.put("country", "UK");
    Customer cust = (Customer) jt.query(SELECT_NAMED_PARAMETERS, params, new ResultSetExtractor() {
      public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
        rs.next();
        Customer cust = new Customer();
        cust.setId(rs.getInt(COLUMN_NAMES[0]));
        cust.setForename(rs.getString(COLUMN_NAMES[1]));
View Full Code Here


        injector.getInstance(GroupService.class);
    }

    @Test(expected = com.google.inject.ConfigurationException.class)
    public void doesNotBindOthers() {
        ResultSetExtractor personService1 = injector.getInstance(ResultSetExtractor.class);
    }
View Full Code Here

    String query = "SELECT CA01_COD_SOCIETA_VEICOLO  FROM MUTUO WHERE CA01_NR_MUTUO = ?";
    String result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroMutuo);
    try {
      result = (String) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          String result = null;
          if (rs.next())
            result = rs.getString(1);
          return result;
View Full Code Here

    String query = "SELECT LGTB002_GRUPPO_COGE, LGTB002_MASTRO_COGE, LGTB002_CONTO_COGE FROM PRATICA WHERE LGTB002_PRATICA = ? AND LGTB002_DT_CHIUSURA is null";
    PianoDeiConti result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroPratica);
    try {
      result = (PianoDeiConti) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          PianoDeiConti result = new PianoDeiConti();
          if (rs.next()) {
            result.setCodiceGruppo(rs.getLong(1));
            result.setCodiceMastro(rs.getLong(2));
View Full Code Here

    Long result = null;
    Object[] bind = new Object[2];
    bind[0] = Long.valueOf(numeroMutuo);
    bind[1] = Integer.valueOf(codiceRapportoTraente);
    try {
      result = (Long) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          Long result = null;
          if (rs.next())
            result = rs.getLong(1);
          return result;
View Full Code Here

    String query = "SELECT PF01_COD_GRUPPO, PF01_COD_MASTRO, PF01_COD_CONTO FROM DATIFIN WHERE PF01_NR_MUTUO = ? AND PF01_DT_FINE_VALIDITA is null";
    PianoDeiConti result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroMutuo);
    try {
      result = (PianoDeiConti) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          PianoDeiConti result = new PianoDeiConti();
          if (rs.next()) {
            result.setCodiceGruppo(rs.getLong(1));
            result.setCodiceMastro(rs.getLong(2));
View Full Code Here

    query += "MUTUO.CA01_NR_MUTUO = ? ";
    PianoDeiConti result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroMutuo);
    try {
      result = (PianoDeiConti) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          PianoDeiConti result = new PianoDeiConti();
          if (rs.next()) {
            result.setCodiceGruppo(rs.getLong(1));
            result.setCodiceMastro(rs.getLong(2));
View Full Code Here

    String query = "SELECT CA02_DSC_INDIRIZZO FROM INDMUTUO WHERE CA02_NR_MUTUO = ? AND CA02_DT_FINE_VALIDITA is null";
    String result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroMutuo);
    try {
      result = (String) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          String result = null;
          if (rs.next())
            result = rs.getString(1);
          return result;
View Full Code Here

    Object[] bind = new Object[3];
    bind[0] = Long.valueOf(numeroMutuo);
    bind[1] = dataCfr;
    bind[2] = dataCfr;
    try {
      result = (String) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          String result = null;
          if (rs.next())
            result = rs.getString(1);
          return result;
View Full Code Here

    String query = "SELECT CA01_DSC_MUTUO FROM MUTUO WHERE CA01_NR_MUTUO = ?";
    String result = null;
    Object[] bind = new Object[1];
    bind[0] = Long.valueOf(numeroMutuo);
    try {
      result = (String) getJdbcTemplate().query(query, bind, new ResultSetExtractor() {
        public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
          String result = null;
          if (rs.next())
            result = rs.getString(1);
          return result;
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.ResultSetExtractor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.