LinksServiceImp.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.service.imp;
- import java.util.*;
- import com.opensource.blog.dao.*;
- import com.opensource.blog.exception.BlogException;
- import com.opensource.blog.model.*;
- import com.opensource.blog.service.*;
- import org.apache.commons.logging.LogFactory;
- import org.apache.commons.logging.Log;
- public class LinksServiceImp
- implements LinksService {
- private static final Log logger = LogFactory.getLog(LinksServiceImp.class);
- private LinksDAO linksDAO;
- public LinksServiceImp() {
- }
- /**
- *
- * @param links Links
- * @return Links
- * @todo Implement this com.opensource.blog.service.LinksService method
- */
- public Links saveLinks(Links links) throws BlogException {
- try {
- return this.getLinksDAO().saveLinks(links);
- }
- catch (Exception ex) {
- logger.error(ex);
- throw new BlogException(ex);
- }
- }
- /**
- *
- * @param id long
- * @param blogID long
- * @return Links
- * @todo Implement this com.opensource.blog.service.LinksService method
- */
- public Links findLinksByID_BlogID(long id, long blogID) {
- return this.getLinksDAO().findLinksByID_BlogID(id, blogID);
- }
- /**
- *
- * @param blogID long
- * @param linkType int
- * @return int
- * @todo Implement this com.opensource.blog.service.LinksService method
- */
- public int getLinksCountByBlogID_Type(long blogID, int linkType) {
- return this.getLinksDAO().getLinksCountByBlogID_Type(blogID, linkType);
- }
- /**
- *
- * @param blogID long
- * @param linkType int
- * @return List
- * @todo Implement this com.opensource.blog.service.LinksService method
- */
- public List findLinksByBlogID_Type(long blogID, int linkType) {
- return this.getLinksDAO().findLinksByBlogID_Type(blogID, linkType);
- }
- /**
- *
- * @param links Links
- * @todo Implement this com.opensource.blog.service.LinksService method
- */
- public void removeLinks(Links links) throws BlogException {
- try {
- this.getLinksDAO().removeLinks(links);
- }
- catch (Exception ex) {
- logger.error(ex);
- throw new BlogException(ex);
- }
- }
- public LinksDAO getLinksDAO() {
- return linksDAO;
- }
- public void setLinksDAO(LinksDAO linksDAO) {
- this.linksDAO = linksDAO;
- }
- }