You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
503 B
18 lines
503 B
package com.crawler.repository;
|
|
|
|
import com.crawler.model.Article;
|
|
import java.util.List;
|
|
import java.util.Optional;
|
|
|
|
public interface ArticleRepository {
|
|
void save(Article article);
|
|
void saveAll(List<Article> articles);
|
|
Optional<Article> findById(String id);
|
|
Optional<Article> findByUrl(String url);
|
|
List<Article> findAll();
|
|
List<Article> findBySource(String source);
|
|
void deleteById(String id);
|
|
void deleteAll();
|
|
int count();
|
|
boolean existsByUrl(String url);
|
|
}
|
|
|