All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ajaxjs.cms.ArticleService Maven / Gradle / Ivy

The newest version!
package com.ajaxjs.cms;

import java.util.List;
import java.util.Map;

import com.ajaxjs.cms.app.catelog.Catelogable;
import com.ajaxjs.config.ConfigService;
import com.ajaxjs.framework.BaseService;
import com.ajaxjs.framework.PageResult;
import com.ajaxjs.framework.Repository;
import com.ajaxjs.ioc.Bean;

@Bean(value = "ArticleService")
public class ArticleService extends BaseService> implements Catelogable> {
	ArticleDao dao = new Repository().bind(ArticleDao.class);

	{
		setUiName("文章");
		setShortName("article");
		setDao(dao);
	}

	@Override
	public PageResult> findPagedListByCatelogId(int catelogId, int start, int limit) {
		if (catelogId == 0)
			catelogId = getDomainCatelogId();
		return dao.findPagedListByCatelogId(catelogId, start, limit);
	}

	@Override
	public List> findListByCatelogId(int catelogId) {
		if (catelogId == 0)
			catelogId = getDomainCatelogId();
		return dao.findPagedListByCatelogId(catelogId, 0, 9999);
	}

	@Override
	public int getDomainCatelogId() {
		return ConfigService.getValueAsInt("data.articleCatalog_Id");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy