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 @@
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -24,14 +22,13 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "access_rights")
@NamedQueries({
@NamedQueries( {
@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.findByAccessRight", query = "SELECT a FROM AccessRight a WHERE a.accessRight = :accessRight") })
public class AccessRight implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "access_rights_id", nullable = false)
private Integer id;
......
......@@ -98,7 +98,6 @@ public class AccountEvent implements ModelInterface {
this.eventTime = eventTime;
}
public BigInteger getUnitPrice() {
return unitPrice;
}
......@@ -188,8 +187,7 @@ public class AccountEvent implements ModelInterface {
}
AccountEvent other = (AccountEvent) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id
.equals(other.id))) {
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
......@@ -197,7 +195,8 @@ public class AccountEvent implements ModelInterface {
@Override
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;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -27,18 +26,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "bills")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bills_id", nullable = false)
private Integer id;
@Column(name = "due_date")
......@@ -72,7 +70,6 @@ public class Bill implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Bill() {
}
......@@ -145,12 +142,14 @@ public class Bill implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......
......@@ -5,9 +5,6 @@
package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -24,17 +21,16 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "bill_lines")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bill_lines_id", nullable = false)
private Integer id;
......@@ -57,7 +53,6 @@ public class BillLine implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public BillLine() {
}
......@@ -65,7 +60,8 @@ public class BillLine implements ModelInterface {
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.product = product;
this.units = units;
......@@ -122,12 +118,14 @@ public class BillLine implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......
......@@ -5,10 +5,8 @@
package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -27,14 +25,13 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "card_templates")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "card_templates_id", nullable = false)
private Integer id;
@Lob
......@@ -53,7 +50,6 @@ public class CardTemplate implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public CardTemplate() {
}
......@@ -115,12 +111,14 @@ public class CardTemplate implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -128,7 +126,8 @@ public class CardTemplate implements ModelInterface {
@Override
public String toString() {
return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId=" + id + "]";
return "fi.insomnia.bortal.model.CardTemplate[cardTemplatesId=" + id
+ "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -30,7 +28,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "compos")
@NamedQueries({
@NamedQueries( {
@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.findByCompoName", query = "SELECT c FROM Compo c WHERE c.compoName = :compoName"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "compos_id", nullable = false)
private Integer id;
......@@ -77,7 +74,6 @@ public class Compo implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
}
......@@ -180,12 +176,14 @@ public class Compo implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......
......@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -30,18 +28,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "entries")
@NamedQueries({
@NamedQueries( {
@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.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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entries_id", nullable = false)
private Integer id;
......@@ -74,7 +71,6 @@ public class CompoEntry implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
}
......@@ -156,7 +152,8 @@ public class CompoEntry implements ModelInterface {
return compoEntryParticipantList;
}
public void setCompoEntryParticipantList(List<CompoEntryParticipant> compoEntryParticipantList) {
public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
}
......@@ -185,12 +182,14 @@ public class CompoEntry implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......
......@@ -5,10 +5,8 @@
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -28,7 +26,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "entry_files")
@NamedQueries({
@NamedQueries( {
@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.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entry_files_id", nullable = false)
private Integer id;
@Column(name = "mime_type")
......@@ -68,7 +65,6 @@ public class CompoEntryFile implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
}
......@@ -162,12 +158,14 @@ public class CompoEntryFile implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -175,7 +173,8 @@ public class CompoEntryFile implements ModelInterface {
@Override
public String toString() {
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id + "]";
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id
+ "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -5,9 +5,6 @@
package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -24,14 +21,13 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "entry_participations")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entry_participations_id", nullable = false)
private Integer id;
@Column(name = "role")
......@@ -47,7 +43,6 @@ public class CompoEntryParticipant implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
}
......@@ -112,12 +107,14 @@ public class CompoEntryParticipant implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -125,7 +122,8 @@ public class CompoEntryParticipant implements ModelInterface {
@Override
public String toString() {
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId=" + id + "]";
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId="
+ id + "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -26,7 +24,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "discounts")
@NamedQueries({
@NamedQueries( {
@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.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "discounts_id", nullable = false)
private Integer id;
......@@ -72,7 +69,6 @@ public class Discount implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Discount() {
}
......@@ -88,7 +84,8 @@ public class Discount implements ModelInterface {
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.percentage = percentage;
this.amountMin = amountMin;
......@@ -166,7 +163,8 @@ public class Discount implements ModelInterface {
return discountInstanceList;
}
public void setDiscountInstanceList(List<DiscountInstance> discountInstanceList) {
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
......@@ -179,12 +177,14 @@ public class Discount implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......
......@@ -4,7 +4,6 @@
*/
package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -21,14 +20,13 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "discount_instances")
@NamedQueries({
@NamedQueries( {
@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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "discounts_instances_id", nullable = false)
private Integer id;
@JoinColumn(name = "account_events_id", referencedColumnName = "account_events_id")
......@@ -84,12 +82,14 @@ public class DiscountInstance implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -97,7 +97,8 @@ public class DiscountInstance implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -28,18 +27,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "events")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "events_id", nullable = false)
private Integer id;
@Column(name = "start_time")
......@@ -183,12 +181,14 @@ public class Event implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -26,15 +25,14 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "maps")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "maps_id", nullable = false)
private Integer id;
@Lob
......@@ -99,12 +97,14 @@ public class EventMap implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -23,18 +22,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "event_settings")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_settings_id", nullable = false)
private Integer id;
@Column(name = "resource_bundle")
......@@ -107,12 +105,14 @@ public class EventSettings implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -120,7 +120,8 @@ public class EventSettings implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -23,17 +22,15 @@ import javax.persistence.Version;
* @author jkj
*/
@Entity
@Table(name = "event_status", uniqueConstraints = {
@UniqueConstraint(columnNames = {"status_name"})})
@NamedQueries({
@Table(name = "event_status", uniqueConstraints = { @UniqueConstraint(columnNames = { "status_name" }) })
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_status_id", nullable = false)
private Integer id;
......@@ -82,12 +79,14 @@ public class EventStatus implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -95,7 +94,8 @@ public class EventStatus implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -25,18 +24,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "food_waves")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_waves_id", nullable = false)
private Integer id;
......@@ -118,12 +116,14 @@ public class FoodWave implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -22,16 +21,15 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "food_wave_templates")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_wave_templates_id", nullable = false)
private Integer id;
......@@ -82,12 +80,14 @@ public class FoodWaveTemplate implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -95,7 +95,8 @@ public class FoodWaveTemplate implements ModelInterface {
@Override
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 {
}
/**
* @param products the products to set
* @param products
* the products to set
*/
public void setProducts(List<Product> products) {
this.products = products;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -25,19 +24,18 @@ import javax.persistence.Version;
* @author jkj
*/
@Entity
@Table(name = "group_memberships", uniqueConstraints = {
@UniqueConstraint(columnNames = {"users_id", "groups_id"})})
@NamedQueries({
@Table(name = "group_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = {
"users_id", "groups_id" }) })
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "group_memberships_id", nullable = false)
private Integer id;
@Column(name = "invite_accepted")
......@@ -124,12 +122,14 @@ public class GroupMembership implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -137,7 +137,8 @@ public class GroupMembership implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -22,15 +21,14 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "locations")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "locations_id", nullable = false)
private Integer id;
......@@ -89,12 +87,14 @@ public class Location implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -25,16 +24,15 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "event_log")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_id", nullable = false)
private Integer id;
......@@ -106,12 +104,14 @@ public class LogEntry implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -23,15 +22,14 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "event_log_types")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_types_id", nullable = false)
private Integer id;
......@@ -80,12 +78,14 @@ public class LogEntryType implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -93,7 +93,8 @@ public class LogEntryType implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -7,15 +7,16 @@ package fi.insomnia.bortal.model;
import java.io.Serializable;
/**
*
* @author tuukka
*/
public interface ModelInterface extends Serializable {
public Integer getId();
public void setId(Integer id);
public int getJpaVersionField();
public void setJpaVersionField(int jpaVersionField);
}
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -25,7 +24,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "news")
@NamedQueries({
@NamedQueries( {
@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.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_id", nullable = false)
private Integer id;
......@@ -142,12 +140,14 @@ public class News implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -25,17 +24,16 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "news_groups")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_groups_id", nullable = false)
private Integer id;
......@@ -117,12 +115,14 @@ public class NewsGroup implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -130,7 +130,8 @@ public class NewsGroup implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -25,7 +24,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "places")
@NamedQueries({
@NamedQueries( {
@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.findByPlaceDescription", query = "SELECT p FROM Place p WHERE p.placeDescription = :placeDescription"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "places_id", nullable = false)
private Integer id;
@Column(name = "place_description")
......@@ -175,12 +173,14 @@ public class Place implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -7,7 +7,6 @@ package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -28,7 +27,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "groups")
@NamedQueries({
@NamedQueries( {
@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.findByGroupCreated", query = "SELECT p FROM PlaceGroup p WHERE p.groupCreated = :groupCreated"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "groups_id", nullable = false)
private Integer id;
......@@ -79,7 +77,8 @@ public class PlaceGroup implements ModelInterface {
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.groupCreated = groupCreated;
this.groupEdited = groupEdited;
......@@ -167,12 +166,14 @@ public class PlaceGroup implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -5,11 +5,9 @@
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -30,18 +28,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "printed_cards")
@NamedQueries({
@NamedQueries( {
@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.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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "printed_cards_id", nullable = false)
private Integer id;
......@@ -71,7 +68,6 @@ public class PrintedCard implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public PrintedCard() {
}
......@@ -87,7 +83,8 @@ public class PrintedCard implements ModelInterface {
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.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime;
......@@ -167,12 +164,14 @@ public class PrintedCard implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -180,7 +179,8 @@ public class PrintedCard implements ModelInterface {
@Override
public String toString() {
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id + "]";
return "fi.insomnia.bortal.model.PrintedCard[printedCardsId=" + id
+ "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -4,11 +4,9 @@
*/
package fi.insomnia.bortal.model;
import java.math.BigInteger;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -28,18 +26,17 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "products")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "products_id", nullable = false)
private Integer id;
@Column(name = "product_name")
......@@ -56,9 +53,7 @@ public class Product implements ModelInterface {
private List<Place> placeList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "productsId")
private List<AccountEvent> accountEventList;
@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")})
@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") })
@ManyToMany
private List<FoodWaveTemplate> foodWaveTemplate;
@Version
......@@ -150,8 +145,7 @@ public class Product implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -25,16 +24,15 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "readers")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "readers_id", nullable = false)
private Integer id;
@Column(name = "reader_id")
......@@ -98,12 +96,14 @@ public class Reader implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -4,10 +4,8 @@
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -26,16 +24,15 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "reader_events")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "reader_events_id", nullable = false)
private Integer id;
......@@ -107,12 +104,14 @@ public class ReaderEvent implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -120,7 +119,8 @@ public class ReaderEvent implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -6,7 +6,6 @@ package fi.insomnia.bortal.model;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
......@@ -26,15 +25,14 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "roles")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "roles_id", nullable = false)
private Integer id;
......@@ -100,7 +98,8 @@ public class Role implements ModelInterface {
return roleInheritanceList1;
}
public void setRoleInheritanceList1(List<RoleInheritance> roleInheritanceList1) {
public void setRoleInheritanceList1(
List<RoleInheritance> roleInheritanceList1) {
this.roleInheritanceList1 = roleInheritanceList1;
}
......@@ -137,12 +136,14 @@ public class Role implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -4,9 +4,6 @@
*/
package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -23,16 +20,15 @@ import javax.persistence.Version;
* @author jkj
*/
@Entity
@Table(name = "role_inheritance", uniqueConstraints = {
@UniqueConstraint(columnNames = {"roles_id", "inherits"})})
@NamedQueries({
@Table(name = "role_inheritance", uniqueConstraints = { @UniqueConstraint(columnNames = {
"roles_id", "inherits" }) })
@NamedQueries( {
@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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "role_inheritance_id", nullable = false)
private Integer id;
@JoinColumn(name = "roles_id", referencedColumnName = "roles_id", nullable = false)
......@@ -77,12 +73,14 @@ public class RoleInheritance implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -90,7 +88,8 @@ public class RoleInheritance implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -4,9 +4,6 @@
*/
package fi.insomnia.bortal.model;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -23,16 +20,15 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "role_rights")
@NamedQueries({
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "role_rights_id", nullable = false)
private Integer id;
......@@ -41,7 +37,7 @@ public class RoleRight implements ModelInterface {
@Column(name = "write", nullable = false)
private boolean write;
//TODO: add execute
// TODO: add execute
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id")
@ManyToOne
private AccessRight accessRightsId;
......@@ -106,12 +102,14 @@ public class RoleRight implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -4,7 +4,6 @@
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import java.util.List;
......@@ -27,7 +26,7 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "users")
@NamedQueries({
@NamedQueries( {
@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.findByCreated", query = "SELECT u FROM User u WHERE u.created = :created"),
......@@ -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.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.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 {
private static final long serialVersionUID = 1L;
......@@ -128,7 +127,8 @@ public class User implements ModelInterface {
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.created = created;
this.active = active;
......@@ -248,7 +248,6 @@ public class User implements ModelInterface {
this.female = female;
}
public String getLogin() {
return login;
}
......@@ -265,7 +264,6 @@ public class User implements ModelInterface {
this.votes = voteList;
}
public List<LogEntry> getLogEntryList() {
return logEntryList;
}
......@@ -286,7 +284,8 @@ public class User implements ModelInterface {
return compoEntryParticipantList;
}
public void setCompoEntryParticipantList(List<CompoEntryParticipant> compoEntryParticipantList) {
public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
}
......@@ -342,7 +341,8 @@ public class User implements ModelInterface {
return discountInstanceList;
}
public void setDiscountInstanceList(List<DiscountInstance> discountInstanceList) {
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
......@@ -363,12 +363,14 @@ public class User implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -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) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......
......@@ -4,8 +4,6 @@
*/
package fi.insomnia.bortal.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
......@@ -23,12 +21,12 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "user_images")
@NamedQueries({
@NamedQueries( {
@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.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.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 {
private static final long serialVersionUID = 1L;
......@@ -99,12 +97,14 @@ public class UserImage implements ModelInterface {
@Override
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)) {
return false;
}
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 true;
......@@ -112,7 +112,8 @@ public class UserImage implements ModelInterface {
@Override
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 {
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......@@ -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) {
this.user = user;
......
......@@ -4,7 +4,6 @@
*/
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Column;
......@@ -24,14 +23,13 @@ import javax.persistence.Version;
* A vote for a compo entry
*/
@Entity
@Table(name = "votes", uniqueConstraints = {
@UniqueConstraint(columnNames = {
"entries_id", "users_id"})})
@NamedQueries({
@Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = {
"entries_id", "users_id" }) })
@NamedQueries( {
@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.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 {
private static final long serialVersionUID = 1L;
......@@ -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) {
this.jpaVersionField = jpaVersionField;
......@@ -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) {
this.compoEntry = compoEntry;
......@@ -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) {
this.voter = voter;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!