Commit 2773b427 by jkj

formatting

git-svn-id: https://dev.intra.insomnia.fi/svn/trunk@55 8cf89bec-f6a3-4178-919f-364fb3449fe5
1 parent 193ca7f8
Showing with 357 additions and 319 deletions
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -24,14 +22,13 @@ import javax.persistence.Version; ...@@ -24,14 +22,13 @@ 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.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"), @NamedQuery(name = "AccessRight.findByAccessRightsId", query = "SELECT a FROM AccessRight a WHERE a.accessRightsId = :accessRightsId"),
@NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") }) @NamedQuery(name = "AccessRight.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements ModelInterface { public class AccessRight implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "access_rights_id", nullable = false) @Column(name = "access_rights_id", nullable = false)
private Integer id; private Integer id;
......
...@@ -98,7 +98,6 @@ public class AccountEvent implements ModelInterface { ...@@ -98,7 +98,6 @@ public class AccountEvent implements ModelInterface {
this.eventTime = eventTime; this.eventTime = eventTime;
} }
public BigInteger getUnitPrice() { public BigInteger getUnitPrice() {
return unitPrice; return unitPrice;
} }
...@@ -188,8 +187,7 @@ public class AccountEvent implements ModelInterface { ...@@ -188,8 +187,7 @@ public class AccountEvent implements ModelInterface {
} }
AccountEvent other = (AccountEvent) object; AccountEvent other = (AccountEvent) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id || (this.id != null && !this.id.equals(other.id))) {
.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -197,7 +195,8 @@ public class AccountEvent implements ModelInterface { ...@@ -197,7 +195,8 @@ public class AccountEvent implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.AccountEvent[accountEventsId=" + id + "]"; return "fi.insomnia.bortal.model.AccountEvent[accountEventsId=" + id
+ "]";
} }
} }
...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model; ...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -27,18 +26,17 @@ import javax.persistence.Version; ...@@ -27,18 +26,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "bills") @Table(name = "bills")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"), @NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"), @NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE b.billsId = :billsId"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"), @NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"), @NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"), @NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes")}) @NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
public class Bill implements ModelInterface { public class Bill implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "bills_id", nullable = false) @Column(name = "bills_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "due_date") @Column(name = "due_date")
...@@ -72,7 +70,6 @@ public class Bill implements ModelInterface { ...@@ -72,7 +70,6 @@ public class Bill implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Bill() { public Bill() {
} }
...@@ -145,12 +142,14 @@ public class Bill implements ModelInterface { ...@@ -145,12 +142,14 @@ public class Bill implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) { if (!(object instanceof Bill)) {
return false; return false;
} }
Bill other = (Bill) object; Bill other = (Bill) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
......
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -24,17 +21,16 @@ import javax.persistence.Version; ...@@ -24,17 +21,16 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "bill_lines") @Table(name = "bill_lines")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "BillLine.findAll", query = "SELECT b FROM BillLine b"), @NamedQuery(name = "BillLine.findAll", query = "SELECT b FROM BillLine b"),
@NamedQuery(name = "BillLine.findByBillLinesId", query = "SELECT b FROM BillLine b WHERE b.billLinesId = :billLinesId"), @NamedQuery(name = "BillLine.findByBillLinesId", query = "SELECT b FROM BillLine b WHERE b.billLinesId = :billLinesId"),
@NamedQuery(name = "BillLine.findByProduct", query = "SELECT b FROM BillLine b WHERE b.product = :product"), @NamedQuery(name = "BillLine.findByProduct", query = "SELECT b FROM BillLine b WHERE b.product = :product"),
@NamedQuery(name = "BillLine.findByUnits", query = "SELECT b FROM BillLine b WHERE b.units = :units"), @NamedQuery(name = "BillLine.findByUnits", query = "SELECT b FROM BillLine b WHERE b.units = :units"),
@NamedQuery(name = "BillLine.findByUnitPrice", query = "SELECT b FROM BillLine b WHERE b.unitPrice = :unitPrice"), @NamedQuery(name = "BillLine.findByUnitPrice", query = "SELECT b FROM BillLine b WHERE b.unitPrice = :unitPrice"),
@NamedQuery(name = "BillLine.findByVat", query = "SELECT b FROM BillLine b WHERE b.vat = :vat")}) @NamedQuery(name = "BillLine.findByVat", query = "SELECT b FROM BillLine b WHERE b.vat = :vat") })
public class BillLine implements ModelInterface { public class BillLine implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "bill_lines_id", nullable = false) @Column(name = "bill_lines_id", nullable = false)
private Integer id; private Integer id;
...@@ -57,7 +53,6 @@ public class BillLine implements ModelInterface { ...@@ -57,7 +53,6 @@ public class BillLine implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public BillLine() { public BillLine() {
} }
...@@ -65,7 +60,8 @@ public class BillLine implements ModelInterface { ...@@ -65,7 +60,8 @@ public class BillLine implements ModelInterface {
this.id = billLinesId; this.id = billLinesId;
} }
public BillLine(Integer billLinesId, String product, int units, float unitPrice, float vat) { public BillLine(Integer billLinesId, String product, int units,
float unitPrice, float vat) {
this.id = billLinesId; this.id = billLinesId;
this.product = product; this.product = product;
this.units = units; this.units = units;
...@@ -122,12 +118,14 @@ public class BillLine implements ModelInterface { ...@@ -122,12 +118,14 @@ public class BillLine implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof BillLine)) { if (!(object instanceof BillLine)) {
return false; return false;
} }
BillLine other = (BillLine) object; BillLine other = (BillLine) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -27,14 +25,13 @@ import javax.persistence.Version; ...@@ -27,14 +25,13 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "card_templates") @Table(name = "card_templates")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "CardTemplate.findAll", query = "SELECT c FROM CardTemplate c"), @NamedQuery(name = "CardTemplate.findAll", query = "SELECT c FROM CardTemplate c"),
@NamedQuery(name = "CardTemplate.findByCardTemplatesId", query = "SELECT c FROM CardTemplate c WHERE c.cardTemplatesId = :cardTemplatesId"), @NamedQuery(name = "CardTemplate.findByCardTemplatesId", query = "SELECT c FROM CardTemplate c WHERE c.cardTemplatesId = :cardTemplatesId"),
@NamedQuery(name = "CardTemplate.findByTemplateName", query = "SELECT c FROM CardTemplate c WHERE c.templateName = :templateName")}) @NamedQuery(name = "CardTemplate.findByTemplateName", query = "SELECT c FROM CardTemplate c WHERE c.templateName = :templateName") })
public class CardTemplate implements ModelInterface { public class CardTemplate implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "card_templates_id", nullable = false) @Column(name = "card_templates_id", nullable = false)
private Integer id; private Integer id;
@Lob @Lob
...@@ -53,7 +50,6 @@ public class CardTemplate implements ModelInterface { ...@@ -53,7 +50,6 @@ public class CardTemplate implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public CardTemplate() { public CardTemplate() {
} }
...@@ -115,12 +111,14 @@ public class CardTemplate implements ModelInterface { ...@@ -115,12 +111,14 @@ public class CardTemplate implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CardTemplate)) { if (!(object instanceof CardTemplate)) {
return false; return false;
} }
CardTemplate other = (CardTemplate) object; CardTemplate other = (CardTemplate) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -128,7 +126,8 @@ public class CardTemplate implements ModelInterface { ...@@ -128,7 +126,8 @@ public class CardTemplate implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId=" + id + "]"; return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId=" + id
+ "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
......
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -30,7 +28,7 @@ import javax.persistence.Version; ...@@ -30,7 +28,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "compos") @Table(name = "compos")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Compo.findAll", query = "SELECT c FROM Compo c"), @NamedQuery(name = "Compo.findAll", query = "SELECT c FROM Compo c"),
@NamedQuery(name = "Compo.findByComposId", query = "SELECT c FROM Compo c WHERE c.composId = :composId"), @NamedQuery(name = "Compo.findByComposId", query = "SELECT c FROM Compo c WHERE c.composId = :composId"),
@NamedQuery(name = "Compo.findByCompoName", query = "SELECT c FROM Compo c WHERE c.compoName = :compoName"), @NamedQuery(name = "Compo.findByCompoName", query = "SELECT c FROM Compo c WHERE c.compoName = :compoName"),
...@@ -39,11 +37,10 @@ import javax.persistence.Version; ...@@ -39,11 +37,10 @@ import javax.persistence.Version;
@NamedQuery(name = "Compo.findByVoteEnd", query = "SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"), @NamedQuery(name = "Compo.findByVoteEnd", query = "SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"),
@NamedQuery(name = "Compo.findBySubmitStart", query = "SELECT c FROM Compo c WHERE c.submitStart = :submitStart"), @NamedQuery(name = "Compo.findBySubmitStart", query = "SELECT c FROM Compo c WHERE c.submitStart = :submitStart"),
@NamedQuery(name = "Compo.findBySubmitEnd", query = "SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"), @NamedQuery(name = "Compo.findBySubmitEnd", query = "SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"),
@NamedQuery(name = "Compo.findByHoldVoting", query = "SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting")}) @NamedQuery(name = "Compo.findByHoldVoting", query = "SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting") })
public class Compo implements ModelInterface { public class Compo implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "compos_id", nullable = false) @Column(name = "compos_id", nullable = false)
private Integer id; private Integer id;
...@@ -77,7 +74,6 @@ public class Compo implements ModelInterface { ...@@ -77,7 +74,6 @@ public class Compo implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -180,12 +176,14 @@ public class Compo implements ModelInterface { ...@@ -180,12 +176,14 @@ public class Compo implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Compo)) { if (!(object instanceof Compo)) {
return false; return false;
} }
Compo other = (Compo) object; Compo other = (Compo) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
......
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -30,18 +28,17 @@ import javax.persistence.Version; ...@@ -30,18 +28,17 @@ 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.findByEntriesId", query = "SELECT c FROM CompoEntry c WHERE c.entriesId = :entriesId"), @NamedQuery(name = "CompoEntry.findByEntriesId", query = "SELECT c FROM CompoEntry c WHERE c.entriesId = :entriesId"),
@NamedQuery(name = "CompoEntry.findByEntryCreated", query = "SELECT c FROM CompoEntry c WHERE c.entryCreated = :entryCreated"), @NamedQuery(name = "CompoEntry.findByEntryCreated", query = "SELECT c FROM CompoEntry c WHERE c.entryCreated = :entryCreated"),
@NamedQuery(name = "CompoEntry.findByEntryName", query = "SELECT c FROM CompoEntry c WHERE c.entryName = :entryName"), @NamedQuery(name = "CompoEntry.findByEntryName", query = "SELECT c FROM CompoEntry c WHERE c.entryName = :entryName"),
@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
@Column(name = "entries_id", nullable = false) @Column(name = "entries_id", nullable = false)
private Integer id; private Integer id;
...@@ -74,7 +71,6 @@ public class CompoEntry implements ModelInterface { ...@@ -74,7 +71,6 @@ public class CompoEntry implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -156,7 +152,8 @@ public class CompoEntry implements ModelInterface { ...@@ -156,7 +152,8 @@ public class CompoEntry implements ModelInterface {
return compoEntryParticipantList; return compoEntryParticipantList;
} }
public void setCompoEntryParticipantList(List<CompoEntryParticipant> compoEntryParticipantList) { public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList; this.compoEntryParticipantList = compoEntryParticipantList;
} }
...@@ -185,12 +182,14 @@ public class CompoEntry implements ModelInterface { ...@@ -185,12 +182,14 @@ public class CompoEntry implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// 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) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
......
...@@ -5,10 +5,8 @@ ...@@ -5,10 +5,8 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -28,7 +26,7 @@ import javax.persistence.Version; ...@@ -28,7 +26,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "entry_files") @Table(name = "entry_files")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "CompoEntryFile.findAll", query = "SELECT c FROM CompoEntryFile c"), @NamedQuery(name = "CompoEntryFile.findAll", query = "SELECT c FROM CompoEntryFile c"),
@NamedQuery(name = "CompoEntryFile.findByEntryFilesId", query = "SELECT c FROM CompoEntryFile c WHERE c.entryFilesId = :entryFilesId"), @NamedQuery(name = "CompoEntryFile.findByEntryFilesId", query = "SELECT c FROM CompoEntryFile c WHERE c.entryFilesId = :entryFilesId"),
@NamedQuery(name = "CompoEntryFile.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"), @NamedQuery(name = "CompoEntryFile.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"),
...@@ -36,11 +34,10 @@ import javax.persistence.Version; ...@@ -36,11 +34,10 @@ import javax.persistence.Version;
@NamedQuery(name = "CompoEntryFile.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"), @NamedQuery(name = "CompoEntryFile.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"),
@NamedQuery(name = "CompoEntryFile.findByHash", query = "SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"), @NamedQuery(name = "CompoEntryFile.findByHash", query = "SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"),
@NamedQuery(name = "CompoEntryFile.findByComment", query = "SELECT c FROM CompoEntryFile c WHERE c.comment = :comment"), @NamedQuery(name = "CompoEntryFile.findByComment", query = "SELECT c FROM CompoEntryFile c WHERE c.comment = :comment"),
@NamedQuery(name = "CompoEntryFile.findByUploaded", query = "SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded")}) @NamedQuery(name = "CompoEntryFile.findByUploaded", query = "SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded") })
public class CompoEntryFile implements ModelInterface { public class CompoEntryFile implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "entry_files_id", nullable = false) @Column(name = "entry_files_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "mime_type") @Column(name = "mime_type")
...@@ -68,7 +65,6 @@ public class CompoEntryFile implements ModelInterface { ...@@ -68,7 +65,6 @@ public class CompoEntryFile implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -162,12 +158,14 @@ public class CompoEntryFile implements ModelInterface { ...@@ -162,12 +158,14 @@ public class CompoEntryFile implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryFile)) { if (!(object instanceof CompoEntryFile)) {
return false; return false;
} }
CompoEntryFile other = (CompoEntryFile) object; CompoEntryFile other = (CompoEntryFile) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -175,7 +173,8 @@ public class CompoEntryFile implements ModelInterface { ...@@ -175,7 +173,8 @@ public class CompoEntryFile implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id + "]"; return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id
+ "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
......
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -24,14 +21,13 @@ import javax.persistence.Version; ...@@ -24,14 +21,13 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "entry_participations") @Table(name = "entry_participations")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "CompoEntryParticipant.findAll", query = "SELECT c FROM CompoEntryParticipant c"), @NamedQuery(name = "CompoEntryParticipant.findAll", query = "SELECT c FROM CompoEntryParticipant c"),
@NamedQuery(name = "CompoEntryParticipant.findByEntryParticipationsId", query = "SELECT c FROM CompoEntryParticipant c WHERE c.entryParticipationsId = :entryParticipationsId"), @NamedQuery(name = "CompoEntryParticipant.findByEntryParticipationsId", query = "SELECT c FROM CompoEntryParticipant c WHERE c.entryParticipationsId = :entryParticipationsId"),
@NamedQuery(name = "CompoEntryParticipant.findByRole", query = "SELECT c FROM CompoEntryParticipant c WHERE c.role = :role")}) @NamedQuery(name = "CompoEntryParticipant.findByRole", query = "SELECT c FROM CompoEntryParticipant c WHERE c.role = :role") })
public class CompoEntryParticipant implements ModelInterface { public class CompoEntryParticipant implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "entry_participations_id", nullable = false) @Column(name = "entry_participations_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "role") @Column(name = "role")
...@@ -47,7 +43,6 @@ public class CompoEntryParticipant implements ModelInterface { ...@@ -47,7 +43,6 @@ public class CompoEntryParticipant implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -112,12 +107,14 @@ public class CompoEntryParticipant implements ModelInterface { ...@@ -112,12 +107,14 @@ public class CompoEntryParticipant implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryParticipant)) { if (!(object instanceof CompoEntryParticipant)) {
return false; return false;
} }
CompoEntryParticipant other = (CompoEntryParticipant) object; CompoEntryParticipant other = (CompoEntryParticipant) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -125,7 +122,8 @@ public class CompoEntryParticipant implements ModelInterface { ...@@ -125,7 +122,8 @@ public class CompoEntryParticipant implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId=" + id + "]"; return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId="
+ id + "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
......
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -26,7 +24,7 @@ import javax.persistence.Version; ...@@ -26,7 +24,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "discounts") @Table(name = "discounts")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Discount.findAll", query = "SELECT d FROM Discount d"), @NamedQuery(name = "Discount.findAll", query = "SELECT d FROM Discount d"),
@NamedQuery(name = "Discount.findByDiscountsId", query = "SELECT d FROM Discount d WHERE d.discountsId = :discountsId"), @NamedQuery(name = "Discount.findByDiscountsId", query = "SELECT d FROM Discount d WHERE d.discountsId = :discountsId"),
@NamedQuery(name = "Discount.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"), @NamedQuery(name = "Discount.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"),
...@@ -36,11 +34,10 @@ import javax.persistence.Version; ...@@ -36,11 +34,10 @@ import javax.persistence.Version;
@NamedQuery(name = "Discount.findByAmountMax", query = "SELECT d FROM Discount d WHERE d.amountMax = :amountMax"), @NamedQuery(name = "Discount.findByAmountMax", query = "SELECT d FROM Discount d WHERE d.amountMax = :amountMax"),
@NamedQuery(name = "Discount.findByActive", query = "SELECT d FROM Discount d WHERE d.active = :active"), @NamedQuery(name = "Discount.findByActive", query = "SELECT d FROM Discount d WHERE d.active = :active"),
@NamedQuery(name = "Discount.findByMaxNum", query = "SELECT d FROM Discount d WHERE d.maxNum = :maxNum"), @NamedQuery(name = "Discount.findByMaxNum", query = "SELECT d FROM Discount d WHERE d.maxNum = :maxNum"),
@NamedQuery(name = "Discount.findByPerUser", query = "SELECT d FROM Discount d WHERE d.perUser = :perUser")}) @NamedQuery(name = "Discount.findByPerUser", query = "SELECT d FROM Discount d WHERE d.perUser = :perUser") })
public class Discount implements ModelInterface { public class Discount implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "discounts_id", nullable = false) @Column(name = "discounts_id", nullable = false)
private Integer id; private Integer id;
...@@ -72,7 +69,6 @@ public class Discount implements ModelInterface { ...@@ -72,7 +69,6 @@ public class Discount implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public Discount() { public Discount() {
} }
...@@ -88,7 +84,8 @@ public class Discount implements ModelInterface { ...@@ -88,7 +84,8 @@ public class Discount implements ModelInterface {
this.id = id; this.id = id;
} }
public Discount(Integer discountsId, BigInteger percentage, int amountMin, int amountMax, boolean active, int maxNum, int perUser) { public Discount(Integer discountsId, BigInteger percentage, int amountMin,
int amountMax, boolean active, int maxNum, int perUser) {
this.id = discountsId; this.id = discountsId;
this.percentage = percentage; this.percentage = percentage;
this.amountMin = amountMin; this.amountMin = amountMin;
...@@ -166,7 +163,8 @@ public class Discount implements ModelInterface { ...@@ -166,7 +163,8 @@ public class Discount implements ModelInterface {
return discountInstanceList; return discountInstanceList;
} }
public void setDiscountInstanceList(List<DiscountInstance> discountInstanceList) { public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList; this.discountInstanceList = discountInstanceList;
} }
...@@ -179,12 +177,14 @@ public class Discount implements ModelInterface { ...@@ -179,12 +177,14 @@ public class Discount implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Discount)) { if (!(object instanceof Discount)) {
return false; return false;
} }
Discount other = (Discount) object; Discount other = (Discount) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -21,14 +20,13 @@ import javax.persistence.Version; ...@@ -21,14 +20,13 @@ 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.findByDiscountsInstancesId", query = "SELECT d FROM DiscountInstance d WHERE d.discountsInstancesId = :discountsInstancesId")}) @NamedQuery(name = "DiscountInstance.findByDiscountsInstancesId", query = "SELECT d FROM DiscountInstance d WHERE d.discountsInstancesId = :discountsInstancesId") })
public class DiscountInstance implements ModelInterface { public class DiscountInstance implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "discounts_instances_id", nullable = false) @Column(name = "discounts_instances_id", nullable = false)
private Integer id; private Integer id;
@JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id") @JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id")
...@@ -84,12 +82,14 @@ public class DiscountInstance implements ModelInterface { ...@@ -84,12 +82,14 @@ public class DiscountInstance implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// 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) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -97,7 +97,8 @@ public class DiscountInstance implements ModelInterface { ...@@ -97,7 +97,8 @@ public class DiscountInstance implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId=" + getId() + "]"; return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId="
+ getId() + "]";
} }
/** /**
...@@ -108,7 +109,8 @@ public class DiscountInstance implements ModelInterface { ...@@ -108,7 +109,8 @@ public class DiscountInstance implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -122,7 +124,8 @@ public class DiscountInstance implements ModelInterface { ...@@ -122,7 +124,8 @@ public class DiscountInstance implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model; ...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -28,18 +27,17 @@ import javax.persistence.Version; ...@@ -28,18 +27,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "events") @Table(name = "events")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"), @NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"),
@NamedQuery(name = "Event.findByEventsId", query = "SELECT e FROM Event e WHERE e.eventsId = :eventsId"), @NamedQuery(name = "Event.findByEventsId", query = "SELECT e FROM Event e WHERE e.eventsId = :eventsId"),
@NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"), @NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"),
@NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"), @NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"),
@NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"), @NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"),
@NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer")}) @NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer") })
public class Event implements ModelInterface { public class Event implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "events_id", nullable = false) @Column(name = "events_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "start_time") @Column(name = "start_time")
...@@ -183,12 +181,14 @@ public class Event implements ModelInterface { ...@@ -183,12 +181,14 @@ public class Event implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Event)) { if (!(object instanceof Event)) {
return false; return false;
} }
Event other = (Event) object; Event other = (Event) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -207,7 +207,8 @@ public class Event implements ModelInterface { ...@@ -207,7 +207,8 @@ public class Event implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -221,7 +222,8 @@ public class Event implements ModelInterface { ...@@ -221,7 +222,8 @@ public class Event implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -26,15 +25,14 @@ import javax.persistence.Version; ...@@ -26,15 +25,14 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "maps") @Table(name = "maps")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"), @NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"),
@NamedQuery(name = "EventMap.findByMapsId", query = "SELECT e FROM EventMap e WHERE e.mapsId = :mapsId"), @NamedQuery(name = "EventMap.findByMapsId", query = "SELECT e FROM EventMap e WHERE e.mapsId = :mapsId"),
@NamedQuery(name = "EventMap.findByMapName", query = "SELECT e FROM EventMap e WHERE e.mapName = :mapName")}) @NamedQuery(name = "EventMap.findByMapName", query = "SELECT e FROM EventMap e WHERE e.mapName = :mapName") })
public class EventMap implements ModelInterface { public class EventMap implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "maps_id", nullable = false) @Column(name = "maps_id", nullable = false)
private Integer id; private Integer id;
@Lob @Lob
...@@ -99,12 +97,14 @@ public class EventMap implements ModelInterface { ...@@ -99,12 +97,14 @@ public class EventMap implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventMap)) { if (!(object instanceof EventMap)) {
return false; return false;
} }
EventMap other = (EventMap) object; EventMap other = (EventMap) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -123,7 +123,8 @@ public class EventMap implements ModelInterface { ...@@ -123,7 +123,8 @@ public class EventMap implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -137,7 +138,8 @@ public class EventMap implements ModelInterface { ...@@ -137,7 +138,8 @@ public class EventMap implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -23,18 +22,17 @@ import javax.persistence.Version; ...@@ -23,18 +22,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "event_settings") @Table(name = "event_settings")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"), @NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"),
@NamedQuery(name = "EventSettings.findByEventSettingsId", query = "SELECT e FROM EventSettings e WHERE e.eventSettingsId = :eventSettingsId"), @NamedQuery(name = "EventSettings.findByEventSettingsId", query = "SELECT e FROM EventSettings e WHERE e.eventSettingsId = :eventSettingsId"),
@NamedQuery(name = "EventSettings.findByResourceBundle", query = "SELECT e FROM EventSettings e WHERE e.resourceBundle = :resourceBundle"), @NamedQuery(name = "EventSettings.findByResourceBundle", query = "SELECT e FROM EventSettings e WHERE e.resourceBundle = :resourceBundle"),
@NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet"), @NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet"),
@NamedQuery(name = "EventSettings.findByNameGeneralForm", query = "SELECT e FROM EventSettings e WHERE e.nameGeneralForm = :nameGeneralForm"), @NamedQuery(name = "EventSettings.findByNameGeneralForm", query = "SELECT e FROM EventSettings e WHERE e.nameGeneralForm = :nameGeneralForm"),
@NamedQuery(name = "EventSettings.findByNamePossissiveForm", query = "SELECT e FROM EventSettings e WHERE e.namePossissiveForm = :namePossissiveForm")}) @NamedQuery(name = "EventSettings.findByNamePossissiveForm", query = "SELECT e FROM EventSettings e WHERE e.namePossissiveForm = :namePossissiveForm") })
public class EventSettings implements ModelInterface { public class EventSettings implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_settings_id", nullable = false) @Column(name = "event_settings_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "resource_bundle") @Column(name = "resource_bundle")
...@@ -107,12 +105,14 @@ public class EventSettings implements ModelInterface { ...@@ -107,12 +105,14 @@ public class EventSettings implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventSettings)) { if (!(object instanceof EventSettings)) {
return false; return false;
} }
EventSettings other = (EventSettings) object; EventSettings other = (EventSettings) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -120,7 +120,8 @@ public class EventSettings implements ModelInterface { ...@@ -120,7 +120,8 @@ public class EventSettings implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.EventSettings[eventSettingsId=" + getId() + "]"; return "fi.insomnia.bortal.model.EventSettings[eventSettingsId="
+ getId() + "]";
} }
/** /**
...@@ -131,7 +132,8 @@ public class EventSettings implements ModelInterface { ...@@ -131,7 +132,8 @@ public class EventSettings implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -145,7 +147,8 @@ public class EventSettings implements ModelInterface { ...@@ -145,7 +147,8 @@ public class EventSettings implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -23,17 +22,15 @@ import javax.persistence.Version; ...@@ -23,17 +22,15 @@ import javax.persistence.Version;
* @author jkj * @author jkj
*/ */
@Entity @Entity
@Table(name = "event_status", uniqueConstraints = { @Table(name = "event_status", uniqueConstraints = { @UniqueConstraint(columnNames = { "status_name" }) })
@UniqueConstraint(columnNames = {"status_name"})}) @NamedQueries( {
@NamedQueries({
@NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"), @NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"),
@NamedQuery(name = "EventStatus.findByEventStatusId", query = "SELECT e FROM EventStatus e WHERE e.eventStatusId = :eventStatusId"), @NamedQuery(name = "EventStatus.findByEventStatusId", query = "SELECT e FROM EventStatus e WHERE e.eventStatusId = :eventStatusId"),
@NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName")}) @NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName") })
public class EventStatus implements ModelInterface { public class EventStatus implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_status_id", nullable = false) @Column(name = "event_status_id", nullable = false)
private Integer id; private Integer id;
...@@ -82,12 +79,14 @@ public class EventStatus implements ModelInterface { ...@@ -82,12 +79,14 @@ public class EventStatus implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof EventStatus)) { if (!(object instanceof EventStatus)) {
return false; return false;
} }
EventStatus other = (EventStatus) object; EventStatus other = (EventStatus) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -95,7 +94,8 @@ public class EventStatus implements ModelInterface { ...@@ -95,7 +94,8 @@ public class EventStatus implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.EventStatus[eventStatusId=" + getId() + "]"; return "fi.insomnia.bortal.model.EventStatus[eventStatusId=" + getId()
+ "]";
} }
/** /**
...@@ -106,7 +106,8 @@ public class EventStatus implements ModelInterface { ...@@ -106,7 +106,8 @@ public class EventStatus implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -120,7 +121,8 @@ public class EventStatus implements ModelInterface { ...@@ -120,7 +121,8 @@ public class EventStatus implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model; ...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -25,18 +24,17 @@ import javax.persistence.Version; ...@@ -25,18 +24,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "food_waves") @Table(name = "food_waves")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"), @NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"),
@NamedQuery(name = "FoodWave.findByFoodWavesId", query = "SELECT f FROM FoodWave f WHERE f.foodWavesId = :foodWavesId"), @NamedQuery(name = "FoodWave.findByFoodWavesId", query = "SELECT f FROM FoodWave f WHERE f.foodWavesId = :foodWavesId"),
@NamedQuery(name = "FoodWave.findByWaveName", query = "SELECT f FROM FoodWave f WHERE f.waveName = :waveName"), @NamedQuery(name = "FoodWave.findByWaveName", query = "SELECT f FROM FoodWave f WHERE f.waveName = :waveName"),
@NamedQuery(name = "FoodWave.findByWaveDescription", query = "SELECT f FROM FoodWave f WHERE f.waveDescription = :waveDescription"), @NamedQuery(name = "FoodWave.findByWaveDescription", query = "SELECT f FROM FoodWave f WHERE f.waveDescription = :waveDescription"),
@NamedQuery(name = "FoodWave.findByWaveTime", query = "SELECT f FROM FoodWave f WHERE f.waveTime = :waveTime"), @NamedQuery(name = "FoodWave.findByWaveTime", query = "SELECT f FROM FoodWave f WHERE f.waveTime = :waveTime"),
@NamedQuery(name = "FoodWave.findByWaveClosed", query = "SELECT f FROM FoodWave f WHERE f.waveClosed = :waveClosed")}) @NamedQuery(name = "FoodWave.findByWaveClosed", query = "SELECT f FROM FoodWave f WHERE f.waveClosed = :waveClosed") })
public class FoodWave implements ModelInterface { public class FoodWave implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "food_waves_id", nullable = false) @Column(name = "food_waves_id", nullable = false)
private Integer id; private Integer id;
...@@ -118,12 +116,14 @@ public class FoodWave implements ModelInterface { ...@@ -118,12 +116,14 @@ public class FoodWave implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof FoodWave)) { if (!(object instanceof FoodWave)) {
return false; return false;
} }
FoodWave other = (FoodWave) object; FoodWave other = (FoodWave) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -142,7 +142,8 @@ public class FoodWave implements ModelInterface { ...@@ -142,7 +142,8 @@ public class FoodWave implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -156,7 +157,8 @@ public class FoodWave implements ModelInterface { ...@@ -156,7 +157,8 @@ public class FoodWave implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -22,16 +21,15 @@ import javax.persistence.Version; ...@@ -22,16 +21,15 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "food_wave_templates") @Table(name = "food_wave_templates")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"), @NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"),
@NamedQuery(name = "FoodWaveTemplate.findByFoodWaveTemplatesId", query = "SELECT f FROM FoodWaveTemplate f WHERE f.foodWaveTemplatesId = :foodWaveTemplatesId"), @NamedQuery(name = "FoodWaveTemplate.findByFoodWaveTemplatesId", query = "SELECT f FROM FoodWaveTemplate f WHERE f.foodWaveTemplatesId = :foodWaveTemplatesId"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateName = :templateName"), @NamedQuery(name = "FoodWaveTemplate.findByTemplateName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateName = :templateName"),
@NamedQuery(name = "FoodWaveTemplate.findByTemplateDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateDescription = :templateDescription")}) @NamedQuery(name = "FoodWaveTemplate.findByTemplateDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.templateDescription = :templateDescription") })
public class FoodWaveTemplate implements ModelInterface { public class FoodWaveTemplate implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "food_wave_templates_id", nullable = false) @Column(name = "food_wave_templates_id", nullable = false)
private Integer id; private Integer id;
...@@ -82,12 +80,14 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -82,12 +80,14 @@ public class FoodWaveTemplate implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof FoodWaveTemplate)) { if (!(object instanceof FoodWaveTemplate)) {
return false; return false;
} }
FoodWaveTemplate other = (FoodWaveTemplate) object; FoodWaveTemplate other = (FoodWaveTemplate) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -95,7 +95,8 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -95,7 +95,8 @@ public class FoodWaveTemplate implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId=" + getId() + "]"; return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId="
+ getId() + "]";
} }
/** /**
...@@ -106,7 +107,8 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -106,7 +107,8 @@ public class FoodWaveTemplate implements ModelInterface {
} }
/** /**
* @param products the products to set * @param products
* the products to set
*/ */
public void setProducts(List<Product> products) { public void setProducts(List<Product> products) {
this.products = products; this.products = products;
...@@ -120,7 +122,8 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -120,7 +122,8 @@ public class FoodWaveTemplate implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -134,7 +137,8 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -134,7 +137,8 @@ public class FoodWaveTemplate implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -25,19 +24,18 @@ import javax.persistence.Version; ...@@ -25,19 +24,18 @@ import javax.persistence.Version;
* @author jkj * @author jkj
*/ */
@Entity @Entity
@Table(name = "group_memberships", uniqueConstraints = { @Table(name = "group_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = {
@UniqueConstraint(columnNames = {"users_id", "groups_id"})}) "users_id", "groups_id" }) })
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"), @NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"),
@NamedQuery(name = "GroupMembership.findByGroupMembershipsId", query = "SELECT g FROM GroupMembership g WHERE g.groupMembershipsId = :groupMembershipsId"), @NamedQuery(name = "GroupMembership.findByGroupMembershipsId", query = "SELECT g FROM GroupMembership g WHERE g.groupMembershipsId = :groupMembershipsId"),
@NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"), @NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"),
@NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"), @NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"),
@NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName")}) @NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName") })
public class GroupMembership implements ModelInterface { public class GroupMembership implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "group_memberships_id", nullable = false) @Column(name = "group_memberships_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "invite_accepted") @Column(name = "invite_accepted")
...@@ -124,12 +122,14 @@ public class GroupMembership implements ModelInterface { ...@@ -124,12 +122,14 @@ public class GroupMembership implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof GroupMembership)) { if (!(object instanceof GroupMembership)) {
return false; return false;
} }
GroupMembership other = (GroupMembership) object; GroupMembership other = (GroupMembership) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -137,7 +137,8 @@ public class GroupMembership implements ModelInterface { ...@@ -137,7 +137,8 @@ public class GroupMembership implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId=" + getId() + "]"; return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId="
+ getId() + "]";
} }
/** /**
...@@ -148,7 +149,8 @@ public class GroupMembership implements ModelInterface { ...@@ -148,7 +149,8 @@ public class GroupMembership implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -162,7 +164,8 @@ public class GroupMembership implements ModelInterface { ...@@ -162,7 +164,8 @@ public class GroupMembership implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -22,15 +21,14 @@ import javax.persistence.Version; ...@@ -22,15 +21,14 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "locations") @Table(name = "locations")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"), @NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"),
@NamedQuery(name = "Location.findByLocationsId", query = "SELECT l FROM Location l WHERE l.locationsId = :locationsId"), @NamedQuery(name = "Location.findByLocationsId", query = "SELECT l FROM Location l WHERE l.locationsId = :locationsId"),
@NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :locationName")}) @NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :locationName") })
public class Location implements ModelInterface { public class Location implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "locations_id", nullable = false) @Column(name = "locations_id", nullable = false)
private Integer id; private Integer id;
...@@ -89,12 +87,14 @@ public class Location implements ModelInterface { ...@@ -89,12 +87,14 @@ public class Location implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Location)) { if (!(object instanceof Location)) {
return false; return false;
} }
Location other = (Location) object; Location other = (Location) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -113,7 +113,8 @@ public class Location implements ModelInterface { ...@@ -113,7 +113,8 @@ public class Location implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -127,7 +128,8 @@ public class Location implements ModelInterface { ...@@ -127,7 +128,8 @@ public class Location implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -25,16 +24,15 @@ import javax.persistence.Version; ...@@ -25,16 +24,15 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "event_log") @Table(name = "event_log")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"), @NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"),
@NamedQuery(name = "LogEntry.findByEventLogId", query = "SELECT l FROM LogEntry l WHERE l.eventLogId = :eventLogId"), @NamedQuery(name = "LogEntry.findByEventLogId", query = "SELECT l FROM LogEntry l WHERE l.eventLogId = :eventLogId"),
@NamedQuery(name = "LogEntry.findByEventTime", query = "SELECT l FROM LogEntry l WHERE l.eventTime = :eventTime"), @NamedQuery(name = "LogEntry.findByEventTime", query = "SELECT l FROM LogEntry l WHERE l.eventTime = :eventTime"),
@NamedQuery(name = "LogEntry.findByEventDescription", query = "SELECT l FROM LogEntry l WHERE l.eventDescription = :eventDescription")}) @NamedQuery(name = "LogEntry.findByEventDescription", query = "SELECT l FROM LogEntry l WHERE l.eventDescription = :eventDescription") })
public class LogEntry implements ModelInterface { public class LogEntry implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_log_id", nullable = false) @Column(name = "event_log_id", nullable = false)
private Integer id; private Integer id;
...@@ -106,12 +104,14 @@ public class LogEntry implements ModelInterface { ...@@ -106,12 +104,14 @@ public class LogEntry implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof LogEntry)) { if (!(object instanceof LogEntry)) {
return false; return false;
} }
LogEntry other = (LogEntry) object; LogEntry other = (LogEntry) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -130,7 +130,8 @@ public class LogEntry implements ModelInterface { ...@@ -130,7 +130,8 @@ public class LogEntry implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -144,7 +145,8 @@ public class LogEntry implements ModelInterface { ...@@ -144,7 +145,8 @@ public class LogEntry implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -23,15 +22,14 @@ import javax.persistence.Version; ...@@ -23,15 +22,14 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "event_log_types") @Table(name = "event_log_types")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"), @NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findByEventLogTypesId", query = "SELECT l FROM LogEntryType l WHERE l.eventLogTypesId = :eventLogTypesId"), @NamedQuery(name = "LogEntryType.findByEventLogTypesId", query = "SELECT l FROM LogEntryType l WHERE l.eventLogTypesId = :eventLogTypesId"),
@NamedQuery(name = "LogEntryType.findByEventTypeDescription", query = "SELECT l FROM LogEntryType l WHERE l.eventTypeDescription = :eventTypeDescription")}) @NamedQuery(name = "LogEntryType.findByEventTypeDescription", query = "SELECT l FROM LogEntryType l WHERE l.eventTypeDescription = :eventTypeDescription") })
public class LogEntryType implements ModelInterface { public class LogEntryType implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "event_log_types_id", nullable = false) @Column(name = "event_log_types_id", nullable = false)
private Integer id; private Integer id;
...@@ -80,12 +78,14 @@ public class LogEntryType implements ModelInterface { ...@@ -80,12 +78,14 @@ public class LogEntryType implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof LogEntryType)) { if (!(object instanceof LogEntryType)) {
return false; return false;
} }
LogEntryType other = (LogEntryType) object; LogEntryType other = (LogEntryType) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -93,7 +93,8 @@ public class LogEntryType implements ModelInterface { ...@@ -93,7 +93,8 @@ public class LogEntryType implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId=" + getId() + "]"; return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId="
+ getId() + "]";
} }
/** /**
...@@ -104,7 +105,8 @@ public class LogEntryType implements ModelInterface { ...@@ -104,7 +105,8 @@ public class LogEntryType implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -118,7 +120,8 @@ public class LogEntryType implements ModelInterface { ...@@ -118,7 +120,8 @@ public class LogEntryType implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -7,15 +7,16 @@ package fi.insomnia.bortal.model; ...@@ -7,15 +7,16 @@ package fi.insomnia.bortal.model;
import java.io.Serializable; import java.io.Serializable;
/** /**
* *
* @author tuukka * @author tuukka
*/ */
public interface ModelInterface extends Serializable { public interface ModelInterface extends Serializable {
public Integer getId(); public Integer getId();
public void setId(Integer id); public void setId(Integer id);
public int getJpaVersionField(); public int getJpaVersionField();
public void setJpaVersionField(int jpaVersionField); public void setJpaVersionField(int jpaVersionField);
} }
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -25,7 +24,7 @@ import javax.persistence.Version; ...@@ -25,7 +24,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "news") @Table(name = "news")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"), @NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"),
@NamedQuery(name = "News.findByNewsId", query = "SELECT n FROM News n WHERE n.newsId = :newsId"), @NamedQuery(name = "News.findByNewsId", query = "SELECT n FROM News n WHERE n.newsId = :newsId"),
@NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"), @NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
...@@ -33,12 +32,11 @@ import javax.persistence.Version; ...@@ -33,12 +32,11 @@ import javax.persistence.Version;
@NamedQuery(name = "News.findByAbstract1", query = "SELECT n FROM News n WHERE n.abstract1 = :abstract1"), @NamedQuery(name = "News.findByAbstract1", query = "SELECT n FROM News n WHERE n.abstract1 = :abstract1"),
@NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"), @NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"),
@NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"), @NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"),
@NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority")}) @NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") })
public class News implements ModelInterface { public class News implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "news_id", nullable = false) @Column(name = "news_id", nullable = false)
private Integer id; private Integer id;
...@@ -142,12 +140,14 @@ public class News implements ModelInterface { ...@@ -142,12 +140,14 @@ public class News implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof News)) { if (!(object instanceof News)) {
return false; return false;
} }
News other = (News) object; News other = (News) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -166,7 +166,8 @@ public class News implements ModelInterface { ...@@ -166,7 +166,8 @@ public class News implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -180,7 +181,8 @@ public class News implements ModelInterface { ...@@ -180,7 +181,8 @@ public class News implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -25,17 +24,16 @@ import javax.persistence.Version; ...@@ -25,17 +24,16 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "news_groups") @Table(name = "news_groups")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"), @NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"),
@NamedQuery(name = "NewsGroup.findByNewsGroupsId", query = "SELECT n FROM NewsGroup n WHERE n.newsGroupsId = :newsGroupsId"), @NamedQuery(name = "NewsGroup.findByNewsGroupsId", query = "SELECT n FROM NewsGroup n WHERE n.newsGroupsId = :newsGroupsId"),
@NamedQuery(name = "NewsGroup.findByGroupName", query = "SELECT n FROM NewsGroup n WHERE n.groupName = :groupName"), @NamedQuery(name = "NewsGroup.findByGroupName", query = "SELECT n FROM NewsGroup n WHERE n.groupName = :groupName"),
@NamedQuery(name = "NewsGroup.findByGroupDescription", query = "SELECT n FROM NewsGroup n WHERE n.groupDescription = :groupDescription"), @NamedQuery(name = "NewsGroup.findByGroupDescription", query = "SELECT n FROM NewsGroup n WHERE n.groupDescription = :groupDescription"),
@NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority")}) @NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") })
public class NewsGroup implements ModelInterface { public class NewsGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "news_groups_id", nullable = false) @Column(name = "news_groups_id", nullable = false)
private Integer id; private Integer id;
...@@ -117,12 +115,14 @@ public class NewsGroup implements ModelInterface { ...@@ -117,12 +115,14 @@ public class NewsGroup implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof NewsGroup)) { if (!(object instanceof NewsGroup)) {
return false; return false;
} }
NewsGroup other = (NewsGroup) object; NewsGroup other = (NewsGroup) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -130,7 +130,8 @@ public class NewsGroup implements ModelInterface { ...@@ -130,7 +130,8 @@ public class NewsGroup implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId() + "]"; return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId()
+ "]";
} }
/** /**
...@@ -141,7 +142,8 @@ public class NewsGroup implements ModelInterface { ...@@ -141,7 +142,8 @@ public class NewsGroup implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -155,7 +157,8 @@ public class NewsGroup implements ModelInterface { ...@@ -155,7 +157,8 @@ public class NewsGroup implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -25,7 +24,7 @@ import javax.persistence.Version; ...@@ -25,7 +24,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "places") @Table(name = "places")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"), @NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"),
@NamedQuery(name = "Place.findByPlacesId", query = "SELECT p FROM Place p WHERE p.placesId = :placesId"), @NamedQuery(name = "Place.findByPlacesId", query = "SELECT p FROM Place p WHERE p.placesId = :placesId"),
@NamedQuery(name = "Place.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"), @NamedQuery(name = "Place.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"),
...@@ -33,12 +32,11 @@ import javax.persistence.Version; ...@@ -33,12 +32,11 @@ import javax.persistence.Version;
@NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"), @NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"),
@NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"), @NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"),
@NamedQuery(name = "Place.findByPlaceDetails", query = "SELECT p FROM Place p WHERE p.placeDetails = :placeDetails"), @NamedQuery(name = "Place.findByPlaceDetails", query = "SELECT p FROM Place p WHERE p.placeDetails = :placeDetails"),
@NamedQuery(name = "Place.findByPlaceCode", query = "SELECT p FROM Place p WHERE p.placeCode = :placeCode")}) @NamedQuery(name = "Place.findByPlaceCode", query = "SELECT p FROM Place p WHERE p.placeCode = :placeCode") })
public class Place implements ModelInterface { public class Place implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "places_id", nullable = false) @Column(name = "places_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "place_description") @Column(name = "place_description")
...@@ -175,12 +173,14 @@ public class Place implements ModelInterface { ...@@ -175,12 +173,14 @@ public class Place implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Place)) { if (!(object instanceof Place)) {
return false; return false;
} }
Place other = (Place) object; Place other = (Place) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -199,7 +199,8 @@ public class Place implements ModelInterface { ...@@ -199,7 +199,8 @@ public class Place implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -213,7 +214,8 @@ public class Place implements ModelInterface { ...@@ -213,7 +214,8 @@ public class Place implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model; ...@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -28,7 +27,7 @@ import javax.persistence.Version; ...@@ -28,7 +27,7 @@ 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.findByGroupsId", query = "SELECT p FROM PlaceGroup p WHERE p.groupsId = :groupsId"), @NamedQuery(name = "PlaceGroup.findByGroupsId", query = "SELECT p FROM PlaceGroup p WHERE p.groupsId = :groupsId"),
@NamedQuery(name = "PlaceGroup.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"), @NamedQuery(name = "PlaceGroup.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"),
...@@ -36,12 +35,11 @@ import javax.persistence.Version; ...@@ -36,12 +35,11 @@ import javax.persistence.Version;
@NamedQuery(name = "PlaceGroup.findByGroupCode", query = "SELECT p FROM PlaceGroup p WHERE p.groupCode = :groupCode"), @NamedQuery(name = "PlaceGroup.findByGroupCode", query = "SELECT p FROM PlaceGroup p WHERE p.groupCode = :groupCode"),
@NamedQuery(name = "PlaceGroup.findByGroupName", query = "SELECT p FROM PlaceGroup p WHERE p.groupName = :groupName"), @NamedQuery(name = "PlaceGroup.findByGroupName", query = "SELECT p FROM PlaceGroup p WHERE p.groupName = :groupName"),
@NamedQuery(name = "PlaceGroup.findByGroupActive", query = "SELECT p FROM PlaceGroup p WHERE p.groupActive = :groupActive"), @NamedQuery(name = "PlaceGroup.findByGroupActive", query = "SELECT p FROM PlaceGroup p WHERE p.groupActive = :groupActive"),
@NamedQuery(name = "PlaceGroup.findByGroupDetails", query = "SELECT p FROM PlaceGroup p WHERE p.groupDetails = :groupDetails")}) @NamedQuery(name = "PlaceGroup.findByGroupDetails", query = "SELECT p FROM PlaceGroup p WHERE p.groupDetails = :groupDetails") })
public class PlaceGroup implements ModelInterface { public class PlaceGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "groups_id", nullable = false) @Column(name = "groups_id", nullable = false)
private Integer id; private Integer id;
...@@ -79,7 +77,8 @@ public class PlaceGroup implements ModelInterface { ...@@ -79,7 +77,8 @@ public class PlaceGroup implements ModelInterface {
this.id = groupsId; this.id = groupsId;
} }
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited, boolean groupActive) { public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited,
boolean groupActive) {
this.id = groupsId; this.id = groupsId;
this.groupCreated = groupCreated; this.groupCreated = groupCreated;
this.groupEdited = groupEdited; this.groupEdited = groupEdited;
...@@ -167,12 +166,14 @@ public class PlaceGroup implements ModelInterface { ...@@ -167,12 +166,14 @@ public class PlaceGroup implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// 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) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -191,7 +192,8 @@ public class PlaceGroup implements ModelInterface { ...@@ -191,7 +192,8 @@ public class PlaceGroup implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -205,7 +207,8 @@ public class PlaceGroup implements ModelInterface { ...@@ -205,7 +207,8 @@ public class PlaceGroup implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -5,11 +5,9 @@ ...@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -30,18 +28,17 @@ import javax.persistence.Version; ...@@ -30,18 +28,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "printed_cards") @Table(name = "printed_cards")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"), @NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"),
@NamedQuery(name = "PrintedCard.findByPrintedCardsId", query = "SELECT p FROM PrintedCard p WHERE p.printedCardsId = :printedCardsId"), @NamedQuery(name = "PrintedCard.findByPrintedCardsId", query = "SELECT p FROM PrintedCard p WHERE p.printedCardsId = :printedCardsId"),
@NamedQuery(name = "PrintedCard.findByEventRolesTypesId", query = "SELECT p FROM PrintedCard p WHERE p.eventRolesTypesId = :eventRolesTypesId"), @NamedQuery(name = "PrintedCard.findByEventRolesTypesId", query = "SELECT p FROM PrintedCard p WHERE p.eventRolesTypesId = :eventRolesTypesId"),
@NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"), @NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"),
@NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"), @NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"),
@NamedQuery(name = "PrintedCard.findByCardEnabled", query = "SELECT p FROM PrintedCard p WHERE p.cardEnabled = :cardEnabled"), @NamedQuery(name = "PrintedCard.findByCardEnabled", query = "SELECT p FROM PrintedCard p WHERE p.cardEnabled = :cardEnabled"),
@NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid")}) @NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") })
public class PrintedCard implements ModelInterface { public class PrintedCard implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "printed_cards_id", nullable = false) @Column(name = "printed_cards_id", nullable = false)
private Integer id; private Integer id;
...@@ -71,7 +68,6 @@ public class PrintedCard implements ModelInterface { ...@@ -71,7 +68,6 @@ public class PrintedCard implements ModelInterface {
@Column(nullable = false) @Column(nullable = false)
private int jpaVersionField; private int jpaVersionField;
public PrintedCard() { public PrintedCard() {
} }
...@@ -87,7 +83,8 @@ public class PrintedCard implements ModelInterface { ...@@ -87,7 +83,8 @@ public class PrintedCard implements ModelInterface {
this.id = printedCardsId; this.id = printedCardsId;
} }
public PrintedCard(Integer printedCardsId, int eventRolesTypesId, Date printTime, boolean cardEnabled) { public PrintedCard(Integer printedCardsId, int eventRolesTypesId,
Date printTime, boolean cardEnabled) {
this.id = printedCardsId; this.id = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId; this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime; this.printTime = printTime;
...@@ -167,12 +164,14 @@ public class PrintedCard implements ModelInterface { ...@@ -167,12 +164,14 @@ public class PrintedCard implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof PrintedCard)) { if (!(object instanceof PrintedCard)) {
return false; return false;
} }
PrintedCard other = (PrintedCard) object; PrintedCard other = (PrintedCard) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -180,7 +179,8 @@ public class PrintedCard implements ModelInterface { ...@@ -180,7 +179,8 @@ public class PrintedCard implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id + "]"; return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id
+ "]";
} }
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
......
...@@ -4,11 +4,9 @@ ...@@ -4,11 +4,9 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -28,18 +26,17 @@ import javax.persistence.Version; ...@@ -28,18 +26,17 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "products") @Table(name = "products")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"), @NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"),
@NamedQuery(name = "Product.findByProductsId", query = "SELECT p FROM Product p WHERE p.productsId = :productsId"), @NamedQuery(name = "Product.findByProductsId", query = "SELECT p FROM Product p WHERE p.productsId = :productsId"),
@NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.productName = :productName"), @NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.productName = :productName"),
@NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"), @NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"),
@NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"), @NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"),
@NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode")}) @NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode") })
public class Product implements ModelInterface { public class Product implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "products_id", nullable = false) @Column(name = "products_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "product_name") @Column(name = "product_name")
...@@ -56,9 +53,7 @@ public class Product implements ModelInterface { ...@@ -56,9 +53,7 @@ public class Product implements ModelInterface {
private List<Place> placeList; private List<Place> placeList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId") @OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId")
private List<AccountEvent> accountEventList; private List<AccountEvent> accountEventList;
@JoinTable(name = "food_wave_templates_products", joinColumns = { @JoinTable(name = "food_wave_templates_products", joinColumns = { @JoinColumn(name = "products_id", referencedColumnName = "products_id") }, inverseJoinColumns = { @JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id") })
@JoinColumn(name = "products_id", referencedColumnName = "products_id")}, inverseJoinColumns = {
@JoinColumn(name = "food_wave_templates_id", referencedColumnName = "food_wave_templates_id")})
@ManyToMany @ManyToMany
private List<FoodWaveTemplate> foodWaveTemplate; private List<FoodWaveTemplate> foodWaveTemplate;
@Version @Version
...@@ -150,8 +145,7 @@ public class Product implements ModelInterface { ...@@ -150,8 +145,7 @@ public class Product implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Product[productsId=" + getId() return "fi.insomnia.bortal.model.Product[productsId=" + getId() + "]";
+ "]";
} }
/** /**
...@@ -177,7 +171,8 @@ public class Product implements ModelInterface { ...@@ -177,7 +171,8 @@ public class Product implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -191,7 +186,8 @@ public class Product implements ModelInterface { ...@@ -191,7 +186,8 @@ public class Product implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -25,16 +24,15 @@ import javax.persistence.Version; ...@@ -25,16 +24,15 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "readers") @Table(name = "readers")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"), @NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"),
@NamedQuery(name = "Reader.findByReadersId", query = "SELECT r FROM Reader r WHERE r.readersId = :readersId"), @NamedQuery(name = "Reader.findByReadersId", query = "SELECT r FROM Reader r WHERE r.readersId = :readersId"),
@NamedQuery(name = "Reader.findByReaderId", query = "SELECT r FROM Reader r WHERE r.readerId = :readerId"), @NamedQuery(name = "Reader.findByReaderId", query = "SELECT r FROM Reader r WHERE r.readerId = :readerId"),
@NamedQuery(name = "Reader.findByReaderDescription", query = "SELECT r FROM Reader r WHERE r.readerDescription = :readerDescription")}) @NamedQuery(name = "Reader.findByReaderDescription", query = "SELECT r FROM Reader r WHERE r.readerDescription = :readerDescription") })
public class Reader implements ModelInterface { public class Reader implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "readers_id", nullable = false) @Column(name = "readers_id", nullable = false)
private Integer id; private Integer id;
@Column(name = "reader_id") @Column(name = "reader_id")
...@@ -98,12 +96,14 @@ public class Reader implements ModelInterface { ...@@ -98,12 +96,14 @@ public class Reader implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Reader)) { if (!(object instanceof Reader)) {
return false; return false;
} }
Reader other = (Reader) object; Reader other = (Reader) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -122,7 +122,8 @@ public class Reader implements ModelInterface { ...@@ -122,7 +122,8 @@ public class Reader implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -136,7 +137,8 @@ public class Reader implements ModelInterface { ...@@ -136,7 +137,8 @@ public class Reader implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -4,10 +4,8 @@ ...@@ -4,10 +4,8 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -26,16 +24,15 @@ import javax.persistence.Version; ...@@ -26,16 +24,15 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "reader_events") @Table(name = "reader_events")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"), @NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"),
@NamedQuery(name = "ReaderEvent.findByReaderEventsId", query = "SELECT r FROM ReaderEvent r WHERE r.readerEventsId = :readerEventsId"), @NamedQuery(name = "ReaderEvent.findByReaderEventsId", query = "SELECT r FROM ReaderEvent r WHERE r.readerEventsId = :readerEventsId"),
@NamedQuery(name = "ReaderEvent.findByEventTime", query = "SELECT r FROM ReaderEvent r WHERE r.eventTime = :eventTime"), @NamedQuery(name = "ReaderEvent.findByEventTime", query = "SELECT r FROM ReaderEvent r WHERE r.eventTime = :eventTime"),
@NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value")}) @NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value") })
public class ReaderEvent implements ModelInterface { public class ReaderEvent implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "reader_events_id", nullable = false) @Column(name = "reader_events_id", nullable = false)
private Integer id; private Integer id;
...@@ -107,12 +104,14 @@ public class ReaderEvent implements ModelInterface { ...@@ -107,12 +104,14 @@ public class ReaderEvent implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof ReaderEvent)) { if (!(object instanceof ReaderEvent)) {
return false; return false;
} }
ReaderEvent other = (ReaderEvent) object; ReaderEvent other = (ReaderEvent) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -120,7 +119,8 @@ public class ReaderEvent implements ModelInterface { ...@@ -120,7 +119,8 @@ public class ReaderEvent implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.ReaderEvent[readerEventsId=" + getId() + "]"; return "fi.insomnia.bortal.model.ReaderEvent[readerEventsId=" + getId()
+ "]";
} }
/** /**
...@@ -131,7 +131,8 @@ public class ReaderEvent implements ModelInterface { ...@@ -131,7 +131,8 @@ public class ReaderEvent implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -145,7 +146,8 @@ public class ReaderEvent implements ModelInterface { ...@@ -145,7 +146,8 @@ public class ReaderEvent implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model; ...@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List; import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType; import javax.persistence.CascadeType;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
...@@ -26,15 +25,14 @@ import javax.persistence.Version; ...@@ -26,15 +25,14 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "roles") @Table(name = "roles")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"), @NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"),
@NamedQuery(name = "Role.findByRolesId", query = "SELECT r FROM Role r WHERE r.rolesId = :rolesId"), @NamedQuery(name = "Role.findByRolesId", query = "SELECT r FROM Role r WHERE r.rolesId = :rolesId"),
@NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.roleName = :roleName")}) @NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.roleName = :roleName") })
public class Role implements ModelInterface { public class Role implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "roles_id", nullable = false) @Column(name = "roles_id", nullable = false)
private Integer id; private Integer id;
...@@ -100,7 +98,8 @@ public class Role implements ModelInterface { ...@@ -100,7 +98,8 @@ public class Role implements ModelInterface {
return roleInheritanceList1; return roleInheritanceList1;
} }
public void setRoleInheritanceList1(List<RoleInheritance> roleInheritanceList1) { public void setRoleInheritanceList1(
List<RoleInheritance> roleInheritanceList1) {
this.roleInheritanceList1 = roleInheritanceList1; this.roleInheritanceList1 = roleInheritanceList1;
} }
...@@ -137,12 +136,14 @@ public class Role implements ModelInterface { ...@@ -137,12 +136,14 @@ public class Role implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Role)) { if (!(object instanceof Role)) {
return false; return false;
} }
Role other = (Role) object; Role other = (Role) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -161,7 +162,8 @@ public class Role implements ModelInterface { ...@@ -161,7 +162,8 @@ public class Role implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -175,7 +177,8 @@ public class Role implements ModelInterface { ...@@ -175,7 +177,8 @@ public class Role implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -23,16 +20,15 @@ import javax.persistence.Version; ...@@ -23,16 +20,15 @@ import javax.persistence.Version;
* @author jkj * @author jkj
*/ */
@Entity @Entity
@Table(name = "role_inheritance", uniqueConstraints = { @Table(name = "role_inheritance", uniqueConstraints = { @UniqueConstraint(columnNames = {
@UniqueConstraint(columnNames = {"roles_id", "inherits"})}) "roles_id", "inherits" }) })
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "RoleInheritance.findAll", query = "SELECT r FROM RoleInheritance r"), @NamedQuery(name = "RoleInheritance.findAll", query = "SELECT r FROM RoleInheritance r"),
@NamedQuery(name = "RoleInheritance.findByRoleInheritanceId", query = "SELECT r FROM RoleInheritance r WHERE r.roleInheritanceId = :roleInheritanceId")}) @NamedQuery(name = "RoleInheritance.findByRoleInheritanceId", query = "SELECT r FROM RoleInheritance r WHERE r.roleInheritanceId = :roleInheritanceId") })
public class RoleInheritance implements ModelInterface { public class RoleInheritance implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "role_inheritance_id", nullable = false) @Column(name = "role_inheritance_id", nullable = false)
private Integer id; private Integer id;
@JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false) @JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false)
...@@ -77,12 +73,14 @@ public class RoleInheritance implements ModelInterface { ...@@ -77,12 +73,14 @@ public class RoleInheritance implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleInheritance)) { if (!(object instanceof RoleInheritance)) {
return false; return false;
} }
RoleInheritance other = (RoleInheritance) object; RoleInheritance other = (RoleInheritance) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -90,7 +88,8 @@ public class RoleInheritance implements ModelInterface { ...@@ -90,7 +88,8 @@ public class RoleInheritance implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.RoleInheritance[roleInheritanceId=" + getId() + "]"; return "fi.insomnia.bortal.model.RoleInheritance[roleInheritanceId="
+ getId() + "]";
} }
/** /**
...@@ -101,7 +100,8 @@ public class RoleInheritance implements ModelInterface { ...@@ -101,7 +100,8 @@ public class RoleInheritance implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -115,7 +115,8 @@ public class RoleInheritance implements ModelInterface { ...@@ -115,7 +115,8 @@ public class RoleInheritance implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -23,16 +20,15 @@ import javax.persistence.Version; ...@@ -23,16 +20,15 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "role_rights") @Table(name = "role_rights")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"), @NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"),
@NamedQuery(name = "RoleRight.findByRoleRights", query = "SELECT r FROM RoleRight r WHERE r.roleRights = :roleRights"), @NamedQuery(name = "RoleRight.findByRoleRights", query = "SELECT r FROM RoleRight r WHERE r.roleRights = :roleRights"),
@NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"), @NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"),
@NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write")}) @NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write") })
public class RoleRight implements ModelInterface { public class RoleRight implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@Column(name = "role_rights_id", nullable = false) @Column(name = "role_rights_id", nullable = false)
private Integer id; private Integer id;
...@@ -41,7 +37,7 @@ public class RoleRight implements ModelInterface { ...@@ -41,7 +37,7 @@ public class RoleRight implements ModelInterface {
@Column(name = "write", nullable = false) @Column(name = "write", nullable = false)
private boolean write; private boolean write;
//TODO: add execute // TODO: add execute
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id") @JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id")
@ManyToOne @ManyToOne
private AccessRight accessRightsId; private AccessRight accessRightsId;
...@@ -106,12 +102,14 @@ public class RoleRight implements ModelInterface { ...@@ -106,12 +102,14 @@ public class RoleRight implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleRight)) { if (!(object instanceof RoleRight)) {
return false; return false;
} }
RoleRight other = (RoleRight) object; RoleRight other = (RoleRight) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -130,7 +128,8 @@ public class RoleRight implements ModelInterface { ...@@ -130,7 +128,8 @@ public class RoleRight implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -144,7 +143,8 @@ public class RoleRight implements ModelInterface { ...@@ -144,7 +143,8 @@ public class RoleRight implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -27,7 +26,7 @@ import javax.persistence.Version; ...@@ -27,7 +26,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "users") @Table(name = "users")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "User.findAll", query = "SELECT u FROM User u"), @NamedQuery(name = "User.findAll", query = "SELECT u FROM User u"),
@NamedQuery(name = "User.findByUsersId", query = "SELECT u FROM User u WHERE u.usersId = :usersId"), @NamedQuery(name = "User.findByUsersId", query = "SELECT u FROM User u WHERE u.usersId = :usersId"),
@NamedQuery(name = "User.findByCreated", query = "SELECT u FROM User u WHERE u.created = :created"), @NamedQuery(name = "User.findByCreated", query = "SELECT u FROM User u WHERE u.created = :created"),
...@@ -44,7 +43,7 @@ import javax.persistence.Version; ...@@ -44,7 +43,7 @@ import javax.persistence.Version;
@NamedQuery(name = "User.findByTown", query = "SELECT u FROM User u WHERE u.town = :town"), @NamedQuery(name = "User.findByTown", query = "SELECT u FROM User u WHERE u.town = :town"),
@NamedQuery(name = "User.findByPhone", query = "SELECT u FROM User u WHERE u.phone = :phone"), @NamedQuery(name = "User.findByPhone", query = "SELECT u FROM User u WHERE u.phone = :phone"),
@NamedQuery(name = "User.findByFemale", query = "SELECT u FROM User u WHERE u.female = :female"), @NamedQuery(name = "User.findByFemale", query = "SELECT u FROM User u WHERE u.female = :female"),
@NamedQuery(name = "User.findByLogin", query = "SELECT u FROM User u WHERE u.login = :login")}) @NamedQuery(name = "User.findByLogin", query = "SELECT u FROM User u WHERE u.login = :login") })
public class User implements ModelInterface { public class User implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -128,7 +127,8 @@ public class User implements ModelInterface { ...@@ -128,7 +127,8 @@ public class User implements ModelInterface {
this.votes = votes; this.votes = votes;
} }
public User(Integer usersId, Date created, boolean active, String lastname, String firstnames) { public User(Integer usersId, Date created, boolean active, String lastname,
String firstnames) {
this.id = usersId; this.id = usersId;
this.created = created; this.created = created;
this.active = active; this.active = active;
...@@ -248,7 +248,6 @@ public class User implements ModelInterface { ...@@ -248,7 +248,6 @@ public class User implements ModelInterface {
this.female = female; this.female = female;
} }
public String getLogin() { public String getLogin() {
return login; return login;
} }
...@@ -265,7 +264,6 @@ public class User implements ModelInterface { ...@@ -265,7 +264,6 @@ public class User implements ModelInterface {
this.votes = voteList; this.votes = voteList;
} }
public List<LogEntry> getLogEntryList() { public List<LogEntry> getLogEntryList() {
return logEntryList; return logEntryList;
} }
...@@ -286,7 +284,8 @@ public class User implements ModelInterface { ...@@ -286,7 +284,8 @@ public class User implements ModelInterface {
return compoEntryParticipantList; return compoEntryParticipantList;
} }
public void setCompoEntryParticipantList(List<CompoEntryParticipant> compoEntryParticipantList) { public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList; this.compoEntryParticipantList = compoEntryParticipantList;
} }
...@@ -342,7 +341,8 @@ public class User implements ModelInterface { ...@@ -342,7 +341,8 @@ public class User implements ModelInterface {
return discountInstanceList; return discountInstanceList;
} }
public void setDiscountInstanceList(List<DiscountInstance> discountInstanceList) { public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList; this.discountInstanceList = discountInstanceList;
} }
...@@ -363,12 +363,14 @@ public class User implements ModelInterface { ...@@ -363,12 +363,14 @@ public class User implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof User)) { if (!(object instanceof User)) {
return false; return false;
} }
User other = (User) object; User other = (User) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -387,7 +389,8 @@ public class User implements ModelInterface { ...@@ -387,7 +389,8 @@ public class User implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -401,7 +404,8 @@ public class User implements ModelInterface { ...@@ -401,7 +404,8 @@ public class User implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -23,12 +21,12 @@ import javax.persistence.Version; ...@@ -23,12 +21,12 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "user_images") @Table(name = "user_images")
@NamedQueries({ @NamedQueries( {
@NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"), @NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"),
@NamedQuery(name = "UserImage.findByUserImagesId", query = "SELECT u FROM UserImage u WHERE u.userImagesId = :userImagesId"), @NamedQuery(name = "UserImage.findByUserImagesId", query = "SELECT u FROM UserImage u WHERE u.userImagesId = :userImagesId"),
@NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"), @NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"),
@NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"), @NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"),
@NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType")}) @NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType") })
public class UserImage implements ModelInterface { public class UserImage implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -99,12 +97,14 @@ public class UserImage implements ModelInterface { ...@@ -99,12 +97,14 @@ public class UserImage implements ModelInterface {
@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 not set // TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof UserImage)) { if (!(object instanceof UserImage)) {
return false; return false;
} }
UserImage other = (UserImage) object; UserImage other = (UserImage) object;
if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) { if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
...@@ -112,7 +112,8 @@ public class UserImage implements ModelInterface { ...@@ -112,7 +112,8 @@ public class UserImage implements ModelInterface {
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.UserImage[userImagesId=" + getId() + "]"; return "fi.insomnia.bortal.model.UserImage[userImagesId=" + getId()
+ "]";
} }
/** /**
...@@ -123,7 +124,8 @@ public class UserImage implements ModelInterface { ...@@ -123,7 +124,8 @@ public class UserImage implements ModelInterface {
} }
/** /**
* @param id the id to set * @param id
* the id to set
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -137,7 +139,8 @@ public class UserImage implements ModelInterface { ...@@ -137,7 +139,8 @@ public class UserImage implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
...@@ -151,7 +154,8 @@ public class UserImage implements ModelInterface { ...@@ -151,7 +154,8 @@ public class UserImage implements ModelInterface {
} }
/** /**
* @param user the user to set * @param user
* the user to set
*/ */
public void setUser(User user) { public void setUser(User user) {
this.user = user; this.user = user;
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
package fi.insomnia.bortal.model; package fi.insomnia.bortal.model;
import java.util.Date; import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
...@@ -24,14 +23,13 @@ import javax.persistence.Version; ...@@ -24,14 +23,13 @@ import javax.persistence.Version;
* A vote for a compo entry * A vote for a compo entry
*/ */
@Entity @Entity
@Table(name = "votes", uniqueConstraints = { @Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = {
@UniqueConstraint(columnNames = { "entries_id", "users_id" }) })
"entries_id", "users_id"})}) @NamedQueries( {
@NamedQueries({
@NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"), @NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"),
@NamedQuery(name = "Vote.findByVotesId", query = "SELECT v FROM Vote v WHERE v.votesId = :votesId"), @NamedQuery(name = "Vote.findByVotesId", query = "SELECT v FROM Vote v WHERE v.votesId = :votesId"),
@NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"), @NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"),
@NamedQuery(name = "Vote.findByVoteTime", query = "SELECT v FROM Vote v WHERE v.voteTime = :voteTime")}) @NamedQuery(name = "Vote.findByVoteTime", query = "SELECT v FROM Vote v WHERE v.voteTime = :voteTime") })
public class Vote implements ModelInterface { public class Vote implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -124,7 +122,8 @@ public class Vote implements ModelInterface { ...@@ -124,7 +122,8 @@ public class Vote implements ModelInterface {
} }
/** /**
* @param jpaVersionField the jpaVersionField to set * @param jpaVersionField
* the jpaVersionField to set
*/ */
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
...@@ -138,7 +137,8 @@ public class Vote implements ModelInterface { ...@@ -138,7 +137,8 @@ public class Vote implements ModelInterface {
} }
/** /**
* @param compoEntry the compoEntry to set * @param compoEntry
* the compoEntry to set
*/ */
public void setCompoEntry(CompoEntry compoEntry) { public void setCompoEntry(CompoEntry compoEntry) {
this.compoEntry = compoEntry; this.compoEntry = compoEntry;
...@@ -152,7 +152,8 @@ public class Vote implements ModelInterface { ...@@ -152,7 +152,8 @@ public class Vote implements ModelInterface {
} }
/** /**
* @param voter the voter to set * @param voter
* the voter to set
*/ */
public void setVoter(User voter) { public void setVoter(User voter) {
this.voter = voter; this.voter = voter;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!