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