Examples of engageConnection()


Examples of org.sd_network.db.ConnectionPool.engageConnection()

    public static final String[] getSectorIDs(String fileID) {
        if (fileID == null)
            throw new NullPointerException("fileID");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sector_id FROM sector " +
                    "WHERE file_id=? " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

     * @throws  DBException
     *          �f�[�^�x�[�X�A�N�Z�X���ɃG���[�����������ꍇ�ɃX���[���܂��B
     */
    public static final long getUsedBytes() {
        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sum(size) as used_bytes FROM sector");
            ResultSet rs = stmt.executeQuery();
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

    private static final boolean exists(String sectorID) {
        if (sectorID == null)
            throw new NullPointerException("sectorID.");

        ConnectionPool pool = ConnectionPool.getInstance("vfssector");
        Connection con = pool.engageConnection(10);
        PreparedStatement stmt = null;
        try {
            stmt = con.prepareStatement(
                    "SELECT sector_id FROM sector WHERE sector_id=?");
            stmt.setString(1, sectorID);
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

            throw new IllegalArgumentException("fileID is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT count(*) as number_of_child " +
                    "FROM vfs_file " +
                    "WHERE parent_file_id=? AND owner_id=?");
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

            throw new IllegalArgumentException("fileID is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT file_id, name, type_id, parent_file_id, size, " +
                    " owner_id, created " +
                    "FROM vfs_file " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

            throw new IllegalArgumentException("fileName is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT file_id, name, type_id, parent_file_id, size, " +
                    " owner_id, created " +
                    "FROM vfs_file " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

            throw new IllegalArgumentException("parentFileID is empty.");
        if (ownerID == null || ownerID.trim().length() == 0)
            throw new IllegalArgumentException("ownerID is empty.");

        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            PreparedStatement stmt = con.prepareStatement(
                    "SELECT file_id, name, type_id, parent_file_id, size, " +
                    " owner_id, created " +
                    "FROM vfs_file " +
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

    }


    public static final void delete(String fileID, String ownerID) {
        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            con.setAutoCommit(true);
            delete(con, fileID, ownerID);
        } catch (SQLException e) {
            throw new DBException(e);
View Full Code Here

Examples of org.sd_network.db.ConnectionPool.engageConnection()

    private static final VfsFile create(String name, int typeID,
            String parentID, long size, String ownerID)
    {
        ConnectionPool pool = ConnectionPool.getInstance("vfs");
        Connection con = pool.engageConnection(10);
        try {
            con.setAutoCommit(true);
            return create(con, name, typeID, parentID, size, ownerID);
        } catch (SQLException e) {
            throw new DBException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.