package com.jasamedika.medifirst2000.service; import java.util.List; import java.util.Map; import org.springframework.orm.jpa.JpaSystemException; import com.jasamedika.medifirst2000.exception.ServiceVOException; /** * View Object service * * @param * Model * @param * View Object * @param * Key * @author Roberto */ public interface BaseVoService { /** * Add model from VO * * @param vo * @return */ public V add(V vo) throws JpaSystemException, ServiceVOException; /** * Update model from vo * * @param vo * @return */ public V update(V vo) throws JpaSystemException, ServiceVOException; /** * Delete model by primary key * * @param key * @return */ public Boolean delete(K key) throws JpaSystemException; /** * Find by Id * * @param key * primary key * @return */ public V findById(K key) throws JpaSystemException; /** * Find all model to vo * * @return */ public List findAll() throws JpaSystemException; /** * Find all model to vo by page and limit and sort and dir parameter * * @return */ public Map findAllWithPageAndLimitAndSortByAndDirectionParameter( Integer page, Integer limit, String sort, String dir); }