Skip to content

Commit

Permalink
Contact now using spaceID
Browse files Browse the repository at this point in the history
  • Loading branch information
ithunt committed Nov 6, 2011
1 parent 71d55ee commit 445ab81
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions src/main/java/edu/rit/taskers/model/Contact.java
Expand Up @@ -17,7 +17,7 @@ public class Contact {
protected String bio;
protected String pictureURL;

protected Space space;
protected Integer spaceId;

public Contact() {

Expand Down Expand Up @@ -96,26 +96,14 @@ public void setPictureURL(String pictureURL) {
this.pictureURL = pictureURL;
}

@OneToOne(fetch = FetchType.EAGER, targetEntity = Space.class)
@JoinColumn(name = "SpaceID", nullable = true)
public Space getSpace() {
return space;
@Column(name = "SpaceID", nullable = true)
public Integer getSpaceId() {
return spaceId;
}

public void setSpace(Space space) {
this.space = space;
public void setSpaceId(Integer spaceId) {
this.spaceId = spaceId;
}

@Override
public String toString() {
return "Contact{" +
"id=" + id +
", name='" + name + '\'' +
", phone='" + phone + '\'' +
", email='" + email + '\'' +
", role='" + role + '\'' +
", bio='" + bio + '\'' +
", pictureURL='" + pictureURL + '\'' +
'}';
}

}

0 comments on commit 445ab81

Please sign in to comment.