Example usage for javax.sql.rowset CachedRowSet setDataSourceName

List of usage examples for javax.sql.rowset CachedRowSet setDataSourceName

Introduction

In this page you can find the example usage for javax.sql.rowset CachedRowSet setDataSourceName.

Prototype

void setDataSourceName(String name) throws SQLException;

Source Link

Document

Sets the data source name property for this RowSet object to the given String.

Usage

From source file:com.egt.core.db.xdp.RecursoCachedRowSetDataProvider.java

protected void setDataSourceCachedRowSet(String dataSource) throws ExcepcionAplicacion {
    Bitacora.trace(this.getClass(), "setDataSourceCachedRowSet", dataSource);
    if (StringUtils.isNotBlank(dataSource)) {
        CachedRowSet crs = this.getCachedRowSet();
        Bitacora.trace(this.getClass(), "setDataSourceCachedRowSet",
                crs == null ? "CachedRowSet=?" : "CachedRowSet=" + crs);
        if (crs != null && !dataSource.equalsIgnoreCase(crs.getDataSourceName())) {
            try {
                crs.setDataSourceName(dataSource); /* throws SQLException */
            } catch (SQLException ex) {
                TLC.getBitacora().fatal(ex);
                throw new ExcepcionAplicacion(ex);
            }// ww  w .  ja  va  2s.c o m
        }
    }
}

From source file:ips1ap101.lib.core.db.xdp.RecursoCachedRowSetDataProvider.java

protected void setDataSourceCachedRowSet(String dataSource) throws ExcepcionAplicacion {
    Bitacora.trace(getClass(), "setDataSourceCachedRowSet", dataSource);
    if (StringUtils.isNotBlank(dataSource)) {
        CachedRowSet crs = getCachedRowSet();
        Bitacora.trace(getClass(), "setDataSourceCachedRowSet",
                crs == null ? "CachedRowSet=?" : "CachedRowSet=" + crs);
        if (crs != null && !dataSource.equalsIgnoreCase(crs.getDataSourceName())) {
            try {
                crs.setDataSourceName(dataSource); /* throws SQLException */
            } catch (SQLException ex) {
                TLC.getBitacora().fatal(ex);
                throw new ExcepcionAplicacion(ex);
            }//from  w ww  .ja  v a2s.  c  o m
        }
    }
}