/** * 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.account; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.autentia.tnt.businessobject.AccountEntryGroup; import com.autentia.tnt.dao.SortCriteria; import com.autentia.tnt.dao.hibernate.AccountEntryGroupDAO; import com.autentia.tnt.dao.search.AccountEntryGroupSearch; import com.autentia.tnt.util.SpringUtils; public class AccountEntryGroupManager { /* generated by stajanov (do not edit/delete) */ /** Logger */ private static final Log log = LogFactory.getLog(AccountEntryGroupManager.class); /** AccountEntryGroup DAO **/ private AccountEntryGroupDAO accountEntryGroupDAO; /** * Get default AccountEntryGroupManager as defined in Spring's configuration file. * @return the default singleton AccountEntryGroupManager */ public static AccountEntryGroupManager getDefault() { return (AccountEntryGroupManager)SpringUtils.getSpringBean("managerAccountEntryGroup"); } /** * Empty constructor needed by CGLIB (Spring AOP) */ protected AccountEntryGroupManager() { } /** * Default constructor * @deprecated do not construct managers alone: use Spring's declared beans */ public AccountEntryGroupManager( AccountEntryGroupDAO accountEntryGroupDAO ) { this.accountEntryGroupDAO = accountEntryGroupDAO; } /** * List accountEntryGroups. * @param search search filter to apply * @param sort sorting criteria * @return the list of all accountEntryGroups sorted by requested criterion */ public List<AccountEntryGroup> getAllEntities(AccountEntryGroupSearch search, SortCriteria sort){ return accountEntryGroupDAO.search( search, sort ); } /** * Get accountEntryGroup by primary key. * @return accountEntryGroup selected by id. */ public AccountEntryGroup getEntityById(int id){ return accountEntryGroupDAO.getById(id); } /** * Insert accountEntryGroup. */ public void insertEntity(AccountEntryGroup accountEntryGroup) { accountEntryGroupDAO.insert(accountEntryGroup); } /** * Update accountEntryGroup. */ public void updateEntity(AccountEntryGroup accountEntryGroup) { accountEntryGroupDAO.update(accountEntryGroup); } /** * Delete accountEntryGroup. */ public void deleteEntity(AccountEntryGroup accountEntryGroup) { accountEntryGroupDAO.delete(accountEntryGroup); } /* generated by stajanov (do not edit/delete) */ }