Skip to content

Commit

Permalink
Merge branch 'feature/removeBadConferencePresenter' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasrob committed May 15, 2015
2 parents 5d11c3b + 8da0b5a commit 81788c0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 55 deletions.
58 changes: 27 additions & 31 deletions src/main/java/com/ioextendedgr/web/data/ConferenceSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
import java.sql.Timestamp;
import java.util.List;

import javax.persistence.*;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.PrePersist;
import javax.persistence.PreUpdate;
import javax.persistence.Table;

/**
* The persistent class for the conference_session database table.
Expand Down Expand Up @@ -44,11 +54,6 @@ public class ConferenceSession implements Serializable {
@JoinColumn(name = "conference_id")
private Conference conference;

// bi-directional many-to-one association to ConferenceSessionPresenter
@ManyToOne
@JoinColumn(name = "conference_session_presenter_id")
private ConferenceSessionPresenter conferenceSessionPresenter;

// bi-directional many-to-one association to ConferenceSessionType
@ManyToOne
@JoinColumn(name = "conference_session_type_id")
Expand Down Expand Up @@ -86,13 +91,13 @@ public void setCreateDttm(Timestamp createDttm) {
this.createDttm = createDttm;
}

public Integer getDuration() {
return this.duration;
}
public void setDuration(Integer duration) {
this.duration = duration;
}
public Integer getDuration() {
return this.duration;
}

public void setDuration(Integer duration) {
this.duration = duration;
}

public String getFullDesc() {
return this.fullDesc;
Expand Down Expand Up @@ -142,15 +147,6 @@ public void setConference(Conference conference) {
this.conference = conference;
}

public ConferenceSessionPresenter getConferenceSessionPresenter() {
return this.conferenceSessionPresenter;
}

public void setConferenceSessionPresenter(
ConferenceSessionPresenter conferenceSessionPresenter) {
this.conferenceSessionPresenter = conferenceSessionPresenter;
}

public ConferenceSessionType getConferenceSessionType() {
return this.conferenceSessionType;
}
Expand Down Expand Up @@ -219,15 +215,15 @@ public ConferenceSessionRegistration removeConferenceSessionRegistration(
return conferenceSessionRegistration;
}

@PreUpdate
public void onPreUpdate(){
this.lastUpdateDttm = new Timestamp(System.currentTimeMillis());
}
@PreUpdate
public void onPreUpdate() {
this.lastUpdateDttm = new Timestamp(System.currentTimeMillis());
}

@PrePersist
public void onPrePersist(){
this.createDttm = new Timestamp(System.currentTimeMillis());
this.lastUpdateDttm = new Timestamp(System.currentTimeMillis());
}
@PrePersist
public void onPrePersist() {
this.createDttm = new Timestamp(System.currentTimeMillis());
this.lastUpdateDttm = new Timestamp(System.currentTimeMillis());
}

}
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
package com.ioextendedgr.web.data;

import java.io.Serializable;

import javax.persistence.*;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
* The persistent class for the conference_session_presenter database table.
*
*/
@Entity
@Table(name="conference_session_presenter")
@Table(name = "conference_session_presenter")
public class ConferenceSessionPresenter implements Serializable {
private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

//bi-directional many-to-one association to ConferenceSession
@OneToMany(mappedBy="conferenceSessionPresenter")
// bi-directional many-to-one association to ConferenceSession
@OneToMany(mappedBy = "conferenceSessionPresenter")
private List<ConferenceSession> conferenceSessions;

//bi-directional many-to-one association to ConferenceSession
// bi-directional many-to-one association to ConferenceSession
@ManyToOne
@JoinColumn(name="conference_session_id")
@JoinColumn(name = "conference_session_id")
private ConferenceSession conferenceSession;

//bi-directional many-to-one association to Presenter
// bi-directional many-to-one association to Presenter
@ManyToOne
private Presenter presenter;

Expand All @@ -44,7 +49,6 @@ public void setId(Integer id) {
this.id = id;
}


public List<ConferenceSession> getConferenceSessions() {
return this.conferenceSessions;
}
Expand All @@ -53,20 +57,6 @@ public void setConferenceSessions(List<ConferenceSession> conferenceSessions) {
this.conferenceSessions = conferenceSessions;
}

public ConferenceSession addConferenceSession(ConferenceSession conferenceSession) {
getConferenceSessions().add(conferenceSession);
conferenceSession.setConferenceSessionPresenter(this);

return conferenceSession;
}

public ConferenceSession removeConferenceSession(ConferenceSession conferenceSession) {
getConferenceSessions().remove(conferenceSession);
conferenceSession.setConferenceSessionPresenter(null);

return conferenceSession;
}

public ConferenceSession getConferenceSession() {
return this.conferenceSession;
}
Expand Down

0 comments on commit 81788c0

Please sign in to comment.