package com.ejie.t17i.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ejie.t17i.dao.PlantaDao;
import com.ejie.t17i.model.Planta;
import com.ejie.x38.dto.JQGridRequestDto;

/**
 * <p>
 * Implementaci&oacute;n de servicios de l&oacute:gica de negocio para acceder a
 * la tabla PLANTA de NORA
 * </p>
 * 
XXXX
 * @see com.ejie.t17i.model.Planta
 */
@Service(value = "plantaService")
public class PlantaServiceImpl implements PlantaService {

	@Autowired
	private PlantaDao plantaDao;

	/**
	 * {@inheritDoc}
	 */
	public Planta find(final Planta planta) {
		return (Planta) this.plantaDao.find(planta);
	}

	/**
	 * {@inheritDoc}
	 */
	public List<Planta> findAll(final Planta planta,
			final JQGridRequestDto jqGridRequestDto) {
		return (List<Planta>) this.plantaDao.findAll(planta, jqGridRequestDto);
	}

	/**
	 * {@inheritDoc}
	 */
	public Long findAllCount(final Planta planta) {
		return this.plantaDao.findAllCount(planta);
	}

	/**
	 * {@inheritDoc}
	 */
	public Long findAllCountEscalera(final Planta planta) {
		return this.plantaDao.findAllCountEscalera(planta);
	}

	/**
	 * {@inheritDoc}
	 */
	public Long findAllCountPiso(final Planta planta) {
		return this.plantaDao.findAllCountPiso(planta);
	}

	/**
	 * {@inheritDoc}
	 */
	public List<Planta> findAllLike(final Planta planta,
			final JQGridRequestDto jqGridRequestDto, final Boolean startsWith) {
		return (List<Planta>) this.plantaDao.findAllLike(planta,
				jqGridRequestDto, startsWith);
	}
	/**
	 * {@inheritDoc}
	 */
	public List<Planta> findAllLikeEscalera(final Planta planta,
			final JQGridRequestDto jqGridRequestDto, final Boolean startsWith) {
		return (List<Planta>) this.plantaDao.findAllLikeEscalera(planta,
				jqGridRequestDto, startsWith);
	}
}
