Package edu.indiana.dlib.metsnav.dao

Examples of edu.indiana.dlib.metsnav.dao.DAOException


        if (null != pageNum && !"".equals(pageNum)) {
            try {
                currentPageNum = Integer.valueOf(pageNum).intValue();
            } catch (NumberFormatException nfex) {
                log.error("The format of page number is incorrect: " + pageNum);
                throw new DAOException("The format of page number is incorrect: " + pageNum, nfex);
            }
        } else {
            currentPageNum = 1;
        }

        int total = navigateObject.getPhysicalStruct().size();
        if (currentPageNum < 1) {
            currentPageNum = 1;
        }
        if (currentPageNum > total) {
            currentPageNum = total;
        }

        AtomicItem page = getPageItem(currentPageNum);
        if (page == null) {
            throw new DAOException("The page number is incorrect: " + pageNum);
        }
        /*
         * page.setAltMessage(navigateObject.getDescription() + ": Page " +
         * currentPageNum + " of " + total);
         */
 
View Full Code Here

TOP

Related Classes of edu.indiana.dlib.metsnav.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.