Java tutorial
/* * Project: guahao-portal-biz-core * * File Created at 2013-12-6 * * Copyright 2012 Greenline.com Corporation Limited. * All rights reserved. * * This software is the confidential and proprietary information of * Greenline Company. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Greenline.com. */ package com.greenline.guahao.biz.manager.helpcenter.impl; import java.util.List; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import com.greenline.guahao.biz.dal.dao.helpcenter.HelpCenterDAO; import com.greenline.guahao.biz.dal.dao.helpcenter.dataobject.HelpCenterArticleDO; import com.greenline.guahao.biz.dal.dao.helpcenter.dataobject.HelpCenterCategoryDO; import com.greenline.guahao.biz.manager.helpcenter.HelpCenterManager; /** * @Type Help * @Desc * @author Tony * @date 2013-12-6 * @Version V1.0 */ public class HelpCenterManagerImpl implements HelpCenterManager { @Resource private HelpCenterDAO helpCenterDAO; @Override public List<HelpCenterCategoryDO> getAllCategory() { return helpCenterDAO.getAllCategory(); } @Override public List<HelpCenterArticleDO> getArticlesByCategoryId(String cateId) { if (StringUtils.isBlank(cateId)) { return null; } return helpCenterDAO.getArticlesByCategoryId(Long.valueOf(cateId)); } @Override public HelpCenterArticleDO getArticleById(String id) { if (StringUtils.isBlank(id)) { return null; } return helpCenterDAO.getArticleById(Long.valueOf(id)); } }