added remaining entity classes/repositories
This commit is contained in:
parent
38bc2d4701
commit
f7ea304d40
2
.idea/checkstyle-idea.xml
generated
2
.idea/checkstyle-idea.xml
generated
@ -3,7 +3,7 @@
|
|||||||
<component name="CheckStyle-IDEA">
|
<component name="CheckStyle-IDEA">
|
||||||
<option name="configuration">
|
<option name="configuration">
|
||||||
<map>
|
<map>
|
||||||
<entry key="checkstyle-version" value="8.16" />
|
<entry key="checkstyle-version" value="8.13" />
|
||||||
<entry key="copy-libs" value="false" />
|
<entry key="copy-libs" value="false" />
|
||||||
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
|
||||||
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
|
||||||
|
|||||||
4
.idea/encodings.xml
generated
4
.idea/encodings.xml
generated
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
|
||||||
</project>
|
|
||||||
6
.idea/misc.xml
generated
6
.idea/misc.xml
generated
@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="JavaScriptSettings">
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<option name="languageLevel" value="ES6" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
</component>
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
11
.idea/modules.xml
generated
11
.idea/modules.xml
generated
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.iml" filepath="$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.main.iml" filepath="$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.main.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.test.iml" filepath="$PROJECT_DIR$/.idea/modules/de.hhn.labsw.labswp_2019_sose_geocaching.test.iml" />
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/labswp_2019_sose_geocaching.iml" filepath="$PROJECT_DIR$/.idea/labswp_2019_sose_geocaching.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package hhn.labsw.bugageocaching.entities;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table
|
||||||
|
public class CacheAccesDefinition {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
}
|
||||||
41
src/main/java/hhn/labsw/bugageocaching/entities/Team.java
Normal file
41
src/main/java/hhn/labsw/bugageocaching/entities/Team.java
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package hhn.labsw.bugageocaching.entities;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table
|
||||||
|
public class Team {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private int rankingPoints;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRankingPoints() {
|
||||||
|
return rankingPoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRankingPoints(int rankingPoints) {
|
||||||
|
this.rankingPoints = rankingPoints;
|
||||||
|
}
|
||||||
|
}
|
||||||
104
src/main/java/hhn/labsw/bugageocaching/entities/User.java
Normal file
104
src/main/java/hhn/labsw/bugageocaching/entities/User.java
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
package hhn.labsw.bugageocaching.entities;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table
|
||||||
|
public class User {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private String firstname;
|
||||||
|
private String lastname;
|
||||||
|
private String username;
|
||||||
|
private int rankingPointsSum;
|
||||||
|
private String discriminator; //should be Admin or Cacher
|
||||||
|
private String email;
|
||||||
|
private String password;
|
||||||
|
private String salt;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
public Team team;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFirstname() {
|
||||||
|
return firstname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstname(String firstname) {
|
||||||
|
this.firstname = firstname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastname() {
|
||||||
|
return lastname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastname(String lastname) {
|
||||||
|
this.lastname = lastname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRankingPointsSum() {
|
||||||
|
return rankingPointsSum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRankingPointsSum(int rankingPointsSum) {
|
||||||
|
this.rankingPointsSum = rankingPointsSum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscriminator() {
|
||||||
|
return discriminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscriminator(String discriminator) {
|
||||||
|
this.discriminator = discriminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSalt() {
|
||||||
|
return salt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSalt(String salt) {
|
||||||
|
this.salt = salt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Team getTeam() {
|
||||||
|
return team;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTeam(Team team) {
|
||||||
|
this.team = team;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package hhn.labsw.bugageocaching.entities;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table
|
||||||
|
public class bearbeitet {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
private User userID;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
private Cache cacheID;
|
||||||
|
|
||||||
|
@OneToOne
|
||||||
|
private CacheAccesDefinition cacheAccesDefinitionID;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public User getUserID() {
|
||||||
|
return userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserID(User userID) {
|
||||||
|
this.userID = userID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Cache getCacheID() {
|
||||||
|
return cacheID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCacheID(Cache cacheID) {
|
||||||
|
this.cacheID = cacheID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CacheAccesDefinition getCacheAccesDefinitionID() {
|
||||||
|
return cacheAccesDefinitionID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCacheAccesDefinitionID(CacheAccesDefinition cacheAccesDefinitionID) {
|
||||||
|
this.cacheAccesDefinitionID = cacheAccesDefinitionID;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package hhn.labsw.bugageocaching.repositories;
|
||||||
|
|
||||||
|
import hhn.labsw.bugageocaching.entities.CacheAccesDefinition;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface CacheAccesDefinitionRepository extends CrudRepository<CacheAccesDefinition, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package hhn.labsw.bugageocaching.repositories;
|
||||||
|
|
||||||
|
import hhn.labsw.bugageocaching.entities.Team;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface TeamRepository extends CrudRepository<Team, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package hhn.labsw.bugageocaching.repositories;
|
||||||
|
|
||||||
|
import hhn.labsw.bugageocaching.entities.User;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface UserRepository extends CrudRepository<User, Integer> {
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package hhn.labsw.bugageocaching.repositories;
|
||||||
|
|
||||||
|
import hhn.labsw.bugageocaching.entities.bearbeitet;
|
||||||
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
|
public interface bearbeitetRepository extends CrudRepository<bearbeitet, Integer> {
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user