@@ -0,0 +1,2813 @@
+package es.unizar.smartcampuz.model;%0A%0Aimport java.io.Serializable;%0A%0A/**%0A * Generic repository for entities.%0A * Based on CRUDRepository and used to reverse dependencies.%0A */%0Apublic interface EntityRepository%3CT, ID extends Serializable%3E %7B%0A%0A        /**%0A         * Saves a given entity. Use the returned instance for further operations as the save operation might have changed the%0A         * entity instance completely.%0A         *%0A         * @param entity%0A         * @return the saved entity%0A         */%0A        %3CS extends T%3E S save(S entity);%0A%0A        /**%0A         * Saves all given entities.%0A         *%0A         * @param entities%0A         * @return the saved entities%0A         * @throws IllegalArgumentException in case the given entity is %7B@literal null%7D.%0A         */%0A        %3CS extends T%3E Iterable%3CS%3E save(Iterable%3CS%3E entities);%0A%0A        /**%0A         * Retrieves an entity by its id.%0A         *%0A         * @param id must not be %7B@literal null%7D.%0A         * @return the entity with the given id or %7B@literal null%7D if none found%0A         * @throws IllegalArgumentException if %7B@code id%7D is %7B@literal null%7D%0A         */%0A        T findOne(ID id);%0A%0A        /**%0A         * Returns whether an entity with the given id exists.%0A         *%0A         * @param id must not be %7B@literal null%7D.%0A         * @return true if an entity with the given id exists, %7B@literal false%7D otherwise%0A         * @throws IllegalArgumentException if %7B@code id%7D is %7B@literal null%7D%0A         */%0A        boolean exists(ID id);%0A%0A        /**%0A         * Returns all instances of the type.%0A         *%0A         * @return all entities%0A         */%0A        Iterable%3CT%3E findAll();%0A%0A        /**%0A         * Returns all instances of the type with the given IDs.%0A         *%0A         * @param ids%0A         * @return%0A         */%0A        Iterable%3CT%3E findAll(Iterable%3CID%3E ids);%0A%0A        /**%0A         * Returns the number of entities available.%0A         *%0A         * @return the number of entities%0A         */%0A        long count();%0A%0A        /**%0A         * Deletes the entity with the given id.%0A         *%0A         * @param id must not be %7B@literal null%7D.%0A         * @throws IllegalArgumentException in case the given %7B@code id%7D is %7B@literal null%7D%0A         */%0A        void delete(ID id);%0A%0A        /**%0A         * Deletes a given entity.%0A         *%0A         * @param entity%0A         * @throws IllegalArgumentException in case the given entity is %7B@literal null%7D.%0A         */%0A        void delete(T entity);%0A%0A        /**%0A         * Deletes the given entities.%0A         *%0A         * @param entities%0A         * @throws IllegalArgumentException in case the given %7B@link Iterable%7D is %7B@literal null%7D.%0A         */%0A        void delete(Iterable%3C? extends T%3E entities);%0A%0A        /**%0A         * Deletes all entities managed by the repository.%0A         */%0A        void deleteAll();%0A%0A%7D%0A

Create new EntityRepository in Model layer.