Package org.sd_network.db

Examples of org.sd_network.db.DBException


            long totalSectorNumber = 0;
            if (rs.next())
                totalSectorNumber = rs.getLong("total_sector_number");
            return totalSectorNumber;
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (stmt != null)
                    stmt.close();
                con.close();
View Full Code Here


            List<String> buf = new ArrayList<String>();
            while (rs.next())
                buf.add(rs.getString("sector_id"));
            return buf.toArray(new String[0]);
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (stmt != null)
                    stmt.close();
                con.close();
View Full Code Here

                    "SELECT sum(size) as used_bytes FROM sector");
            ResultSet rs = stmt.executeQuery();
            rs.next();
            return rs.getLong("used_bytes");
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (stmt != null)
                    stmt.close();
                con.close();
View Full Code Here

                    "SELECT sector_id FROM sector WHERE sector_id=?");
            stmt.setString(1, sectorID);
            ResultSet rs = stmt.executeQuery();
            return rs.next();
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (stmt != null)
                    stmt.close();
                con.close();
View Full Code Here

            ResultSet rs = stmt.executeQuery();
            VfsFile obj = null;
            rs.next();
            return rs.getInt("number_of_child");
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

            if (rs.next() ) {
                obj = getInstance(rs);
            }
            return obj;
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

            if (rs.next() ) {
                obj = getInstance(rs);
            }
            return obj;
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

            while (rs.next()) {
                objList.add(getInstance(rs));
            }
            return objList;
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

        Connection con = pool.engageConnection(10);
        try {
            con.setAutoCommit(true);
            delete(con, fileID, ownerID);
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

        Connection con = pool.engageConnection(10);
        try {
            con.setAutoCommit(true);
            return create(con, name, typeID, parentID, size, ownerID);
        } catch (SQLException e) {
            throw new DBException(e);
        } finally {
            try {
                if (con != null)
                    con.close();
            } catch (SQLException e) {
View Full Code Here

TOP

Related Classes of org.sd_network.db.DBException

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.