package jp.agentec.sinaburocast.service; import java.util.List; import org.seasar.framework.container.annotation.tiger.Component; import org.seasar.framework.container.annotation.tiger.InstanceType; import jp.agentec.sinaburocast.entity.News; @Component(instance=InstanceType.SINGLETON) public class NewsService extends AbstractService<News> { public News findById(Integer newsId) { return select().id(newsId).getSingleResult(); } public List<News> findAllOrderById() { return select().orderBy("newsId asc").getResultList(); } }