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