Package com.germinus.mashupbuilder.dao

Examples of com.germinus.mashupbuilder.dao.DAOException


            pstmt.setString(1, page.getJson());
            pstmt.setInt(2, page.getId());
            result = pstmt.executeUpdate();
            con.commit();
        } catch (SQLException ex) {
            throw new DAOException(ex);
        } finally {
            DBUtils.closeStatement(pstmt);
            DBUtils.closeConnection(con);
        }
        return result;
View Full Code Here


            pstmt = con.prepareStatement(query);
            pstmt.setInt(3, page.getId());
            result = pstmt.executeUpdate();
            con.commit();
        } catch (SQLException ex) {
            throw new DAOException(ex);
        } finally {
            DBUtils.closeStatement(pstmt);
            DBUtils.closeConnection(con);
        }
        return result;
View Full Code Here

                pageFound.setJson(rs.getString("json"));
            }

            rs.close();
        } catch (SQLException ex) {
            throw new DAOException(ex);
        } finally {

            DBUtils.closeStatement(pstmt);
            DBUtils.closeConnection(con);
        }
View Full Code Here

                pageList.add(page);
            }

            rs.close();
        } catch (SQLException ex) {
            throw new DAOException(ex);
        } finally {
            DBUtils.closeStatement(pstmt);
            DBUtils.closeConnection(con);
        }
View Full Code Here

        Connection con = null;
        try {
            Class.forName(driver);
            con = DriverManager.getConnection(url, user, passwd);
        } catch (ClassNotFoundException ex) {
            throw new DAOException("The JDBC Driver is not found", ex);
        } catch (SQLException ex) {
            throw new DAOException(ex);
        }
        return con;
    }
View Full Code Here

                    dbProperties.getProperty("connectorProvider",
                    "com.germinus.mashupbuilder.dao.connection.StandardConnectorProvider");
                Class provicerClass = Class.forName(provicerClassName);
                connectionProvider = (ConnectorProvider) provicerClass.newInstance();
            } catch (InstantiationException ex) {
                throw new DAOException("The Connection Provider cannot be instantiated", ex);
            } catch (IllegalAccessException ex) {
                throw new DAOException("The Connection Provider cannot be instantiated", ex);
            } catch (ClassNotFoundException ex) {
                throw new DAOException("The Connection Provider cannot be instantiated", ex);
            } catch (IOException ex) {
                throw new DAOException("Database configuration file is not found", ex);
            }
        }
        return connectionProvider;
    }
View Full Code Here

        try {
            String name = clazz.getSimpleName();
            Class<DAO> daoClass = (Class<DAO>) Class.forName(DAO_PCKG + "." + name + "JDBCDAOImpl");
            return daoClass.newInstance();
        } catch (Exception ex) {
            throw new DAOException("No DAO implementation for selected class", ex);
        }
    }
View Full Code Here

TOP

Related Classes of com.germinus.mashupbuilder.dao.DAOException

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.