<commit_before>/***********************************************
 * Filename       : CategoryServiceImpl.java
 * Copyright      : Copyright (c) 2014
 * Company        : Innovaee
 * Created        : 11/27/2014
 ************************************************/
package com.innovaee.eorder.service.impl;

import com.innovaee.eorder.dao.CategoryDao;
import com.innovaee.eorder.dao.DishDao;
import com.innovaee.eorder.entity.Category;
import com.innovaee.eorder.entity.Dish;
import com.innovaee.eorder.exception.CategoryNotFoundException;
import com.innovaee.eorder.exception.DuplicateNameException;
import com.innovaee.eorder.exception.InvalidPageSizeException;
import com.innovaee.eorder.exception.PageIndexOutOfBoundExcpeiton;
import com.innovaee.eorder.service.CategoryService;
import com.innovaee.eorder.support.Constants;
import com.innovaee.eorder.support.MessageUtil;
import com.innovaee.eorder.vo.CategoryVO;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Title: CategoryServiceImpl
 * @Description: 菜品分类服务实现类
 * 
 * @version V1.0
 */
public class CategoryServiceImpl implements CategoryService {

    /** 菜品分类数据访问实现类对象 */
    private CategoryDao categoryDao;

    /** 菜品数据访问实现类对象 */
    private DishDao dishDao;

    /**
     * 获取所有分类
     * 
     * @return 所有分类列表
     */
    @Override
    public List<Category> getAllCategories() {
        return categoryDao.loadAll();<commit_msg>correct default category showing up issue<commit_after>/***********************************************
 * Filename       : CategoryServiceImpl.java
 * Copyright      : Copyright (c) 2014
 * Company        : Innovaee
 * Created        : 11/27/2014
 ************************************************/
package com.innovaee.eorder.service.impl;

import com.innovaee.eorder.dao.CategoryDao;
import com.innovaee.eorder.dao.DishDao;
import com.innovaee.eorder.entity.Category;
import com.innovaee.eorder.entity.Dish;
import com.innovaee.eorder.exception.CategoryNotFoundException;
import com.innovaee.eorder.exception.DuplicateNameException;
import com.innovaee.eorder.exception.InvalidPageSizeException;
import com.innovaee.eorder.exception.PageIndexOutOfBoundExcpeiton;
import com.innovaee.eorder.service.CategoryService;
import com.innovaee.eorder.support.Constants;
import com.innovaee.eorder.support.MessageUtil;
import com.innovaee.eorder.vo.CategoryVO;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Title: CategoryServiceImpl
 * @Description: 菜品分类服务实现类
 * 
 * @version V1.0
 */
public class CategoryServiceImpl implements CategoryService {

    /** 菜品分类数据访问实现类对象 */
    private CategoryDao categoryDao;

    /** 菜品数据访问实现类对象 */
    private DishDao dishDao;

    /**
     * 获取所有分类
     * 
     * @return 所有分类列表
     */
    @Override
    public List<Category> getAllCategories() {
        List<Category> categories = categoryDao.loadAll();
        
        for(Category category : categories) {
            if (category.getName().equals(Constants.DEFAULT_CATEGORY)) {
                categories.remove(category);
            }
        }
        
        return categories;
{'fraction_non_alphanumeric': 0.15103244837758112, 'fraction_numerical': 0.008259587020648967, 'mean_word_length': 4.068759342301943, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5715517', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1061, 'n_words': 163}