Package org.springframework.jdbc.support.rowset

Examples of org.springframework.jdbc.support.rowset.SqlRowSet


  public String getDescription() {
    return "DataBaseAvatarBase";
  }

  protected byte[] getBytes(String name) {
    SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql, name);
    Blob obj = null;
    if (rowSet.next()) {
      obj = (Blob) rowSet.getObject(1);
      try {
        return obj.getBytes(1L, (int) obj.length());
      } catch (SQLException e) {
        e.printStackTrace();
        return null;
View Full Code Here


    }

    public static void createTable(Controller controller, String tableName) {
        DataSource dataSource = DatabaseTestUtil.getDatabaseConfig(controller, "insertAccount").getDataSource();
        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
        SqlRowSet tables = jdbcTemplate.queryForRowSet("show tables");
        boolean tableExists = false;
        while (tables.next()) {
            if (tables.getString("TABLE_NAME").equals(tableName.toUpperCase())) {
                tableExists = true;
                break;
            }
        }
       
View Full Code Here

       
        ArrayList<String> tables = new ArrayList<String>();
       
        JdbcTemplate tplate = new JdbcTemplate(hsqlInMemory);
       
        SqlRowSet retr = tplate.queryForRowSet(
            "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES");
       
        while (retr.next()) {
            tables.add(retr.getString(1));
        }
       
        result.addObject("tables", tables);
   
    return result;
View Full Code Here

        boolean lockAcquired = false;
        if (this.platform == DatabasePlatform.SqlServer) {
           this.jdbcTemplate.execute("SET TRANSACTION ISOLATION LEVEL SERIALIZABLE");
        }
        try {
          final SqlRowSet rowSet = (SqlRowSet) this.jdbcTemplate.query(
              this.selectSql,
              new Object[] {this.applicationId},
              new SqlRowSetResultSetExtractor());
          final Timestamp expDate = getExpirationDate();
          if (!rowSet.next()) {
              // No row exists for this applicationId so create it.
              // Row is created with uniqueId of this instance
              // which indicates the lock is initially held by this instance.
              this.jdbcTemplate.update(this.createSql, new Object[] {this.applicationId, this.uniqueId, expDate});
              return true;
View Full Code Here

  public String getDescription() {
    return "DataBaseAvatarBase";
  }

  protected byte[] getBytes(String name) {
    SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql, name);
    Blob obj = null;
    if (rowSet.next()) {
      obj = (Blob) rowSet.getObject(1);
      try {
        return obj.getBytes(1L, (int) obj.length());
      } catch (SQLException e) {
        e.printStackTrace();
        return null;
View Full Code Here

  public String getDescription() {
    return "DataBaseAvatarBase";
  }

  protected byte[] getBytes(String name) {
    SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql, name);
    Blob obj = null;
    if (rowSet.next()) {
      obj = (Blob) rowSet.getObject(1);
      try {
        return obj.getBytes(1L, (int) obj.length());
      } catch (SQLException e) {
        e.printStackTrace();
        return null;
View Full Code Here

    query.append("  FROM DETT_INCASSI ");
    query.append("  WHERE DETT_INCASSI.FT07_COD_CONTO = :nr_mutuo ");
    query.append("  AND FT07_IBAN IS NOT NULL ");
    query.append(" ) ");
    Object[] args = { numeroMutuo, numeroMutuo };
    SqlRowSet rs = getJdbcTemplate().queryForRowSet(query.toString(), args);
    if (rs != null) {
      listaIban = new ArrayList<IndirizzoRata>(0);
      while( rs.next() ){
        IndirizzoRata ir = new IndirizzoRata();
        ir.setIban(rs.getString(1));
       
        listaIban.add(ir);
      }
    }
    return listaIban;
View Full Code Here

    query.append("order by  MUTUO.CA01_NR_MUTUO asc, MUTUOPAM.PF02_PGR_RATA asc ");

    Object[] args = {dataRiferimento, legalEntity, organizationUnit, numeroMutuo};
    int[] argsType = {Types.DATE, Types.VARCHAR, Types.VARCHAR, Types.NUMERIC};

    SqlRowSet rs = getJdbcTemplate().queryForRowSet(query.toString(), args, argsType);
    if (rs != null) {
      lista = new ArrayList<ControparteMutuo>(0);
      while( rs.next() ){
        ControparteMutuo cm = new ControparteMutuo();
        cm.setNumeroMutuo(rs.getLong(1));
        cm.setNumeroMutuoOrig(rs.getLong(2));
        cm.setDescrizioneMutuo(rs.getString(3));
        cm.setSaldo(rs.getDouble(4));
        cm.setImportoIncassato(rs.getDouble(5));
        cm.setDataValuta(rs.getDate(6));
        cm.setFlagAbbuono(rs.getString(7));
        cm.setTipoPam(rs.getString(8));
        cm.setNumeroPam(rs.getLong(9));
        cm.setProgressivoRata(rs.getInt(10));
        cm.setImportoRata(rs.getDouble(11));
        cm.setDataScadenzaRata(rs.getDate(12));
        cm.setProgressivoPartita(rs.getInt(13));
        cm.setMinimoRiga(rs.getInt(14));
        cm.setIncasso(rs.getString(15));
       
        lista.add(cm);
      }
    }
    return lista;
View Full Code Here

    query.append("AND MUTUOPAM.PF02_NR_PAM  = GET_NR_PAM(:nr_mutuo, sysdate)");
    query.append("ORDER BY MUTUOPAM.PF02_PGR_RATA ASC, MUTUOPAM.PF02_DT_SCAD_RATA ASC");
   
    Object[] args = {numeroMutuo, numeroMutuo};
   
    SqlRowSet rs = getJdbcTemplate().queryForRowSet(query.toString(), args);
    if( rs != null )
      pianoIas = new ArrayList<PianoIas>(0);
   
    while(rs.next()){
      PianoIas ias = new PianoIas();
      RataId rataId = new RataId();
      rataId.setNumeroPam(rs.getInt("PF02_NR_PAM"));
      rataId.setProgressivoRata(rs.getInt("PF02_PGR_RATA"));
      ias.setRataId(rataId);
      ias.setDataScadenzaRata(rs.getDate("PF02_DT_SCAD_RATA"));
      ias.setImportoRata(rs.getDouble("PF02_IMP_RATA"));
      ias.setQuotaCapitale(rs.getDouble("PF02_QUOTA_CAPITALE"));
      ias.setQuotaInteressi(rs.getDouble("PF02_QUOTA_INTERESSI"));
      ias.setQuotaCapitaleIas(rs.getDouble("PF02_QUOTA_CAPITALE_IAS"));
      ias.setQuotaInteressiIas(rs.getDouble("PF02_QUOTA_INTERESSI_IAS"));
      ias.setQuotaIndicizzo(rs.getDouble("PF02_QUOTA_INDICIZZO"));
      ias.setQuotaDietimi(rs.getDouble("PF02_QUOTA_DIETIMI"));
      ias.setQuotaCommissioni(rs.getDouble("PF02_QUOTA_COMMISSIONI"));
      ias.setQuotaSpese(rs.getDouble("PF02_QUOTA_SPESE"));
      ias.setQuotaCommissioniGestione(rs.getDouble("PF02_QUOTA_COMM_GEST"));
      ias.setProvvigioni(rs.getDouble("provvigioni"));
      ias.setMontanteResiduo(rs.getDouble("montante_res"));
      ias.setCapitaleResiduoIas(rs.getDouble("CAPITALE_IAS_RESIDUO"));
      ias.setCapitaleResiduo(rs.getDouble("CAPITALE_RESIDUO"));
      ias.setInteresseResiduoIas(rs.getDouble("INTERESSI_IAS_RESIDUI"));
      ias.setSpeseResidueIas(rs.getDouble("spese_ias_residue"));
     
      pianoIas.add(ias);
    }
   
    return pianoIas;
View Full Code Here

    query.append(" ( INDMUTUO.CA02_DT_FINE_VALIDITA IS NULL ) AND ");
    query.append(" ( INDMUTUO.CA02_NR_MUTUO = :numeroMutuo ) ");
   
    Object[] args = {numeroMutuo};
   
    SqlRowSet rs = getJdbcTemplate().queryForRowSet(query.toString(), args);
    if( rs != null )
      intestazione = new IntestazioneMutuoStampa();
   
    while(rs.next()){
     
      intestazione.setDescIndirizzo(rs.getString("dscindirizzo"));
      intestazione.setIndirizzoPresso(rs.getString("indpresso"));
      intestazione.setFrazione(rs.getString("frazione"));
      intestazione.setIndirizzo(rs.getString("indirizzo"));
      intestazione.setCap(rs.getString("CA02_CAP"));
      intestazione.setDescLocalita(rs.getString("dsclocalita"));
      intestazione.setCodiceProvincia(rs.getString("SV04_COD_PROVINCIA"));
      intestazione.setCodiceLocalita(rs.getString("CA02_COD_LOCALITA"));
      intestazione.setNumeroMutuo(rs.getLong("CA02_NR_MUTUO"));
      intestazione.setNumeroIndirizzo(rs.getLong("CA02_NR_INDIRIZZO"));
    }
   
    return intestazione;
  }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.support.rowset.SqlRowSet

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.