Commit f6dae56c by Juho Juopperi

jpa bugfixes

1 parent e5cf2027
...@@ -23,9 +23,9 @@ import javax.persistence.Version; ...@@ -23,9 +23,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "access_rights") @Table(name = "access_rights")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"), @NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findById", query = "SELECT a FROM AccessRight a WHERE a.id = :id"), @NamedQuery(name = "AccessRight.findById", query = "SELECT a FROM AccessRight a WHERE a.id = :id"),
@NamedQuery(name = "AccessRight.findByName", query = "SELECT a FROM AccessRight a WHERE a.name = :name") }) @NamedQuery(name = "AccessRight.findByName", query = "SELECT a FROM AccessRight a WHERE a.name = :name") })
public class AccessRight implements ModelInterface { public class AccessRight implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -38,18 +38,18 @@ public class AccessRight implements ModelInterface { ...@@ -38,18 +38,18 @@ public class AccessRight implements ModelInterface {
@Column(name = "right_description") @Column(name = "right_description")
private String description; private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "id") @OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRight")
private List<NewsGroup> newsGroups; private List<NewsGroup> newsGroups;
@OneToMany(mappedBy = "id") @OneToMany(mappedBy = "id")
private List<RoleRight> roleRights; private List<RoleRight> roleRights;
public Integer getId() { public Integer getId() {
return id; return id;
} }
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
@Version @Version
...@@ -60,79 +60,79 @@ public class AccessRight implements ModelInterface { ...@@ -60,79 +60,79 @@ public class AccessRight implements ModelInterface {
} }
public AccessRight(Integer accessRightsId) { public AccessRight(Integer accessRightsId) {
this.id = accessRightsId; this.id = accessRightsId;
} }
public AccessRight(Integer accessRightsId, String accessRight) { public AccessRight(Integer accessRightsId, String accessRight) {
this.id = accessRightsId; this.id = accessRightsId;
this.name = accessRight; this.name = accessRight;
} }
public String getAccessRight() { public String getAccessRight() {
return name; return name;
} }
public void setAccessRight(String accessRight) { public void setAccessRight(String accessRight) {
this.name = accessRight; this.name = accessRight;
} }
public List<NewsGroup> getNewsGroupList() { public List<NewsGroup> getNewsGroupList() {
return newsGroups; return newsGroups;
} }
public void setNewsGroupList(List<NewsGroup> newsGroupList) { public void setNewsGroupList(List<NewsGroup> newsGroupList) {
this.newsGroups = newsGroupList; this.newsGroups = newsGroupList;
} }
public List<RoleRight> getRoleRightList() { public List<RoleRight> getRoleRightList() {
return roleRights; return roleRights;
} }
public void setRoleRightList(List<RoleRight> roleRightList) { public void setRoleRightList(List<RoleRight> roleRightList) {
this.roleRights = roleRightList; this.roleRights = roleRightList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof AccessRight)) { if (!(object instanceof AccessRight)) {
return false; return false;
} }
AccessRight other = (AccessRight) object; AccessRight other = (AccessRight) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.AccessRight[id=" + id + "]"; return "fi.insomnia.bortal.model.AccessRight[id=" + id + "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
} }
...@@ -29,13 +29,13 @@ import javax.persistence.Version; ...@@ -29,13 +29,13 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "entries") @Table(name = "entries")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "CompoEntry.findAll", query = "SELECT c FROM CompoEntry c"), @NamedQuery(name = "CompoEntry.findAll", query = "SELECT c FROM CompoEntry c"),
@NamedQuery(name = "CompoEntry.findById", query = "SELECT c FROM CompoEntry c WHERE c.id = :id"), @NamedQuery(name = "CompoEntry.findById", query = "SELECT c FROM CompoEntry c WHERE c.id = :id"),
@NamedQuery(name = "CompoEntry.findByCreated", query = "SELECT c FROM CompoEntry c WHERE c.created = :created"), @NamedQuery(name = "CompoEntry.findByCreated", query = "SELECT c FROM CompoEntry c WHERE c.created = :created"),
@NamedQuery(name = "CompoEntry.findByName", query = "SELECT c FROM CompoEntry c WHERE c.name = :name"), @NamedQuery(name = "CompoEntry.findByName", query = "SELECT c FROM CompoEntry c WHERE c.name = :name"),
@NamedQuery(name = "CompoEntry.findByNotes", query = "SELECT c FROM CompoEntry c WHERE c.notes = :notes"), @NamedQuery(name = "CompoEntry.findByNotes", query = "SELECT c FROM CompoEntry c WHERE c.notes = :notes"),
@NamedQuery(name = "CompoEntry.findByScreenMessage", query = "SELECT c FROM CompoEntry c WHERE c.screenMessage = :screenMessage"), @NamedQuery(name = "CompoEntry.findByScreenMessage", query = "SELECT c FROM CompoEntry c WHERE c.screenMessage = :screenMessage"),
@NamedQuery(name = "CompoEntry.findBySort", query = "SELECT c FROM CompoEntry c WHERE c.sort = :sort") }) @NamedQuery(name = "CompoEntry.findBySort", query = "SELECT c FROM CompoEntry c WHERE c.sort = :sort") })
public class CompoEntry implements ModelInterface { public class CompoEntry implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -75,7 +75,7 @@ public class CompoEntry implements ModelInterface { ...@@ -75,7 +75,7 @@ public class CompoEntry implements ModelInterface {
@JoinColumn(name = "compos_id", referencedColumnName = "compos_id", nullable = false) @JoinColumn(name = "compos_id", referencedColumnName = "compos_id", nullable = false)
@ManyToOne(optional = false) @ManyToOne(optional = false)
private Compo composId; private Compo compo;
@JoinColumn(name = "creator", referencedColumnName = "users_id") @JoinColumn(name = "creator", referencedColumnName = "users_id")
@ManyToOne @ManyToOne
...@@ -86,156 +86,156 @@ public class CompoEntry implements ModelInterface { ...@@ -86,156 +86,156 @@ public class CompoEntry implements ModelInterface {
private int jpaVersionField; private int jpaVersionField;
public Integer getId() { public Integer getId() {
return id; return id;
} }
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public CompoEntry() { public CompoEntry() {
} }
public CompoEntry(Integer entriesId) { public CompoEntry(Integer entriesId) {
this.id = entriesId; this.id = entriesId;
} }
public CompoEntry(Integer entriesId, Date entryCreated, String entryName) { public CompoEntry(Integer entriesId, Date entryCreated, String entryName) {
this.id = entriesId; this.id = entriesId;
this.created = entryCreated; this.created = entryCreated;
this.name = entryName; this.name = entryName;
} }
public Date getCreated() { public Date getCreated() {
return created; return created;
} }
public void setCreated(Date entryCreated) { public void setCreated(Date entryCreated) {
this.created = entryCreated; this.created = entryCreated;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String entryName) { public void setName(String entryName) {
this.name = entryName; this.name = entryName;
} }
public String getNotes() { public String getNotes() {
return notes; return notes;
} }
public void setNotes(String notes) { public void setNotes(String notes) {
this.notes = notes; this.notes = notes;
} }
public String getScreenMessage() { public String getScreenMessage() {
return screenMessage; return screenMessage;
} }
public void setScreenMessage(String screenMessage) { public void setScreenMessage(String screenMessage) {
this.screenMessage = screenMessage; this.screenMessage = screenMessage;
} }
public Integer getSort() { public Integer getSort() {
return sort; return sort;
} }
public void setSort(Integer sort) { public void setSort(Integer sort) {
this.sort = sort; this.sort = sort;
} }
public List<Vote> getVotes() { public List<Vote> getVotes() {
return votes; return votes;
} }
public void setVotes(List<Vote> voteList) { public void setVotes(List<Vote> voteList) {
this.votes = voteList; this.votes = voteList;
} }
public List<CompoEntryFile> getFiles() { public List<CompoEntryFile> getFiles() {
return files; return files;
} }
public void setFiles(List<CompoEntryFile> compoEntryFileList) { public void setFiles(List<CompoEntryFile> compoEntryFileList) {
this.files = compoEntryFileList; this.files = compoEntryFileList;
} }
public List<CompoEntryParticipant> getParticipants() { public List<CompoEntryParticipant> getParticipants() {
return participants; return participants;
} }
public void setParticipants( public void setParticipants(
List<CompoEntryParticipant> compoEntryParticipantList) { List<CompoEntryParticipant> compoEntryParticipantList) {
this.participants = compoEntryParticipantList; this.participants = compoEntryParticipantList;
} }
public Compo getComposId() { public Compo getCompo() {
return composId; return compo;
} }
public void setComposId(Compo composId) { public void setCompo(Compo composId) {
this.composId = composId; this.compo = composId;
} }
public User getCreator() { public User getCreator() {
return creator; return creator;
} }
public void setCreator(User creator) { public void setCreator(User creator) {
this.creator = creator; this.creator = creator;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof CompoEntry)) { if (!(object instanceof CompoEntry)) {
return false; return false;
} }
CompoEntry other = (CompoEntry) object; CompoEntry other = (CompoEntry) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + id + "]"; return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + id + "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
public void setFinalPosition(Integer finalPosition) { public void setFinalPosition(Integer finalPosition) {
this.finalPosition = finalPosition; this.finalPosition = finalPosition;
} }
public Integer getFinalPosition() { public Integer getFinalPosition() {
return finalPosition; return finalPosition;
} }
public void setCurrentFile(CompoEntryFile currentFile) { public void setCurrentFile(CompoEntryFile currentFile) {
this.currentFile = currentFile; this.currentFile = currentFile;
} }
public CompoEntryFile getCurrentFile() { public CompoEntryFile getCurrentFile() {
return currentFile; return currentFile;
} }
} }
...@@ -14,6 +14,8 @@ import javax.persistence.ManyToOne; ...@@ -14,6 +14,8 @@ import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries; import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version; import javax.persistence.Version;
/** /**
...@@ -22,8 +24,8 @@ import javax.persistence.Version; ...@@ -22,8 +24,8 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "discount_instances") @Table(name = "discount_instances")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"), @NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"),
@NamedQuery(name = "DiscountInstance.findById", query = "SELECT d FROM DiscountInstance d WHERE d.id = :id") }) @NamedQuery(name = "DiscountInstance.findById", query = "SELECT d FROM DiscountInstance d WHERE d.id = :id") })
public class DiscountInstance implements ModelInterface { public class DiscountInstance implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -32,6 +34,7 @@ public class DiscountInstance implements ModelInterface { ...@@ -32,6 +34,7 @@ public class DiscountInstance implements ModelInterface {
private Integer id; private Integer id;
@Column(name = "create_time", nullable = false, columnDefinition = "timestamptz default now()") @Column(name = "create_time", nullable = false, columnDefinition = "timestamptz default now()")
@Temporal(TemporalType.TIMESTAMP)
private Date createTime = new Date(); private Date createTime = new Date();
@JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id") @JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id")
...@@ -54,66 +57,66 @@ public class DiscountInstance implements ModelInterface { ...@@ -54,66 +57,66 @@ public class DiscountInstance implements ModelInterface {
} }
public DiscountInstance(Integer discountsInstancesId) { public DiscountInstance(Integer discountsInstancesId) {
this.id = discountsInstancesId; this.id = discountsInstancesId;
} }
public AccountEvent getAccountEvent() { public AccountEvent getAccountEvent() {
return accountEvent; return accountEvent;
} }
public void setAccountEvent(AccountEvent accountEventsId) { public void setAccountEvent(AccountEvent accountEventsId) {
this.accountEvent = accountEventsId; this.accountEvent = accountEventsId;
} }
public Discount getDiscount() { public Discount getDiscount() {
return discount; return discount;
} }
public void setDiscount(Discount discountsId) { public void setDiscount(Discount discountsId) {
this.discount = discountsId; this.discount = discountsId;
} }
public User getUser() { public User getUser() {
return user; return user;
} }
public void setUser(User usersId) { public void setUser(User usersId) {
this.user = usersId; this.user = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof DiscountInstance)) { if (!(object instanceof DiscountInstance)) {
return false; return false;
} }
DiscountInstance other = (DiscountInstance) object; DiscountInstance other = (DiscountInstance) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId=" return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId="
+ getId() + "]"; + getId() + "]";
} }
/** /**
* @return the id * @return the id
*/ */
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -121,14 +124,14 @@ public class DiscountInstance implements ModelInterface { ...@@ -121,14 +124,14 @@ public class DiscountInstance implements ModelInterface {
* the id to set * the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
* @return the jpaVersionField * @return the jpaVersionField
*/ */
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -136,14 +139,14 @@ public class DiscountInstance implements ModelInterface { ...@@ -136,14 +139,14 @@ public class DiscountInstance implements ModelInterface {
* the jpaVersionField to set * the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
} }
...@@ -27,14 +27,14 @@ import javax.persistence.Version; ...@@ -27,14 +27,14 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "groups") @Table(name = "groups")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"), @NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"),
@NamedQuery(name = "PlaceGroup.findById", query = "SELECT p FROM PlaceGroup p WHERE p.id = :id"), @NamedQuery(name = "PlaceGroup.findById", query = "SELECT p FROM PlaceGroup p WHERE p.id = :id"),
@NamedQuery(name = "PlaceGroup.findByCreated", query = "SELECT p FROM PlaceGroup p WHERE p.created = :created"), @NamedQuery(name = "PlaceGroup.findByCreated", query = "SELECT p FROM PlaceGroup p WHERE p.created = :created"),
@NamedQuery(name = "PlaceGroup.findByEdited", query = "SELECT p FROM PlaceGroup p WHERE p.edited = :edited"), @NamedQuery(name = "PlaceGroup.findByEdited", query = "SELECT p FROM PlaceGroup p WHERE p.edited = :edited"),
@NamedQuery(name = "PlaceGroup.findByCode", query = "SELECT p FROM PlaceGroup p WHERE p.code = :code"), @NamedQuery(name = "PlaceGroup.findByCode", query = "SELECT p FROM PlaceGroup p WHERE p.code = :code"),
@NamedQuery(name = "PlaceGroup.findByName", query = "SELECT p FROM PlaceGroup p WHERE p.name = :name"), @NamedQuery(name = "PlaceGroup.findByName", query = "SELECT p FROM PlaceGroup p WHERE p.name = :name"),
@NamedQuery(name = "PlaceGroup.findByActive", query = "SELECT p FROM PlaceGroup p WHERE p.active = :active"), @NamedQuery(name = "PlaceGroup.findByActive", query = "SELECT p FROM PlaceGroup p WHERE p.active = :active"),
@NamedQuery(name = "PlaceGroup.findByDetails", query = "SELECT p FROM PlaceGroup p WHERE p.details = :details") }) @NamedQuery(name = "PlaceGroup.findByDetails", query = "SELECT p FROM PlaceGroup p WHERE p.details = :details") })
public class PlaceGroup implements ModelInterface { public class PlaceGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -80,121 +80,121 @@ public class PlaceGroup implements ModelInterface { ...@@ -80,121 +80,121 @@ public class PlaceGroup implements ModelInterface {
} }
public PlaceGroup(Integer groupsId) { public PlaceGroup(Integer groupsId) {
this.id = groupsId; this.id = groupsId;
} }
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited, public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited,
boolean groupActive) { boolean groupActive) {
this.id = groupsId; this.id = groupsId;
this.created = groupCreated; this.created = groupCreated;
this.edited = groupEdited; this.edited = groupEdited;
this.active = groupActive; this.active = groupActive;
} }
public Date getCreated() { public Date getCreated() {
return created; return created;
} }
public void setCreated(Date groupCreated) { public void setCreated(Date groupCreated) {
this.created = groupCreated; this.created = groupCreated;
} }
public Date getEdited() { public Date getEdited() {
return edited; return edited;
} }
public void setEdited(Date groupEdited) { public void setEdited(Date groupEdited) {
this.edited = groupEdited; this.edited = groupEdited;
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String groupCode) { public void setCode(String groupCode) {
this.code = groupCode; this.code = groupCode;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String groupName) { public void setName(String groupName) {
this.name = groupName; this.name = groupName;
} }
public boolean getActive() { public boolean getActive() {
return active; return active;
} }
public void setActive(boolean groupActive) { public void setActive(boolean groupActive) {
this.active = groupActive; this.active = groupActive;
} }
public String getDetails() { public String getDetails() {
return details; return details;
} }
public void setDetails(String groupDetails) { public void setDetails(String groupDetails) {
this.details = groupDetails; this.details = groupDetails;
} }
public User getCreator() { public User getCreator() {
return creator; return creator;
} }
public void setCreator(User groupCreator) { public void setCreator(User groupCreator) {
this.creator = groupCreator; this.creator = groupCreator;
} }
public List<GroupMembership> getMembers() { public List<GroupMembership> getMembers() {
return members; return members;
} }
public void setMembers(List<GroupMembership> groupMembershipList) { public void setMembers(List<GroupMembership> groupMembershipList) {
this.members = groupMembershipList; this.members = groupMembershipList;
} }
public List<Place> getPlaces() { public List<Place> getPlaces() {
return places; return places;
} }
public void setPlaces(List<Place> placeList) { public void setPlaces(List<Place> placeList) {
this.places = placeList; this.places = placeList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof PlaceGroup)) { if (!(object instanceof PlaceGroup)) {
return false; return false;
} }
PlaceGroup other = (PlaceGroup) object; PlaceGroup other = (PlaceGroup) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.PlaceGroup[id=" + getId() + "]"; return "fi.insomnia.bortal.model.PlaceGroup[id=" + getId() + "]";
} }
/** /**
* @return the id * @return the id
*/ */
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -202,14 +202,14 @@ public class PlaceGroup implements ModelInterface { ...@@ -202,14 +202,14 @@ public class PlaceGroup implements ModelInterface {
* the id to set * the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
* @return the jpaVersionField * @return the jpaVersionField
*/ */
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -217,6 +217,6 @@ public class PlaceGroup implements ModelInterface { ...@@ -217,6 +217,6 @@ public class PlaceGroup implements ModelInterface {
* the jpaVersionField to set * the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -104,7 +104,7 @@ public class User implements ModelInterface { ...@@ -104,7 +104,7 @@ public class User implements ModelInterface {
@ManyToMany(cascade = CascadeType.ALL, mappedBy = "users") @ManyToMany(cascade = CascadeType.ALL, mappedBy = "users")
private List<Role> roles; private List<Role> roles;
@OneToMany(mappedBy = "id") @OneToMany(mappedBy = "user")
private List<LogEntry> logEntryList; private List<LogEntry> logEntryList;
@OneToMany(mappedBy = "user") @OneToMany(mappedBy = "user")
...@@ -116,7 +116,7 @@ public class User implements ModelInterface { ...@@ -116,7 +116,7 @@ public class User implements ModelInterface {
@OneToMany(mappedBy = "creator") @OneToMany(mappedBy = "creator")
private List<CompoEntry> compoEntryList; private List<CompoEntry> compoEntryList;
@OneToMany(mappedBy = "groupCreator") @OneToMany(mappedBy = "creator")
private List<PlaceGroup> placeGroupList; private List<PlaceGroup> placeGroupList;
@OneToMany(mappedBy = "user") @OneToMany(mappedBy = "user")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!