/** * TNTConcept Easy Enterprise Management by Autentia Real Bussiness Solution S.L. * Copyright (C) 2007 Autentia Real Bussiness Solution S.L. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.autentia.tnt.manager.bulletin; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.autentia.tnt.businessobject.BulletinBoardCategory; import com.autentia.tnt.dao.SortCriteria; import com.autentia.tnt.dao.hibernate.BulletinBoardCategoryDAO; import com.autentia.tnt.dao.search.BulletinBoardCategorySearch; import com.autentia.tnt.util.SpringUtils; public class BulletinBoardCategoryManager { /* BulletinBoardCategory - generated by stajanov (do not edit/delete) */ /** Logger */ private static final Log log = LogFactory.getLog(BulletinBoardCategoryManager.class); /** BulletinBoardCategory DAO **/ private BulletinBoardCategoryDAO bulletinBoardCategoryDAO; /** * Get default BulletinBoardCategoryManager as defined in Spring's configuration file. * @return the default singleton BulletinBoardCategoryManager */ public static BulletinBoardCategoryManager getDefault() { return (BulletinBoardCategoryManager)SpringUtils.getSpringBean("managerBulletinBoardCategory"); } /** * Empty constructor needed by CGLIB (Spring AOP) */ protected BulletinBoardCategoryManager() { } /** * Default constructor * @deprecated do not construct managers alone: use Spring's declared beans */ public BulletinBoardCategoryManager( BulletinBoardCategoryDAO bulletinBoardCategoryDAO ) { this.bulletinBoardCategoryDAO = bulletinBoardCategoryDAO; } /** * List bulletinBoardCategorys. * @param search search filter to apply * @param sort sorting criteria * @return the list of all bulletinBoardCategorys sorted by requested criterion */ public List<BulletinBoardCategory> getAllEntities(BulletinBoardCategorySearch search, SortCriteria sort){ return bulletinBoardCategoryDAO.search( search, sort ); } /** * Get bulletinBoardCategory by primary key. * @return bulletinBoardCategory selected by id. */ public BulletinBoardCategory getEntityById(int id){ return bulletinBoardCategoryDAO.getById(id); } /** * Insert bulletinBoardCategory. */ public void insertEntity(BulletinBoardCategory bulletinBoardCategory) { bulletinBoardCategoryDAO.insert(bulletinBoardCategory); } /** * Update bulletinBoardCategory. */ public void updateEntity(BulletinBoardCategory bulletinBoardCategory) { bulletinBoardCategoryDAO.update(bulletinBoardCategory); } /** * Delete bulletinBoardCategory. */ public void deleteEntity(BulletinBoardCategory bulletinBoardCategory) { bulletinBoardCategoryDAO.delete(bulletinBoardCategory); } /* BulletinBoardCategory - generated by stajanov (do not edit/delete) */ /** * Get configured public category * @return public category object */ public BulletinBoardCategory getPublicCategory() { return bulletinBoardCategoryDAO.getPublicCategory(); } }