Merge remote-tracking branch 'origin/22-integrate-api-and-frontend' into 45-finalize-details-page
This commit is contained in:
@@ -6,6 +6,7 @@ import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.web.config.EnableSpringDataWebSupport;
|
||||
import org.springframework.data.web.config.EnableSpringDataWebSupport.PageSerializationMode;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.data.domain.Sort;
|
||||
@@ -14,9 +15,9 @@ import java.util.UUID;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@EnableSpringDataWebSupport(pageSerializationMode = PageSerializationMode.VIA_DTO)
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/datasets")
|
||||
@EnableSpringDataWebSupport
|
||||
public class DatasetController {
|
||||
@Autowired
|
||||
private DatasetService datasetService;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package de.uni_passau.fim.PADAS.group3.DataDash.Dataset;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@@ -1,9 +1,7 @@
|
||||
package de.uni_passau.fim.PADAS.group3.DataDash.Dataset;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import java.sql.Date;
|
||||
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -17,32 +15,6 @@ public interface dataRepository extends JpaRepository<Dataset, UUID> {
|
||||
|
||||
Dataset getDatasetById(UUID id);
|
||||
|
||||
List<Dataset> findByTitle(String title);
|
||||
|
||||
List<Dataset> findByTitleLike(String title);
|
||||
|
||||
List<Dataset> findByAuthorLike(String author);
|
||||
|
||||
List<Dataset> findByType(Type type);
|
||||
|
||||
List<Dataset> findByAuthor(String author);
|
||||
|
||||
List<Dataset> findByAbstLike(String abst);
|
||||
|
||||
List<Dataset> findByDescriptionLike(String description);
|
||||
|
||||
List<Dataset> findByRaitingGreaterThan(float raiting);
|
||||
|
||||
List<Dataset> findByVotesGreaterThan(int votes);
|
||||
|
||||
List<Dataset> findByDateAfter(Date date);
|
||||
|
||||
List<Dataset> findByDateBefore(Date date);
|
||||
|
||||
List<Dataset> findByCategorie(Category categorie);
|
||||
|
||||
List<Dataset> findByDateBetween(Date date1, Date date2);
|
||||
|
||||
@SuppressWarnings("null")
|
||||
Page<Dataset> findAll(Pageable pageable);
|
||||
|
||||
|
@@ -17,4 +17,4 @@ public interface CategoryRepository extends JpaRepository<Category, UUID>{
|
||||
@SuppressWarnings("null")
|
||||
Optional<Category> findById(UUID id);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user