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