|
@@ -6,6 +6,7 @@ import org.springframework.data.elasticsearch.repository.ElasticsearchRepository
|
|
|
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
|
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Optional;
|
|
import java.util.Optional;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
|
@@ -20,13 +21,13 @@ import java.util.Set;
|
|
|
@RepositoryRestResource(path = "tq")
|
|
@RepositoryRestResource(path = "tq")
|
|
|
public interface TQRepository extends ElasticsearchRepository<ChoiceQuestion,Integer> {
|
|
public interface TQRepository extends ElasticsearchRepository<ChoiceQuestion,Integer> {
|
|
|
Page<ChoiceQuestion> findAll(Pageable pageable);
|
|
Page<ChoiceQuestion> findAll(Pageable pageable);
|
|
|
|
|
+ Page<ChoiceQuestion> findByIdIn(Collection<Integer> id, Pageable pageable);
|
|
|
Page<ChoiceQuestion> findAllByIdBetween( Pageable pageable,Integer start, Integer end);
|
|
Page<ChoiceQuestion> findAllByIdBetween( Pageable pageable,Integer start, Integer end);
|
|
|
Page<ChoiceQuestion> findByStemLike(String content,Pageable pageable);
|
|
Page<ChoiceQuestion> findByStemLike(String content,Pageable pageable);
|
|
|
int countAllByIdBetween(Integer id, Integer id2);
|
|
int countAllByIdBetween(Integer id, Integer id2);
|
|
|
int deleteAllByIdBetween(Integer id, Integer id2);
|
|
int deleteAllByIdBetween(Integer id, Integer id2);
|
|
|
void deleteById(Integer integer);
|
|
void deleteById(Integer integer);
|
|
|
Optional<ChoiceQuestion> findById(Integer integer);
|
|
Optional<ChoiceQuestion> findById(Integer integer);
|
|
|
-
|
|
|
|
|
Page<ChoiceQuestion> findAllByTagsContaining(String tag, Pageable pageable);
|
|
Page<ChoiceQuestion> findAllByTagsContaining(String tag, Pageable pageable);
|
|
|
Page<ChoiceQuestion> findAllByTagsNotIn(Collection<String> tags, Pageable pageable);
|
|
Page<ChoiceQuestion> findAllByTagsNotIn(Collection<String> tags, Pageable pageable);
|
|
|
@Override
|
|
@Override
|