finished events and teams
parent
9f5170c515
commit
c9a2fd793f
|
@ -0,0 +1,10 @@
|
|||
package ba.steleks.repository;
|
||||
|
||||
import ba.steleks.repository.model.EventType;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
public interface EventTypeJpaRepository extends PagingAndSortingRepository<EventType, Long> {
|
||||
}
|
|
@ -19,7 +19,9 @@ public class Event {
|
|||
private Timestamp dateTime;
|
||||
private int duration;
|
||||
private long createdById;
|
||||
private String eventType;
|
||||
@ManyToOne
|
||||
@JoinColumn
|
||||
private EventType eventType;
|
||||
|
||||
@ManyToMany
|
||||
@JoinColumn
|
||||
|
@ -83,11 +85,11 @@ public class Event {
|
|||
this.createdById = createdById;
|
||||
}
|
||||
|
||||
public String getEventType() {
|
||||
public EventType getEventType() {
|
||||
return eventType;
|
||||
}
|
||||
|
||||
public void setEventType(String eventType) {
|
||||
public void setEventType(EventType eventType) {
|
||||
this.eventType = eventType;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package ba.steleks.repository.model;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
@Entity
|
||||
public class EventType {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private long id;
|
||||
|
||||
private String category;
|
||||
private String eventDescription;
|
||||
|
||||
public EventType() {
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getEventDescription() {
|
||||
return eventDescription;
|
||||
}
|
||||
|
||||
public void setEventDescription(String eventDescription) {
|
||||
this.eventDescription = eventDescription;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package ba.steleks.repository;
|
||||
|
||||
import ba.steleks.repository.module.Participant;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
|
||||
public interface ParticipantJpaRepository extends PagingAndSortingRepository<Participant, Long> {
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package ba.steleks.repository;
|
||||
|
||||
import ba.steleks.repository.module.TeamCategory;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
public interface TeamCategoryJpaRepository extends PagingAndSortingRepository<TeamCategory, Long> {
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package ba.steleks.repository.module;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
@Entity
|
||||
public class Participant {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private long id;
|
||||
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
private String email;
|
||||
private String profilePicture;
|
||||
|
||||
public Participant() {
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long 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 getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getProfilePicture() {
|
||||
return profilePicture;
|
||||
}
|
||||
|
||||
public void setProfilePicture(String profilePicture) {
|
||||
this.profilePicture = profilePicture;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
package ba.steleks.repository.module;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.*;
|
||||
import javax.security.auth.Subject;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created by admin on 23/03/2017.
|
||||
|
@ -19,9 +17,21 @@ public class Team {
|
|||
private long subjectId;
|
||||
private int position;
|
||||
private double gradesOrPoints;
|
||||
private long contentId;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn
|
||||
private TeamCategory teamCategory;
|
||||
|
||||
private long eventId;
|
||||
|
||||
@ManyToMany
|
||||
@JoinColumn
|
||||
private Set<Participant> participantSet;
|
||||
|
||||
@ManyToMany
|
||||
@JoinColumn
|
||||
private Set<TeamMedia> teamMediaSet;
|
||||
|
||||
protected Team() {
|
||||
}
|
||||
|
||||
|
@ -57,12 +67,12 @@ public class Team {
|
|||
this.gradesOrPoints = gradesOrPoints;
|
||||
}
|
||||
|
||||
public long getContentId() {
|
||||
return contentId;
|
||||
public TeamCategory getContentId() {
|
||||
return teamCategory;
|
||||
}
|
||||
|
||||
public void setContentId(long contentId) {
|
||||
this.contentId = contentId;
|
||||
public void setContentId(TeamCategory contentId) {
|
||||
this.teamCategory = contentId;
|
||||
}
|
||||
|
||||
public long getEventId() {
|
||||
|
@ -73,5 +83,11 @@ public class Team {
|
|||
this.eventId = eventId;
|
||||
}
|
||||
|
||||
|
||||
public Set<Participant> getParticipantSet() {
|
||||
return participantSet;
|
||||
}
|
||||
|
||||
public void setParticipantSet(Set<Participant> participantSet) {
|
||||
this.participantSet = participantSet;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package ba.steleks.repository.module;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* Created by admin on 24/03/2017.
|
||||
*/
|
||||
@Entity
|
||||
public class TeamCategory {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
private long id;
|
||||
|
||||
private String type;
|
||||
|
||||
public TeamCategory() {
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
|
@ -13,9 +13,6 @@ public class TeamMedia {
|
|||
private long id;
|
||||
|
||||
private String contentUrl;
|
||||
@ManyToMany
|
||||
@JoinColumn
|
||||
private Set<TeamMedia> teamMediaSet;
|
||||
|
||||
|
||||
protected TeamMedia() {
|
||||
|
|
Reference in New Issue