package com.ejie.m62fb.service;
import com.ejie.m62fb.dao.M62fbSituacionOfeDao;
import com.ejie.x38.dto.Pagination;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ejie.m62fb.model.M62fbSituacionOfe;

/**
 * M62fbSituacionOfeServiceImpl generated by UDA, 26-oct-2012 12:29:43.
XXXX
 */

@Service(value = "m62fbSituacionOfeService")
public class M62fbSituacionOfeServiceImpl implements M62fbSituacionOfeService {

	@Autowired
	private M62fbSituacionOfeDao m62fbSituacionOfeDao;

	/**
	 * Inserts a single row in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @return M62fbSituacionOfe
	 */
	@Transactional(rollbackFor = Throwable.class)
	public M62fbSituacionOfe add(M62fbSituacionOfe m62fbSituacionOfe) {
		return this.m62fbSituacionOfeDao.add(m62fbSituacionOfe);
	}

	/**
	 * Updates a single row in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @return M62fbSituacionOfe
	 */
	@Transactional(rollbackFor = Throwable.class)
	public M62fbSituacionOfe update(M62fbSituacionOfe m62fbSituacionOfe) {
		return this.m62fbSituacionOfeDao.update(m62fbSituacionOfe);
	 }

	/**
	 * Finds a single row in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @return M62fbSituacionOfe
	 */
	public M62fbSituacionOfe find(M62fbSituacionOfe m62fbSituacionOfe) {
		return (M62fbSituacionOfe) this.m62fbSituacionOfeDao.find(m62fbSituacionOfe);
	}

	/**
	 * Finds a List of rows in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @param pagination Pagination
	 * @return List
	 */
	public List<M62fbSituacionOfe> findAll(M62fbSituacionOfe m62fbSituacionOfe, Pagination pagination) {
		return (List<M62fbSituacionOfe>) this.m62fbSituacionOfeDao.findAll(m62fbSituacionOfe, pagination);
	}
    
	/**
	 * Counts rows in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @return Long
	 */
	public Long findAllCount(M62fbSituacionOfe m62fbSituacionOfe) {        
		return  this.m62fbSituacionOfeDao.findAllCount(m62fbSituacionOfe);
	}

	/**
	 * Finds rows in the M62fbSituacionOfe table using like.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @param pagination Pagination
	 * @param startsWith Boolean
	 * @return List
	 */
	public List<M62fbSituacionOfe> findAllLike(M62fbSituacionOfe m62fbSituacionOfe, Pagination pagination, Boolean startsWith) {
		return (List<M62fbSituacionOfe>) this.m62fbSituacionOfeDao.findAllLike(m62fbSituacionOfe, pagination, startsWith);
	}

	/**
	 * Counts rows in the M62fbSituacionOfe table using like.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @param startsWith Boolean
	 * @return Long
	 */
	public Long findAllLikeCount(M62fbSituacionOfe m62fbSituacionOfe, Boolean startsWith) {
		return this.m62fbSituacionOfeDao.findAllLikeCount(m62fbSituacionOfe, startsWith);
	}
	    
	/**
	 * Deletes a single row in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfe M62fbSituacionOfe
	 * @return
	 */
	@Transactional(rollbackFor = Throwable.class)
	public void remove(M62fbSituacionOfe m62fbSituacionOfe) {
		this.m62fbSituacionOfeDao.remove(m62fbSituacionOfe);
	}
	
	/**
	 * Deletes multiple rows in the M62fbSituacionOfe table.
	 *
	 * @param m62fbSituacionOfeList List
	 * @return
	 */
	@Transactional(rollbackFor = Throwable.class)
	public void removeMultiple(List<M62fbSituacionOfe> m62fbSituacionOfeList) {
		for (M62fbSituacionOfe  m62fbSituacionOfeAux:m62fbSituacionOfeList) {
			this.m62fbSituacionOfeDao.remove(m62fbSituacionOfeAux);
		}
	}
	
}

