chore: Rename type.java to Type.java and update references, add default constructor to dataset
This commit is contained in:
parent
14a9bbd56a
commit
09f685eef8
@ -1,6 +1,6 @@
|
||||
package de.uni_passau.fim.PADAS.group3.DataDash.model;
|
||||
|
||||
public enum type {
|
||||
public enum Type {
|
||||
DATASET,
|
||||
API
|
||||
}
|
@ -1,8 +1,24 @@
|
||||
package de.uni_passau.fim.PADAS.group3.DataDash.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.sql.Date;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface dataRepository extends JpaRepository<dataset, UUID>{
|
||||
|
||||
List<dataset> findByTitle(String title);
|
||||
List<dataset> findByTitleLike(String title);
|
||||
List<dataset> findByAuthorLike(String author);
|
||||
List<dataset> findByType(Type type);
|
||||
List<dataset> findByAutor(String author);
|
||||
List<dataset> findByAbstLike(String abst);
|
||||
List<dataset> findByDescriptionLike(String description);
|
||||
List<dataset> findByCategoriesContainingIgnoreCase(String[] categories);
|
||||
List<dataset> findByRaitingGreaterThan(float raiting);
|
||||
List<dataset> findByVotesGreaterThan(int votes);
|
||||
List<dataset> findByDateAfter(Date date);
|
||||
List<dataset> findByDateBefore(Date date);
|
||||
List<dataset> findByDateBetween(Date date1, Date date2);
|
||||
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@ public class dataset {
|
||||
private UUID id;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private type type;
|
||||
private Type type;
|
||||
|
||||
private String title;
|
||||
|
||||
@ -35,7 +35,7 @@ public class dataset {
|
||||
|
||||
private String[] Categories;
|
||||
|
||||
public dataset(String title, String abst, String description, String author, Date date, String[] categories, type type) {
|
||||
public dataset(String title, String abst, String description, String author, Date date, String[] categories, Type type) {
|
||||
|
||||
this.raiting = 0;
|
||||
this.votes = 0;
|
||||
@ -49,6 +49,9 @@ public class dataset {
|
||||
|
||||
}
|
||||
|
||||
public dataset() {
|
||||
}
|
||||
|
||||
|
||||
public String getAbst() {
|
||||
return abst;
|
||||
@ -82,7 +85,7 @@ public class dataset {
|
||||
return title;
|
||||
}
|
||||
|
||||
public type getType() {
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@ -114,7 +117,7 @@ public class dataset {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public void setType(type type) {
|
||||
public void setType(Type type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user