package com.ejie.m62fb.service;
import com.ejie.m62fb.dao.M62fbp20s0s00Dao;
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.M62fbp20s0s00;

/**
 * M62fbp20s0s00ServiceImpl generated by UDA, 06-nov-2012 10:00:26.
XXXX
 */

@Service(value = "m62fbp20s0s00Service")
public class M62fbp20s0s00ServiceImpl implements M62fbp20s0s00Service {

	@Autowired
	private M62fbp20s0s00Dao m62fbp20s0s00Dao;

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

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

	/**
	 * Finds a single row in the M62fbp20s0s00 table.
	 *
	 * @param m62fbp20s0s00 M62fbp20s0s00
	 * @return M62fbp20s0s00
	 */
	public M62fbp20s0s00 find(M62fbp20s0s00 m62fbp20s0s00) {
		return (M62fbp20s0s00) this.m62fbp20s0s00Dao.find(m62fbp20s0s00);
	}

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

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

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

