2019-11-22 16:50:59 +01:00
|
|
|
package eu.dnetlib.uoamonitorservice.dao;
|
|
|
|
|
|
|
|
import eu.dnetlib.uoamonitorservice.entities.Category;
|
2024-03-06 00:48:31 +01:00
|
|
|
import org.springframework.data.mongodb.repository.MongoRepository;
|
|
|
|
import org.springframework.stereotype.Repository;
|
2019-11-22 16:50:59 +01:00
|
|
|
|
|
|
|
import java.util.List;
|
2024-03-08 19:55:51 +01:00
|
|
|
import java.util.Optional;
|
2019-11-22 16:50:59 +01:00
|
|
|
|
2024-03-06 00:48:31 +01:00
|
|
|
@Repository
|
|
|
|
public interface CategoryDAO extends MongoRepository<Category, String> {
|
2019-11-22 16:50:59 +01:00
|
|
|
List<Category> findAll();
|
2019-12-19 16:04:25 +01:00
|
|
|
List<Category> findByDefaultId(String DefaultId);
|
|
|
|
|
2024-03-12 23:20:55 +01:00
|
|
|
List<Category> findBySubCategoriesContaining(String subCategory);
|
2020-05-18 11:17:05 +02:00
|
|
|
|
2024-03-08 19:55:51 +01:00
|
|
|
Optional<Category> findById(String Id);
|
2019-11-22 16:50:59 +01:00
|
|
|
|
|
|
|
void delete(String Id);
|
|
|
|
|
|
|
|
Category save(Category category);
|
|
|
|
}
|