Package com.openbravo.data.loader

Examples of com.openbravo.data.loader.DataResultSet


    public boolean executeSentence(BaseSentence sent, Object params) {
       
        CardLayout cl = (CardLayout)(getLayout());
       
        try {
            DataResultSet rs = sent.openExec(params);         
           
            if (rs.updateCount() < 0) {
                cl.show(this, "resultset");
               
                DataField [] df = rs.getDataField()

                SQLTableModel sqlresult = new SQLTableModel(df);

                while (rs.next()) {
                    sqlresult.addRow(rs);
                }           
                rs.close();

                sent.closeExec();

                m_jTableResult.setModel(sqlresult);
            } else {
                cl.show(this, "updatecount");
                m_txtResulltText.setText("Update count: " + Integer.toString(rs.updateCount()));
                m_txtResulltText.setCaretPosition(0);
           }
            return true;
           
        } catch (BasicException e) {
View Full Code Here


       
        try {
            BaseSentence sent = new MetaSentence(m_App.getSession(), "getTables"
                    , new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.STRING})
                    , new SerializerReadBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING}));
            DataResultSet rs = sent.openExec( new Object[] {null, null});         
            while (rs.next()) {
                Object[] aTable = (Object[]) rs.getCurrent();
                db.addTable((String) aTable[2]);
            }           
            rs.close();
            sent.closeExec();
           
            sent = new MetaSentence(m_App.getSession(), "getColumns"
                    , new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING})
                    , new SerializerReadBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING}));
            rs = sent.openExec(new Object[] {null, null, null});
            while (rs.next()) {
                Object[] aColumn = (Object[]) rs.getCurrent();
                SQLTable t = db.getTable((String) aColumn[2]);
                if (t != null) {
                    t.addColumn((String) aColumn[3]);
                }
            }           
            rs.close();
            sent.closeExec();
           
        } catch (BasicException e) {
            // e.printStackTrace();
        }       
View Full Code Here

    public boolean executeSentence(BaseSentence sent, Object params) {
       
        CardLayout cl = (CardLayout)(getLayout());
       
        try {
            DataResultSet rs = sent.openExec(params);         
           
            if (rs.updateCount() < 0) {
                cl.show(this, "resultset");
               
                DataField [] df = rs.getDataField()

                SQLTableModel sqlresult = new SQLTableModel(df);

                while (rs.next()) {
                    sqlresult.addRow(rs);
                }           
                rs.close();

                sent.closeExec();

                m_jTableResult.setModel(sqlresult);
            } else {
                cl.show(this, "updatecount");
                m_txtResulltText.setText("Update count: " + Integer.toString(rs.updateCount()));
                m_txtResulltText.setCaretPosition(0);
           }
            return true;
           
        } catch (BasicException e) {
View Full Code Here

       
        try {
            BaseSentence sent = new MetaSentence(m_App.getSession(), "getTables"
                    , new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.STRING})
                    , new SerializerReadBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING}));
            DataResultSet rs = sent.openExec( new Object[] {null, null});         
            while (rs.next()) {
                Object[] aTable = (Object[]) rs.getCurrent();
                db.addTable((String) aTable[2]);
            }           
            rs.close();
            sent.closeExec();
           
            sent = new MetaSentence(m_App.getSession(), "getColumns"
                    , new SerializerWriteBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING})
                    , new SerializerReadBasic(new Datas[] {Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING}));
            rs = sent.openExec(new Object[] {null, null, null});
            while (rs.next()) {
                Object[] aColumn = (Object[]) rs.getCurrent();
                SQLTable t = db.getTable((String) aColumn[2]);
                if (t != null) {
                    t.addColumn((String) aColumn[3]);
                }
            }           
            rs.close();
            sent.closeExec();
           
        } catch (BasicException e) {
            // e.printStackTrace();
        }       
View Full Code Here

TOP

Related Classes of com.openbravo.data.loader.DataResultSet

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.