1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/main/java/de/uapcore/lightpit/entities/Project.java Sun May 10 10:58:31 2020 +0200 1.3 @@ -0,0 +1,73 @@ 1.4 +package de.uapcore.lightpit.entities; 1.5 + 1.6 +import java.util.ArrayList; 1.7 +import java.util.List; 1.8 +import java.util.Objects; 1.9 + 1.10 +public class Project { 1.11 + 1.12 + private final int id; 1.13 + private String name; 1.14 + private String description; 1.15 + private String repoUrl; 1.16 + private User owner; 1.17 + 1.18 + private final List<Version> versions = new ArrayList<>(); 1.19 + 1.20 + public Project(int id) { 1.21 + this.id = id; 1.22 + } 1.23 + 1.24 + public int getId() { 1.25 + return id; 1.26 + } 1.27 + 1.28 + public String getName() { 1.29 + return name; 1.30 + } 1.31 + 1.32 + public void setName(String name) { 1.33 + this.name = name; 1.34 + } 1.35 + 1.36 + public String getDescription() { 1.37 + return description; 1.38 + } 1.39 + 1.40 + public void setDescription(String description) { 1.41 + this.description = description; 1.42 + } 1.43 + 1.44 + public String getRepoUrl() { 1.45 + return repoUrl; 1.46 + } 1.47 + 1.48 + public void setRepoUrl(String repoUrl) { 1.49 + this.repoUrl = repoUrl; 1.50 + } 1.51 + 1.52 + public User getOwner() { 1.53 + return owner; 1.54 + } 1.55 + 1.56 + public void setOwner(User owner) { 1.57 + this.owner = owner; 1.58 + } 1.59 + 1.60 + public List<Version> getVersions() { 1.61 + return versions; 1.62 + } 1.63 + 1.64 + @Override 1.65 + public boolean equals(Object o) { 1.66 + if (this == o) return true; 1.67 + if (o == null || getClass() != o.getClass()) return false; 1.68 + Project project = (Project) o; 1.69 + return id == project.id; 1.70 + } 1.71 + 1.72 + @Override 1.73 + public int hashCode() { 1.74 + return Objects.hash(id); 1.75 + } 1.76 +}