Package org.nimbustools.api.services.rm

Examples of org.nimbustools.api.services.rm.DoesNotExistException


    private String loadGroupOrEnsemble(String id)

            throws DoesNotExistException, WorkspaceDatabaseException {

        if (id == null) {
            throw new DoesNotExistException("id is null");
        }

        Connection c = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            c = getConnection();

            pstmt = c.prepareStatement(SQL_LOAD_GROUP_RESOURCE);
            pstmt.setString(1, id);
            rs = pstmt.executeQuery();
            if (rs == null || !rs.next()) {
                final String err = "resource with id = " + id + " not found";
                logger.error(err);
                throw new DoesNotExistException(err);
            } else {
                // could be null
                return rs.getString(1);
            }
        } catch(SQLException e) {
View Full Code Here

TOP

Related Classes of org.nimbustools.api.services.rm.DoesNotExistException

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.