Example usage for javax.sql.rowset CachedRowSet getCommand

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

Introduction

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

Prototype

String getCommand();

Source Link

Document

Retrieves this RowSet object's command property.

Usage

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

public String getComandoCachedRowSet() {
    CachedRowSet crs = this.getCachedRowSet();
    return crs == null ? "" : crs.getCommand();
}

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

private void setComandoCachedRowSet(String comando, boolean refresh, long version) throws ExcepcionAplicacion {
    Bitacora.trace(this.getClass(), "setComandoCachedRowSet", comando, "refresh=" + refresh);
    if (StringUtils.isNotBlank(comando)) {
        CachedRowSet crs = this.getCachedRowSet();
        Bitacora.trace(this.getClass(), "setComandoCachedRowSet",
                crs == null ? "CachedRowSet=?" : "CachedRowSet=" + crs);
        if (crs != null) {
            try {
                InterpreteSql interprete = TLC.getInterpreteSql();
                if (interprete != null) {
                    String command = crs.getCommand();
                    String comandoSelect = interprete.getComandoSelect(comando,
                            this.getLimiteFilasFuncionSelect());
                    if (comandoSelect != null && !comandoSelect.equals(command)) {
                        crs.setCommand(comandoSelect); /* throws SQLException */
                        this.setComandoSelectAnsi(comando);
                        this.incrementaVersionComandoSelect();
                        this.setVersionComandoInsert(version);
                    }/*from  w w  w  . j ava  2 s.c  om*/
                    if (refresh) {
                        this.refresh(); /* throws DataProviderException */
                    }
                }
            } catch (SQLException | DataProviderException ex) {
                TLC.getBitacora().fatal(ex);
                throw new ExcepcionAplicacion(ex);
            }
        }
    }
}

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

public String getComandoCachedRowSet() {
    CachedRowSet crs = getCachedRowSet();
    return crs == null ? "" : crs.getCommand();
}

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

private void setComandoCachedRowSet(String comando, boolean refresh, long version) throws ExcepcionAplicacion {
    Bitacora.trace(getClass(), "setComandoCachedRowSet", comando, "refresh=" + refresh);
    if (StringUtils.isNotBlank(comando)) {
        CachedRowSet crs = getCachedRowSet();
        Bitacora.trace(getClass(), "setComandoCachedRowSet",
                crs == null ? "CachedRowSet=?" : "CachedRowSet=" + crs);
        if (crs != null) {
            try {
                InterpreteSql interprete = TLC.getInterpreteSql();
                if (interprete != null) {
                    String command = crs.getCommand();
                    String comandoSelect = interprete.getComandoSelect(comando, getLimiteFilasFuncionSelect());
                    if (comandoSelect != null && !comandoSelect.equals(command)) {
                        crs.setCommand(comandoSelect); /* throws SQLException */
                        setComandoSelectAnsi(comando);
                        incrementaVersionComandoSelect();
                        setVersionComandoInsert(version);
                    }// ww  w  .  j av  a  2 s  . com
                    if (refresh) {
                        refresh(); /* throws DataProviderException */
                    }
                }
            } catch (SQLException | DataProviderException ex) {
                TLC.getBitacora().fatal(ex);
                throw new ExcepcionAplicacion(ex);
            }
        }
    }
}