counterserviceimpl.java

来自「JetSpeed-2技术资料 JetSpeed-2技术资料 JetSpeed-2」· Java 代码 · 共 132 行

JAVA
132
字号
/**
 * 
 */
package com.jdlssoft.portal.counter.service;

import java.util.List;

import com.jdlssoft.portal.counter.dao.CounterDAO;
import com.jdlssoft.portal.counter.entity.CounterDTO;
import com.nci.nportal.ufw.exception.ServiceException;
import com.nci.nportal.ufw.service.BaseService;

/**
 * @project:
 * @function:
 * @author jones
 * @email: hkan@nci.com.cn
 * @version:1.0
 */
public class CounterServiceImpl extends BaseService implements CounterService {

	private CounterDAO dao;
	
	public void setCounterDAO(CounterDAO dao){
		this.dao=dao;
	}
	
	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#creatCounter(com.nci.nportal.counter.entity.CounterDTO)
	 */
	public boolean creatCounter(CounterDTO dto) throws ServiceException {
		if(dto==null)
			return false;
		return dao.creatCounter(dto);
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#getAllCounters()
	 */
	public List getAllCounters() throws ServiceException {
		
		return dao.getAllCounters();
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#getAscCounters()
	 */
	public List getAscCounters() throws ServiceException {
		
		return dao.getAscCounters();
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#getCounter()
	 */
	public int getCounter() throws ServiceException {
		
		return dao.getCounter();
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#getCounter(java.lang.String)
	 */
	public CounterDTO getCounter(String counterId) throws ServiceException {
		if(counterId==null)
			return null;
		return dao.getCounter(counterId);
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#getDownCounters()
	 */
	public List getDownCounters() throws ServiceException {
		
		return dao.getDownCounters();
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#removeCounter(java.lang.String)
	 */
	public boolean removeCounter(String counterId) throws ServiceException {
		if(counterId==null)
			return false;
		return dao.removeCounter(counterId);
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#updateCounter(int)
	 */
	public boolean updateCounter(int counterNumber) throws ServiceException {
		
		return dao.updateCounter(counterNumber);
	}

	/* (non-Javadoc)
	 * @see com.nci.nportal.counter.service.CounterService#updateCounter(com.nci.nportal.counter.entity.CounterDTO)
	 */
	public boolean updateCounter(CounterDTO dto) throws ServiceException {
		if(dto==null)
			return false;
		return dao.updateCounter(dto);
	}

	public List getAllCountersNotDisabled() throws ServiceException {		
		return dao.getAllCountersNotDisabled();
	}

	public CounterDTO getCounterOfPortlet(String portletId) throws ServiceException {		
		return dao.getCounterOfPortlet(portletId);
	}

	public boolean updateCounterOfPortlet(String counterId, String portletId) throws ServiceException {
		
		return dao.updateCounterOfPortlet(counterId, portletId);
	}

	public boolean isAlreadyExist(CounterDTO dto) throws ServiceException {		
		return dao.isAlreadyExist(dto);
	}

	public boolean createCounterOfPortlet(String counterId, String portletId) throws ServiceException {
		
		return dao.createCounterOfPortlet(counterId, portletId);
	}

	public boolean isAlreadyExistCounterOfPortlet(String portletId) throws ServiceException {
		
		return dao.isAlreadyExistCounterOfPortlet(portletId);
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?