Examples of ErrorList


Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param member
         * @return
         * @throws AppException
         */
        public ErrorList create(Member member) throws AppException {
                ErrorList errorList = new ErrorList();

                MemberSet memberSet = null;
                try {
                        memberSet = list(member.getMemberID());
                } catch (AppException ex) {
                        errorList.addError("[MemberManager::create]", ex.getMessage());
                }

                if (memberSet != null) {
                        if (memberSet.length() != 0) {
                                //means member code is exist, do not allow duplicate member code
                                errorList.addError(MEMBER_DUPLICATE_ENTRY);
                                return errorList;
                        }
                }

                try {
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                return errorList;
        }

        public ErrorList update(Member newCategory, Member oldCategory) {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                ErrorList errorList = new ErrorList();
                return errorList;
        }

        public ErrorList delete(Member member) throws AppException {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                ErrorList errorList = new ErrorList();
                return errorList;
        }

        public ErrorList delete(String memberID) throws AppException {
                ErrorList errorList = new ErrorList();
                return errorList;
        }
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param category
         * @return
         * @throws AppException
         */
        public ErrorList create(Category category) throws AppException {
                ErrorList errorList = new ErrorList();

                CategorySet categorySet = null;
                try {
                        categorySet = list(category.getCategoryCode());
                } catch (AppException ex) {
                        errorList.addError("[CategoryManager::create]", ex.getMessage());
                }

                if (categorySet != null) {
                        if (categorySet.length() != 0) {
                                //means category code is exist, do not allow duplicate category code
                                errorList.addError(CATEGORY_DUPLICATE_ENTRY);
                                return errorList;
                        }
                }
                categorySet = null;

View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param newCategory
         * @param oldCategory
         * @return
         */
        public ErrorList update(Category newCategory, Category oldCategory) throws AppException {
                ErrorList errorList = new ErrorList();

                //Retrieve all categories
                CategorySet categorySet = null;
                try {
                        categorySet = list();
                } catch (AppException ex) {
                        errorList.addError("[CategoryManager::create]", ex.getMessage());
                }

                if (categorySet != null) {
                        if (categorySet.length() > 0) {
                                //Filter out
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param category
         * @return
         * @throws AppException
         */
        public ErrorList delete(Category category) throws AppException {
                ErrorList errorList = new ErrorList();
                try {
                        String categoryCode = category.getCategoryCode();
                        errorList = delete(categoryCode);
                } catch (AppException ex) {
                        Logger.getLogger(CategoryFcd.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param categoryCode
         * @return
         * @throws sg.edu.nus.iss.se07.common.exceptions.AppException
         */
        public ErrorList delete(String categoryCode) throws AppException {
                ErrorList errorList = new ErrorList();

                //Retrieve all categories
                CategorySet categorySet = null;
                try {
                        categorySet = list();
                } catch (AppException ex) {
                        errorList.addError("[CategoryManager::create]", ex.getMessage());
                }

                if (categorySet != null) {
                        if (categorySet.length() > 0) {

View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

                categoryValidator = new CategoryValidator(dataObject);
                boolean valid = categoryValidator.validateCategory();
                if (valid) {
                        try {
                                categoryManager = new CategoryManager();
                                ErrorList errorList = categoryManager.create(dataObject);
                                for (int i = 0; i < errorList.length(); i++) {
                                        Logger.getLogger(CategoryTester.class.getName()).log(Level.INFO, errorList.getErrorMessage(i));
                                }
                        } catch (AppException ex) {
                                Logger.getLogger(CategoryTester.class.getName()).log(Level.SEVERE, null, ex);
                        }
                } else {
                        ErrorList errorList = categoryValidator.getErrors();
                        if (errorList.hasError()) {
                                for (int i = 0; i < errorList.length(); i++) {
                                        Logger.getLogger(CategoryTester.class.getName()).log(Level.SEVERE, errorList.getErrorMessage(i));
                                }
                        }
                }

                categoryManager = null;
View Full Code Here

Examples of sg.edu.nus.iss.se07.common.error.ErrorList

         * @param category
         * @return
         * @throws AppException
         */
        public ErrorList create(Category category) throws AppException {
                ErrorList errorList = new ErrorList();

                CategorySet categorySet = null;
                try {
                        categorySet = list(category.getCategoryCode());
                } catch (AppException ex) {
                        errorList.addError("[CategoryManager::create]", ex.getMessage());
                }

                if (categorySet != null) {
                        if (categorySet.length() != 0) {
                                //means category code is exist, do not allow duplicate category code
                                errorList.addError(CATEGORY_DUPLICATE_ENTRY);
                                return errorList;
                        }
                }

                try {
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.