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 1171 additions and 1150 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,17 +22,16 @@ 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;
@Column(name = "access_right", nullable = false)
private String accessRight;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "accessRightsId")
......
......@@ -66,21 +66,21 @@ public class AccountEvent implements ModelInterface {
@Version
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
public AccountEvent() {
......@@ -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;
......@@ -22,23 +21,22 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "bills")
@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")})
@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") })
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")
......@@ -61,104 +59,105 @@ public class Bill implements ModelInterface {
private User usersId;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
@Version
@Column(nullable = false)
private int jpaVersionField;
public Bill() {
}
public Bill(Integer billsId) {
this.id = billsId;
this.id = billsId;
}
public Date getDueDate() {
return dueDate;
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
this.notes = notes;
}
public List<BillLine> getBillLineList() {
return billLineList;
return billLineList;
}
public void setBillLineList(List<BillLine> billLineList) {
this.billLineList = billLineList;
this.billLineList = billLineList;
}
public AccountEvent getAccoutEventsId() {
return accoutEventsId;
return accoutEventsId;
}
public void setAccoutEventsId(AccountEvent accoutEventsId) {
this.accoutEventsId = accoutEventsId;
this.accoutEventsId = accoutEventsId;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Bill[billsId=" + id + "]";
return "fi.insomnia.bortal.model.Bill[billsId=" + 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;
......@@ -19,34 +16,33 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "bill_lines")
@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")})
@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") })
public class BillLine implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bill_lines_id", nullable = false)
private Integer id;
@Column(name = "product", nullable = false)
private String product;
@Column(name = "units", nullable = false)
private int units;
@Column(name = "unit_price", nullable = false)
private float unitPrice;
@Column(name = "vat", nullable = false)
private float vat;
@JoinColumn(name = "bills_id", referencedColumnName = "bills_id")
......@@ -57,85 +53,87 @@ public class BillLine implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public BillLine() {
}
public BillLine(Integer billLinesId) {
this.id = billLinesId;
this.id = billLinesId;
}
public BillLine(Integer billLinesId, String product, int units, float unitPrice, float vat) {
this.id = billLinesId;
this.product = product;
this.units = units;
this.unitPrice = unitPrice;
this.vat = vat;
public BillLine(Integer billLinesId, String product, int units,
float unitPrice, float vat) {
this.id = billLinesId;
this.product = product;
this.units = units;
this.unitPrice = unitPrice;
this.vat = vat;
}
public String getProduct() {
return product;
return product;
}
public void setProduct(String product) {
this.product = product;
this.product = product;
}
public int getUnits() {
return units;
return units;
}
public void setUnits(int units) {
this.units = units;
this.units = units;
}
public float getUnitPrice() {
return unitPrice;
return unitPrice;
}
public void setUnitPrice(float unitPrice) {
this.unitPrice = unitPrice;
this.unitPrice = unitPrice;
}
public float getVat() {
return vat;
return vat;
}
public void setVat(float vat) {
this.vat = vat;
this.vat = vat;
}
public Bill getBillsId() {
return billsId;
return billsId;
}
public void setBillsId(Bill billsId) {
this.billsId = billsId;
this.billsId = billsId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.BillLine[billLinesId=" + id + "]";
return "fi.insomnia.bortal.model.BillLine[billLinesId=" + id + "]";
}
public void setJpaVersionField(int jpaVersionField) {
......@@ -147,11 +145,11 @@ public class BillLine implements ModelInterface {
}
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
}
......@@ -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;
......@@ -22,25 +20,24 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "card_templates")
@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")})
@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") })
public class CardTemplate implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "card_templates_id", nullable = false)
private Integer id;
@Lob
@Column(name = "template_image")
private byte[] templateImage;
@Column(name = "template_name", nullable = false)
private String templateName;
@JoinColumn(name = "events_id", referencedColumnName = "events_id")
......@@ -53,82 +50,84 @@ public class CardTemplate implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public CardTemplate() {
}
public CardTemplate(Integer cardTemplatesId) {
this.id = cardTemplatesId;
this.id = cardTemplatesId;
}
public CardTemplate(Integer cardTemplatesId, String templateName) {
this.id = cardTemplatesId;
this.templateName = templateName;
this.id = cardTemplatesId;
this.templateName = templateName;
}
public byte[] getTemplateImage() {
return templateImage;
return templateImage;
}
public void setTemplateImage(byte[] templateImage) {
this.templateImage = templateImage;
this.templateImage = templateImage;
}
public String getTemplateName() {
return templateName;
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
this.templateName = templateName;
}
public Event getEventsId() {
return eventsId;
return eventsId;
}
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
this.eventsId = eventsId;
}
public List<Role> getRoleList() {
return roleList;
return roleList;
}
public void setRoleList(List<Role> roleList) {
this.roleList = roleList;
this.roleList = roleList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@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;
......@@ -25,28 +23,27 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "compos")
@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"),
@NamedQuery(name = "Compo.findByCompoStart", query = "SELECT c FROM Compo c WHERE c.compoStart = :compoStart"),
@NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"),
@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")})
@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"),
@NamedQuery(name = "Compo.findByCompoStart", query = "SELECT c FROM Compo c WHERE c.compoStart = :compoStart"),
@NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"),
@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") })
public class Compo implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "compos_id", nullable = false)
private Integer id;
@Column(name = "compo_name", nullable = false)
private String compoName;
@Column(name = "compo_start")
......@@ -64,7 +61,7 @@ public class Compo implements ModelInterface {
@Column(name = "submit_end")
@Temporal(TemporalType.TIMESTAMP)
private Date submitEnd;
@Column(name = "hold_voting", nullable = false)
private boolean holdVoting;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "composId")
......@@ -77,123 +74,124 @@ public class Compo implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public Compo() {
}
public Compo(Integer composId) {
this.id = composId;
this.id = composId;
}
public Compo(Integer composId, String compoName, boolean holdVoting) {
this.id = composId;
this.compoName = compoName;
this.holdVoting = holdVoting;
this.id = composId;
this.compoName = compoName;
this.holdVoting = holdVoting;
}
public String getCompoName() {
return compoName;
return compoName;
}
public void setCompoName(String compoName) {
this.compoName = compoName;
this.compoName = compoName;
}
public Date getCompoStart() {
return compoStart;
return compoStart;
}
public void setCompoStart(Date compoStart) {
this.compoStart = compoStart;
this.compoStart = compoStart;
}
public Date getVoteStart() {
return voteStart;
return voteStart;
}
public void setVoteStart(Date voteStart) {
this.voteStart = voteStart;
this.voteStart = voteStart;
}
public Date getVoteEnd() {
return voteEnd;
return voteEnd;
}
public void setVoteEnd(Date voteEnd) {
this.voteEnd = voteEnd;
this.voteEnd = voteEnd;
}
public Date getSubmitStart() {
return submitStart;
return submitStart;
}
public void setSubmitStart(Date submitStart) {
this.submitStart = submitStart;
this.submitStart = submitStart;
}
public Date getSubmitEnd() {
return submitEnd;
return submitEnd;
}
public void setSubmitEnd(Date submitEnd) {
this.submitEnd = submitEnd;
this.submitEnd = submitEnd;
}
public boolean getHoldVoting() {
return holdVoting;
return holdVoting;
}
public void setHoldVoting(boolean holdVoting) {
this.holdVoting = holdVoting;
this.holdVoting = holdVoting;
}
public List<CompoEntry> getCompoEntryList() {
return compoEntryList;
return compoEntryList;
}
public void setCompoEntryList(List<CompoEntry> compoEntryList) {
this.compoEntryList = compoEntryList;
this.compoEntryList = compoEntryList;
}
public Event getEventsId() {
return eventsId;
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
this.eventsId = eventsId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Compo[composId=" + id + "]";
return "fi.insomnia.bortal.model.Compo[composId=" + 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;
......@@ -25,30 +23,29 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "entries")
@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")})
@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") })
public class CompoEntry implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "entries_id", nullable = false)
private Integer id;
@Column(name = "entry_created", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date entryCreated;
@Column(name = "entry_name", nullable = false)
private String entryName;
@Column(name = "notes")
......@@ -74,131 +71,133 @@ public class CompoEntry implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public CompoEntry() {
}
public CompoEntry(Integer entriesId) {
this.id = entriesId;
this.id = entriesId;
}
public CompoEntry(Integer entriesId, Date entryCreated, String entryName) {
this.id = entriesId;
this.entryCreated = entryCreated;
this.entryName = entryName;
this.id = entriesId;
this.entryCreated = entryCreated;
this.entryName = entryName;
}
public Date getEntryCreated() {
return entryCreated;
return entryCreated;
}
public void setEntryCreated(Date entryCreated) {
this.entryCreated = entryCreated;
this.entryCreated = entryCreated;
}
public String getEntryName() {
return entryName;
return entryName;
}
public void setEntryName(String entryName) {
this.entryName = entryName;
this.entryName = entryName;
}
public String getNotes() {
return notes;
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
this.notes = notes;
}
public String getScreenMessage() {
return screenMessage;
return screenMessage;
}
public void setScreenMessage(String screenMessage) {
this.screenMessage = screenMessage;
this.screenMessage = screenMessage;
}
public Integer getSort() {
return sort;
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
this.sort = sort;
}
public List<Vote> getVoteList() {
return voteList;
return voteList;
}
public void setVoteList(List<Vote> voteList) {
this.voteList = voteList;
this.voteList = voteList;
}
public List<CompoEntryFile> getCompoEntryFileList() {
return compoEntryFileList;
return compoEntryFileList;
}
public void setCompoEntryFileList(List<CompoEntryFile> compoEntryFileList) {
this.compoEntryFileList = compoEntryFileList;
this.compoEntryFileList = compoEntryFileList;
}
public List<CompoEntryParticipant> getCompoEntryParticipantList() {
return compoEntryParticipantList;
return compoEntryParticipantList;
}
public void setCompoEntryParticipantList(List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
public void setCompoEntryParticipantList(
List<CompoEntryParticipant> compoEntryParticipantList) {
this.compoEntryParticipantList = compoEntryParticipantList;
}
public Compo getComposId() {
return composId;
return composId;
}
public void setComposId(Compo composId) {
this.composId = composId;
this.composId = composId;
}
public User getCreator() {
return creator;
return creator;
}
public void setCreator(User creator) {
this.creator = creator;
this.creator = creator;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + id + "]";
return "fi.insomnia.bortal.model.CompoEntry[entriesId=" + id + "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -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;
......@@ -23,24 +21,23 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "entry_files")
@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"),
@NamedQuery(name = "CompoEntryFile.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"),
@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")})
@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"),
@NamedQuery(name = "CompoEntryFile.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"),
@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") })
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")
......@@ -56,7 +53,7 @@ public class CompoEntryFile implements ModelInterface {
@Lob
@Column(name = "file_data")
private byte[] fileData;
@Column(name = "uploaded", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date uploaded;
......@@ -68,114 +65,116 @@ public class CompoEntryFile implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public CompoEntryFile() {
}
public CompoEntryFile(Integer entryFilesId) {
this.id = entryFilesId;
this.id = entryFilesId;
}
public CompoEntryFile(Integer entryFilesId, Date uploaded) {
this.id = entryFilesId;
this.uploaded = uploaded;
this.id = entryFilesId;
this.uploaded = uploaded;
}
public String getMimeType() {
return mimeType;
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
this.mimeType = mimeType;
}
public String getFileName() {
return fileName;
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
this.fileName = fileName;
}
public String getDescription() {
return description;
return description;
}
public void setDescription(String description) {
this.description = description;
this.description = description;
}
public String getHash() {
return hash;
return hash;
}
public void setHash(String hash) {
this.hash = hash;
this.hash = hash;
}
public String getComment() {
return comment;
return comment;
}
public void setComment(String comment) {
this.comment = comment;
this.comment = comment;
}
public byte[] getFileData() {
return fileData;
return fileData;
}
public void setFileData(byte[] fileData) {
this.fileData = fileData;
this.fileData = fileData;
}
public Date getUploaded() {
return uploaded;
return uploaded;
}
public void setUploaded(Date uploaded) {
this.uploaded = uploaded;
this.uploaded = uploaded;
}
public CompoEntry getEntriesId() {
return entry;
return entry;
}
public void setEntriesId(CompoEntry entriesId) {
this.entry = entriesId;
this.entry = entriesId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@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;
......@@ -19,19 +16,18 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "entry_participations")
@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")})
@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") })
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,85 +43,87 @@ public class CompoEntryParticipant implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public CompoEntry getEntry() {
return entry;
return entry;
}
public void setEntry(CompoEntry entry) {
this.entry = entry;
this.entry = entry;
}
public User getUsers() {
return users;
return users;
}
public void setUsers(User users) {
this.users = users;
this.users = users;
}
public CompoEntryParticipant() {
}
public CompoEntryParticipant(Integer entryParticipationsId) {
this.id = entryParticipationsId;
this.id = entryParticipationsId;
}
public String getRole() {
return role;
return role;
}
public void setRole(String role) {
this.role = role;
this.role = role;
}
public CompoEntry getEntriesId() {
return entry;
return entry;
}
public void setEntriesId(CompoEntry entriesId) {
this.entry = entriesId;
this.entry = entriesId;
}
public User getUsersId() {
return users;
return users;
}
public void setUsersId(User usersId) {
this.users = usersId;
this.users = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@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;
......@@ -21,48 +19,47 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "discounts")
@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"),
@NamedQuery(name = "Discount.findByCode", query = "SELECT d FROM Discount d WHERE d.code = :code"),
@NamedQuery(name = "Discount.findByDetails", query = "SELECT d FROM Discount d WHERE d.details = :details"),
@NamedQuery(name = "Discount.findByAmountMin", query = "SELECT d FROM Discount d WHERE d.amountMin = :amountMin"),
@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")})
@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"),
@NamedQuery(name = "Discount.findByCode", query = "SELECT d FROM Discount d WHERE d.code = :code"),
@NamedQuery(name = "Discount.findByDetails", query = "SELECT d FROM Discount d WHERE d.details = :details"),
@NamedQuery(name = "Discount.findByAmountMin", query = "SELECT d FROM Discount d WHERE d.amountMin = :amountMin"),
@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") })
public class Discount implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "discounts_id", nullable = false)
private Integer id;
@Column(name = "percentage", nullable = false)
private BigInteger percentage;
@Column(name = "code")
private String code;
@Column(name = "details")
private String details;
@Column(name = "amount_min", nullable = false)
private int amountMin;
@Column(name = "amount_max", nullable = false)
private int amountMax;
@Column(name = "active", nullable = false)
private boolean active;
@Column(name = "max_num", nullable = false)
private int maxNum;
@Column(name = "per_user", nullable = false)
private int perUser;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "discountsId")
......@@ -72,127 +69,130 @@ public class Discount implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public Discount() {
}
public Discount(Integer discountsId) {
this.id = discountsId;
this.id = discountsId;
}
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
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;
this.amountMax = amountMax;
this.active = active;
this.maxNum = maxNum;
this.perUser = 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;
this.amountMax = amountMax;
this.active = active;
this.maxNum = maxNum;
this.perUser = perUser;
}
public BigInteger getPercentage() {
return percentage;
return percentage;
}
public void setPercentage(BigInteger percentage) {
this.percentage = percentage;
this.percentage = percentage;
}
public String getCode() {
return code;
return code;
}
public void setCode(String code) {
this.code = code;
this.code = code;
}
public String getDetails() {
return details;
return details;
}
public void setDetails(String details) {
this.details = details;
this.details = details;
}
public int getAmountMin() {
return amountMin;
return amountMin;
}
public void setAmountMin(int amountMin) {
this.amountMin = amountMin;
this.amountMin = amountMin;
}
public int getAmountMax() {
return amountMax;
return amountMax;
}
public void setAmountMax(int amountMax) {
this.amountMax = amountMax;
this.amountMax = amountMax;
}
public boolean getActive() {
return active;
return active;
}
public void setActive(boolean active) {
this.active = active;
this.active = active;
}
public int getMaxNum() {
return maxNum;
return maxNum;
}
public void setMaxNum(int maxNum) {
this.maxNum = maxNum;
this.maxNum = maxNum;
}
public int getPerUser() {
return perUser;
return perUser;
}
public void setPerUser(int perUser) {
this.perUser = perUser;
this.perUser = perUser;
}
public List<DiscountInstance> getDiscountInstanceList() {
return discountInstanceList;
return discountInstanceList;
}
public void setDiscountInstanceList(List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
public void setDiscountInstanceList(
List<DiscountInstance> discountInstanceList) {
this.discountInstanceList = discountInstanceList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Discount[discountsId=" + id + "]";
return "fi.insomnia.bortal.model.Discount[discountsId=" + id + "]";
}
public void setJpaVersionField(int jpaVersionField) {
......
......@@ -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;
......@@ -16,19 +15,18 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "discount_instances")
@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")})
@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") })
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")
......@@ -48,83 +46,88 @@ public class DiscountInstance implements ModelInterface {
}
public DiscountInstance(Integer discountsInstancesId) {
this.id = discountsInstancesId;
this.id = discountsInstancesId;
}
public AccountEvent getAccountEventsId() {
return accountEventsId;
return accountEventsId;
}
public void setAccountEventsId(AccountEvent accountEventsId) {
this.accountEventsId = accountEventsId;
this.accountEventsId = accountEventsId;
}
public Discount getDiscountsId() {
return discountsId;
return discountsId;
}
public void setDiscountsId(Discount discountsId) {
this.discountsId = discountsId;
this.discountsId = discountsId;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId=" + getId() + "]";
return "fi.insomnia.bortal.model.DiscountInstance[discountsInstancesId="
+ getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -23,23 +22,22 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "events")
@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")})
@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") })
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")
......@@ -48,7 +46,7 @@ public class Event implements ModelInterface {
@Column(name = "end_time")
@Temporal(TemporalType.TIMESTAMP)
private Date endTime;
@Column(name = "name", nullable = false)
private String name;
@Column(name = "referer")
......@@ -78,152 +76,156 @@ public class Event implements ModelInterface {
}
public Event(Integer eventsId) {
this.id = eventsId;
this.id = eventsId;
}
public Event(Integer eventsId, String name) {
this.id = eventsId;
this.name = name;
this.id = eventsId;
this.name = name;
}
public Date getStartTime() {
return startTime;
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
this.endTime = endTime;
}
public String getName() {
return name;
return name;
}
public void setName(String name) {
this.name = name;
this.name = name;
}
public String getReferer() {
return referer;
return referer;
}
public void setReferer(String referer) {
this.referer = referer;
this.referer = referer;
}
public EventSettings getEventSettingsId() {
return eventSettingsId;
return eventSettingsId;
}
public void setEventSettingsId(EventSettings eventSettingsId) {
this.eventSettingsId = eventSettingsId;
this.eventSettingsId = eventSettingsId;
}
public EventStatus getEventStatusId() {
return eventStatusId;
return eventStatusId;
}
public void setEventStatusId(EventStatus eventStatusId) {
this.eventStatusId = eventStatusId;
this.eventStatusId = eventStatusId;
}
public Role getDefaultRole() {
return defaultRole;
return defaultRole;
}
public void setDefaultRole(Role defaultRole) {
this.defaultRole = defaultRole;
this.defaultRole = defaultRole;
}
public List<Compo> getCompoList() {
return compoList;
return compoList;
}
public void setCompoList(List<Compo> compoList) {
this.compoList = compoList;
this.compoList = compoList;
}
public List<CardTemplate> getCardTemplateList() {
return cardTemplateList;
return cardTemplateList;
}
public void setCardTemplateList(List<CardTemplate> cardTemplateList) {
this.cardTemplateList = cardTemplateList;
this.cardTemplateList = cardTemplateList;
}
public List<EventMap> getEventMapList() {
return eventMapList;
return eventMapList;
}
public void setEventMapList(List<EventMap> eventMapList) {
this.eventMapList = eventMapList;
this.eventMapList = eventMapList;
}
public List<Role> getRoleList() {
return roleList;
return roleList;
}
public void setRoleList(List<Role> roleList) {
this.roleList = roleList;
this.roleList = roleList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Event[eventsId=" + getId() + "]";
return "fi.insomnia.bortal.model.Event[eventsId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -21,20 +20,19 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "maps")
@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")})
@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") })
public class EventMap implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "maps_id", nullable = false)
private Integer id;
@Lob
......@@ -55,91 +53,95 @@ public class EventMap implements ModelInterface {
}
public EventMap(Integer mapsId) {
this.id = mapsId;
this.id = mapsId;
}
public byte[] getMapData() {
return mapData;
return mapData;
}
public void setMapData(byte[] mapData) {
this.mapData = mapData;
this.mapData = mapData;
}
public String getMapName() {
return mapName;
return mapName;
}
public void setMapName(String mapName) {
this.mapName = mapName;
this.mapName = mapName;
}
public List<Place> getPlaceList() {
return placeList;
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
this.placeList = placeList;
}
public Event getEventsId() {
return eventsId;
return eventsId;
}
public void setEventsId(Event eventsId) {
this.eventsId = eventsId;
this.eventsId = eventsId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.EventMap[mapsId=" + getId() + "]";
return "fi.insomnia.bortal.model.EventMap[mapsId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -18,23 +17,22 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "event_settings")
@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")})
@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") })
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")
......@@ -55,99 +53,104 @@ public class EventSettings implements ModelInterface {
}
public EventSettings(Integer eventSettingsId) {
this.id = eventSettingsId;
this.id = eventSettingsId;
}
public String getResourceBundle() {
return resourceBundle;
return resourceBundle;
}
public void setResourceBundle(String resourceBundle) {
this.resourceBundle = resourceBundle;
this.resourceBundle = resourceBundle;
}
public String getStyleSheet() {
return styleSheet;
return styleSheet;
}
public void setStyleSheet(String styleSheet) {
this.styleSheet = styleSheet;
this.styleSheet = styleSheet;
}
public String getNameGeneralForm() {
return nameGeneralForm;
return nameGeneralForm;
}
public void setNameGeneralForm(String nameGeneralForm) {
this.nameGeneralForm = nameGeneralForm;
this.nameGeneralForm = nameGeneralForm;
}
public String getNamePossissiveForm() {
return namePossissiveForm;
return namePossissiveForm;
}
public void setNamePossissiveForm(String namePossissiveForm) {
this.namePossissiveForm = namePossissiveForm;
this.namePossissiveForm = namePossissiveForm;
}
public List<Event> getEventList() {
return eventList;
return eventList;
}
public void setEventList(List<Event> eventList) {
this.eventList = eventList;
this.eventList = eventList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.EventSettings[eventSettingsId=" + getId() + "]";
return "fi.insomnia.bortal.model.EventSettings[eventSettingsId="
+ getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -19,24 +18,22 @@ import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@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")})
@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") })
public class EventStatus implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_status_id", nullable = false)
private Integer id;
@Column(name = "status_name", nullable = false)
private String statusName;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventStatusId")
......@@ -49,80 +46,85 @@ public class EventStatus implements ModelInterface {
}
public EventStatus(Integer eventStatusId) {
this.id = eventStatusId;
this.id = eventStatusId;
}
public EventStatus(Integer eventStatusId, String statusName) {
this.id = eventStatusId;
this.statusName = statusName;
this.id = eventStatusId;
this.statusName = statusName;
}
public String getStatusName() {
return statusName;
return statusName;
}
public void setStatusName(String statusName) {
this.statusName = statusName;
this.statusName = statusName;
}
public List<Event> getEventList() {
return eventList;
return eventList;
}
public void setEventList(List<Event> eventList) {
this.eventList = eventList;
this.eventList = eventList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.EventStatus[eventStatusId=" + getId() + "]";
return "fi.insomnia.bortal.model.EventStatus[eventStatusId=" + getId()
+ "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -20,26 +19,25 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "food_waves")
@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")})
@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") })
public class FoodWave implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_waves_id", nullable = false)
private Integer id;
@Column(name = "wave_name", nullable = false)
private String waveName;
@Column(name = "wave_description")
......@@ -47,7 +45,7 @@ public class FoodWave implements ModelInterface {
@Column(name = "wave_time")
@Temporal(TemporalType.TIMESTAMP)
private Date waveTime;
@Column(name = "wave_closed", nullable = false)
private boolean waveClosed;
@OneToMany(mappedBy = "foodWavesId")
......@@ -60,105 +58,109 @@ public class FoodWave implements ModelInterface {
}
public FoodWave(Integer foodWavesId) {
this.id = foodWavesId;
this.id = foodWavesId;
}
public FoodWave(Integer foodWavesId, String waveName, boolean waveClosed) {
this.id = foodWavesId;
this.waveName = waveName;
this.waveClosed = waveClosed;
this.id = foodWavesId;
this.waveName = waveName;
this.waveClosed = waveClosed;
}
public String getWaveName() {
return waveName;
return waveName;
}
public void setWaveName(String waveName) {
this.waveName = waveName;
this.waveName = waveName;
}
public String getWaveDescription() {
return waveDescription;
return waveDescription;
}
public void setWaveDescription(String waveDescription) {
this.waveDescription = waveDescription;
this.waveDescription = waveDescription;
}
public Date getWaveTime() {
return waveTime;
return waveTime;
}
public void setWaveTime(Date waveTime) {
this.waveTime = waveTime;
this.waveTime = waveTime;
}
public boolean getWaveClosed() {
return waveClosed;
return waveClosed;
}
public void setWaveClosed(boolean waveClosed) {
this.waveClosed = waveClosed;
this.waveClosed = waveClosed;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
this.accountEventList = accountEventList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.FoodWave[foodWavesId=" + getId() + "]";
return "fi.insomnia.bortal.model.FoodWave[foodWavesId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -17,24 +16,23 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "food_wave_templates")
@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")})
@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") })
public class FoodWaveTemplate implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "food_wave_templates_id", nullable = false)
private Integer id;
@Column(name = "template_name", nullable = false)
private String templateName;
@Column(name = "template_description")
......@@ -49,94 +47,100 @@ public class FoodWaveTemplate implements ModelInterface {
}
public FoodWaveTemplate(Integer foodWaveTemplatesId) {
this.id = foodWaveTemplatesId;
this.id = foodWaveTemplatesId;
}
public FoodWaveTemplate(Integer foodWaveTemplatesId, String templateName) {
this.id = foodWaveTemplatesId;
this.templateName = templateName;
this.id = foodWaveTemplatesId;
this.templateName = templateName;
}
public String getTemplateName() {
return templateName;
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
this.templateName = templateName;
}
public String getTemplateDescription() {
return templateDescription;
return templateDescription;
}
public void setTemplateDescription(String templateDescription) {
this.templateDescription = templateDescription;
this.templateDescription = templateDescription;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId=" + getId() + "]";
return "fi.insomnia.bortal.model.FoodWaveTemplate[foodWaveTemplatesId="
+ getId() + "]";
}
/**
* @return the products
*/
public List<Product> getProducts() {
return products;
return products;
}
/**
* @param products the products to set
* @param products
* the products to set
*/
public void setProducts(List<Product> products) {
this.products = products;
this.products = products;
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -21,23 +20,22 @@ import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@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")})
@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") })
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")
......@@ -64,107 +62,112 @@ public class GroupMembership implements ModelInterface {
}
public GroupMembership(Integer groupMembershipsId) {
this.id = groupMembershipsId;
this.id = groupMembershipsId;
}
public Date getInviteAccepted() {
return inviteAccepted;
return inviteAccepted;
}
public void setInviteAccepted(Date inviteAccepted) {
this.inviteAccepted = inviteAccepted;
this.inviteAccepted = inviteAccepted;
}
public String getInviteEmail() {
return inviteEmail;
return inviteEmail;
}
public void setInviteEmail(String inviteEmail) {
this.inviteEmail = inviteEmail;
this.inviteEmail = inviteEmail;
}
public String getInviteName() {
return inviteName;
return inviteName;
}
public void setInviteName(String inviteName) {
this.inviteName = inviteName;
this.inviteName = inviteName;
}
public PlaceGroup getGroupsId() {
return groupsId;
return groupsId;
}
public void setGroupsId(PlaceGroup groupsId) {
this.groupsId = groupsId;
this.groupsId = groupsId;
}
public Place getPlaceReservation() {
return placeReservation;
return placeReservation;
}
public void setPlaceReservation(Place placeReservation) {
this.placeReservation = placeReservation;
this.placeReservation = placeReservation;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId=" + getId() + "]";
return "fi.insomnia.bortal.model.GroupMembership[groupMembershipsId="
+ getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -17,23 +16,22 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "locations")
@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")})
@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") })
public class Location implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "locations_id", nullable = false)
private Integer id;
@Column(name = "location_name", nullable = false)
private String locationName;
@OneToMany(mappedBy = "locationsId")
......@@ -48,88 +46,92 @@ public class Location implements ModelInterface {
}
public Location(Integer locationsId) {
this.id = locationsId;
this.id = locationsId;
}
public Location(Integer locationsId, String locationName) {
this.id = locationsId;
this.locationName = locationName;
this.id = locationsId;
this.locationName = locationName;
}
public String getLocationName() {
return locationName;
return locationName;
}
public void setLocationName(String locationName) {
this.locationName = locationName;
this.locationName = locationName;
}
public List<Reader> getReaderList() {
return readerList;
return readerList;
}
public void setReaderList(List<Reader> readerList) {
this.readerList = readerList;
this.readerList = readerList;
}
public List<PrintedCard> getPrintedCardList() {
return printedCardList;
return printedCardList;
}
public void setPrintedCardList(List<PrintedCard> printedCardList) {
this.printedCardList = printedCardList;
this.printedCardList = printedCardList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Location[locationsId=" + getId() + "]";
return "fi.insomnia.bortal.model.Location[locationsId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -20,24 +19,23 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "event_log")
@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")})
@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") })
public class LogEntry implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_id", nullable = false)
private Integer id;
@Column(name = "event_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date eventTime;
......@@ -57,96 +55,100 @@ public class LogEntry implements ModelInterface {
}
public LogEntry(Integer eventLogId) {
this.id = eventLogId;
this.id = eventLogId;
}
public LogEntry(Integer eventLogId, Date eventTime) {
this.id = eventLogId;
this.eventTime = eventTime;
this.id = eventLogId;
this.eventTime = eventTime;
}
public Date getEventTime() {
return eventTime;
return eventTime;
}
public void setEventTime(Date eventTime) {
this.eventTime = eventTime;
this.eventTime = eventTime;
}
public String getEventDescription() {
return eventDescription;
return eventDescription;
}
public void setEventDescription(String eventDescription) {
this.eventDescription = eventDescription;
this.eventDescription = eventDescription;
}
public LogEntryType getEventLogTypesId() {
return eventLogTypesId;
return eventLogTypesId;
}
public void setEventLogTypesId(LogEntryType eventLogTypesId) {
this.eventLogTypesId = eventLogTypesId;
this.eventLogTypesId = eventLogTypesId;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + getId() + "]";
return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -18,23 +17,22 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "event_log_types")
@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")})
@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") })
public class LogEntryType implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "event_log_types_id", nullable = false)
private Integer id;
@Column(name = "event_type_description", nullable = false)
private String eventTypeDescription;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "eventLogTypesId")
......@@ -47,80 +45,85 @@ public class LogEntryType implements ModelInterface {
}
public LogEntryType(Integer eventLogTypesId) {
this.id = eventLogTypesId;
this.id = eventLogTypesId;
}
public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) {
this.id = eventLogTypesId;
this.eventTypeDescription = eventTypeDescription;
this.id = eventLogTypesId;
this.eventTypeDescription = eventTypeDescription;
}
public String getEventTypeDescription() {
return eventTypeDescription;
return eventTypeDescription;
}
public void setEventTypeDescription(String eventTypeDescription) {
this.eventTypeDescription = eventTypeDescription;
this.eventTypeDescription = eventTypeDescription;
}
public List<LogEntry> getLogEntryList() {
return logEntryList;
return logEntryList;
}
public void setLogEntryList(List<LogEntry> logEntryList) {
this.logEntryList = logEntryList;
this.logEntryList = logEntryList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId=" + getId() + "]";
return "fi.insomnia.bortal.model.LogEntryType[eventLogTypesId="
+ getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -20,28 +19,27 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "news")
@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"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@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")})
@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"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@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") })
public class News implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_id", nullable = false)
private Integer id;
@Column(name = "title", nullable = false)
private String title;
@Column(name = "body")
......@@ -54,7 +52,7 @@ public class News implements ModelInterface {
@Column(name = "expire")
@Temporal(TemporalType.TIMESTAMP)
private Date expire;
@Column(name = "priority", nullable = false)
private int priority;
@JoinColumn(name = "news_groups_id", referencedColumnName = "news_groups_id", nullable = false)
......@@ -68,121 +66,125 @@ public class News implements ModelInterface {
}
public News(Integer newsId) {
this.id = newsId;
this.id = newsId;
}
public News(Integer newsId, String title, int priority) {
this.id = newsId;
this.title = title;
this.priority = priority;
this.id = newsId;
this.title = title;
this.priority = priority;
}
public String getTitle() {
return title;
return title;
}
public void setTitle(String title) {
this.title = title;
this.title = title;
}
public String getBody() {
return body;
return body;
}
public void setBody(String body) {
this.body = body;
this.body = body;
}
public String getAbstract1() {
return abstract1;
return abstract1;
}
public void setAbstract1(String abstract1) {
this.abstract1 = abstract1;
this.abstract1 = abstract1;
}
public Date getPublish() {
return publish;
return publish;
}
public void setPublish(Date publish) {
this.publish = publish;
this.publish = publish;
}
public Date getExpire() {
return expire;
return expire;
}
public void setExpire(Date expire) {
this.expire = expire;
this.expire = expire;
}
public int getPriority() {
return priority;
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
this.priority = priority;
}
public NewsGroup getNewsGroupsId() {
return newsGroupsId;
return newsGroupsId;
}
public void setNewsGroupsId(NewsGroup newsGroupsId) {
this.newsGroupsId = newsGroupsId;
this.newsGroupsId = newsGroupsId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.News[newsId=" + getId() + "]";
return "fi.insomnia.bortal.model.News[newsId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -20,30 +19,29 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "news_groups")
@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")})
@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") })
public class NewsGroup implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "news_groups_id", nullable = false)
private Integer id;
@Column(name = "group_name", nullable = false)
private String groupName;
@Column(name = "group_description")
private String groupDescription;
@Column(name = "priority", nullable = false)
private int priority;
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id", nullable = false)
......@@ -59,105 +57,110 @@ public class NewsGroup implements ModelInterface {
}
public NewsGroup(Integer newsGroupsId) {
this.id = newsGroupsId;
this.id = newsGroupsId;
}
public NewsGroup(Integer newsGroupsId, String groupName, int priority) {
this.id = newsGroupsId;
this.groupName = groupName;
this.priority = priority;
this.id = newsGroupsId;
this.groupName = groupName;
this.priority = priority;
}
public String getGroupName() {
return groupName;
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
this.groupName = groupName;
}
public String getGroupDescription() {
return groupDescription;
return groupDescription;
}
public void setGroupDescription(String groupDescription) {
this.groupDescription = groupDescription;
this.groupDescription = groupDescription;
}
public int getPriority() {
return priority;
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
this.priority = priority;
}
public AccessRight getAccessRightsId() {
return accessRightsId;
return accessRightsId;
}
public void setAccessRightsId(AccessRight accessRightsId) {
this.accessRightsId = accessRightsId;
this.accessRightsId = accessRightsId;
}
public List<News> getNewsList() {
return newsList;
return newsList;
}
public void setNewsList(List<News> newsList) {
this.newsList = newsList;
this.newsList = newsList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId() + "]";
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId()
+ "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -20,25 +19,24 @@ import javax.persistence.Table;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "places")
@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"),
@NamedQuery(name = "Place.findByPlaceName", query = "SELECT p FROM Place p WHERE p.placeName = :placeName"),
@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")})
@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"),
@NamedQuery(name = "Place.findByPlaceName", query = "SELECT p FROM Place p WHERE p.placeName = :placeName"),
@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") })
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")
......@@ -75,147 +73,151 @@ public class Place implements ModelInterface {
}
public Place(Integer placesId) {
this.id = placesId;
this.id = placesId;
}
public String getPlaceDescription() {
return placeDescription;
return placeDescription;
}
public void setPlaceDescription(String placeDescription) {
this.placeDescription = placeDescription;
this.placeDescription = placeDescription;
}
public String getPlaceName() {
return placeName;
return placeName;
}
public void setPlaceName(String placeName) {
this.placeName = placeName;
this.placeName = placeName;
}
public Integer getMapX() {
return mapX;
return mapX;
}
public void setMapX(Integer mapX) {
this.mapX = mapX;
this.mapX = mapX;
}
public Integer getMapY() {
return mapY;
return mapY;
}
public void setMapY(Integer mapY) {
this.mapY = mapY;
this.mapY = mapY;
}
public String getPlaceDetails() {
return placeDetails;
return placeDetails;
}
public void setPlaceDetails(String placeDetails) {
this.placeDetails = placeDetails;
this.placeDetails = placeDetails;
}
public String getPlaceCode() {
return placeCode;
return placeCode;
}
public void setPlaceCode(String placeCode) {
this.placeCode = placeCode;
this.placeCode = placeCode;
}
public List<GroupMembership> getGroupMembershipList() {
return groupMembershipList;
return groupMembershipList;
}
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList;
this.groupMembershipList = groupMembershipList;
}
public PlaceGroup getGroupsId() {
return groupsId;
return groupsId;
}
public void setGroupsId(PlaceGroup groupsId) {
this.groupsId = groupsId;
this.groupsId = groupsId;
}
public EventMap getMapsId() {
return mapsId;
return mapsId;
}
public void setMapsId(EventMap mapsId) {
this.mapsId = mapsId;
this.mapsId = mapsId;
}
public Product getProductsId() {
return productsId;
return productsId;
}
public void setProductsId(Product productsId) {
this.productsId = productsId;
this.productsId = productsId;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Place[placesId=" + getId() + "]";
return "fi.insomnia.bortal.model.Place[placesId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -23,32 +22,31 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "groups")
@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"),
@NamedQuery(name = "PlaceGroup.findByGroupEdited", query = "SELECT p FROM PlaceGroup p WHERE p.groupEdited = :groupEdited"),
@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")})
@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"),
@NamedQuery(name = "PlaceGroup.findByGroupEdited", query = "SELECT p FROM PlaceGroup p WHERE p.groupEdited = :groupEdited"),
@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") })
public class PlaceGroup implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "groups_id", nullable = false)
private Integer id;
@Column(name = "group_created", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date groupCreated;
@Column(name = "group_edited", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date groupEdited;
......@@ -56,7 +54,7 @@ public class PlaceGroup implements ModelInterface {
private String groupCode;
@Column(name = "group_name")
private String groupName;
@Column(name = "group_active", nullable = false)
private boolean groupActive;
@Column(name = "group_details")
......@@ -76,138 +74,143 @@ public class PlaceGroup implements ModelInterface {
}
public PlaceGroup(Integer groupsId) {
this.id = groupsId;
this.id = groupsId;
}
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited, boolean groupActive) {
this.id = groupsId;
this.groupCreated = groupCreated;
this.groupEdited = groupEdited;
this.groupActive = groupActive;
public PlaceGroup(Integer groupsId, Date groupCreated, Date groupEdited,
boolean groupActive) {
this.id = groupsId;
this.groupCreated = groupCreated;
this.groupEdited = groupEdited;
this.groupActive = groupActive;
}
public Date getGroupCreated() {
return groupCreated;
return groupCreated;
}
public void setGroupCreated(Date groupCreated) {
this.groupCreated = groupCreated;
this.groupCreated = groupCreated;
}
public Date getGroupEdited() {
return groupEdited;
return groupEdited;
}
public void setGroupEdited(Date groupEdited) {
this.groupEdited = groupEdited;
this.groupEdited = groupEdited;
}
public String getGroupCode() {
return groupCode;
return groupCode;
}
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
this.groupCode = groupCode;
}
public String getGroupName() {
return groupName;
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
this.groupName = groupName;
}
public boolean getGroupActive() {
return groupActive;
return groupActive;
}
public void setGroupActive(boolean groupActive) {
this.groupActive = groupActive;
this.groupActive = groupActive;
}
public String getGroupDetails() {
return groupDetails;
return groupDetails;
}
public void setGroupDetails(String groupDetails) {
this.groupDetails = groupDetails;
this.groupDetails = groupDetails;
}
public User getGroupCreator() {
return groupCreator;
return groupCreator;
}
public void setGroupCreator(User groupCreator) {
this.groupCreator = groupCreator;
this.groupCreator = groupCreator;
}
public List<GroupMembership> getGroupMembershipList() {
return groupMembershipList;
return groupMembershipList;
}
public void setGroupMembershipList(List<GroupMembership> groupMembershipList) {
this.groupMembershipList = groupMembershipList;
this.groupMembershipList = groupMembershipList;
}
public List<Place> getPlaceList() {
return placeList;
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
this.placeList = placeList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.PlaceGroup[groupsId=" + getId() + "]";
return "fi.insomnia.bortal.model.PlaceGroup[groupsId=" + getId() + "]";
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = 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;
......@@ -25,35 +23,34 @@ import javax.persistence.TemporalType;
import javax.persistence.Version;
/**
*
*
* @author jkj
*/
@Entity
@Table(name = "printed_cards")
@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")})
@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") })
public class PrintedCard implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "printed_cards_id", nullable = false)
private Integer id;
@Column(name = "event_roles_types_id", nullable = false)
private int eventRolesTypesId;
@Column(name = "print_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date printTime;
@Column(name = "barcode")
private String barcode;
@Column(name = "card_enabled", nullable = false)
private boolean cardEnabled;
@Column(name = "rfid_uid")
......@@ -71,116 +68,119 @@ public class PrintedCard implements ModelInterface {
@Column(nullable = false)
private int jpaVersionField;
public PrintedCard() {
}
public Integer getId() {
return id;
return id;
}
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public PrintedCard(Integer printedCardsId) {
this.id = printedCardsId;
this.id = printedCardsId;
}
public PrintedCard(Integer printedCardsId, int eventRolesTypesId, Date printTime, boolean cardEnabled) {
this.id = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime;
this.cardEnabled = cardEnabled;
public PrintedCard(Integer printedCardsId, int eventRolesTypesId,
Date printTime, boolean cardEnabled) {
this.id = printedCardsId;
this.eventRolesTypesId = eventRolesTypesId;
this.printTime = printTime;
this.cardEnabled = cardEnabled;
}
public int getEventRolesTypesId() {
return eventRolesTypesId;
return eventRolesTypesId;
}
public void setEventRolesTypesId(int eventRolesTypesId) {
this.eventRolesTypesId = eventRolesTypesId;
this.eventRolesTypesId = eventRolesTypesId;
}
public Date getPrintTime() {
return printTime;
return printTime;
}
public void setPrintTime(Date printTime) {
this.printTime = printTime;
this.printTime = printTime;
}
public String getBarcode() {
return barcode;
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
this.barcode = barcode;
}
public boolean getCardEnabled() {
return cardEnabled;
return cardEnabled;
}
public void setCardEnabled(boolean cardEnabled) {
this.cardEnabled = cardEnabled;
this.cardEnabled = cardEnabled;
}
public String getRfidUid() {
return rfidUid;
return rfidUid;
}
public void setRfidUid(String rfidUid) {
this.rfidUid = rfidUid;
this.rfidUid = rfidUid;
}
public List<ReaderEvent> getReaderEventList() {
return readerEventList;
return readerEventList;
}
public void setReaderEventList(List<ReaderEvent> readerEventList) {
this.readerEventList = readerEventList;
this.readerEventList = readerEventList;
}
public Location getCurrentLocation() {
return currentLocation;
return currentLocation;
}
public void setCurrentLocation(Location currentLocation) {
this.currentLocation = currentLocation;
this.currentLocation = currentLocation;
}
public User getUsersId() {
return usersId;
return usersId;
}
public void setUsersId(User usersId) {
this.usersId = usersId;
this.usersId = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// 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))) {
return false;
}
return true;
// 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))) {
return false;
}
return true;
}
@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,26 +26,25 @@ import javax.persistence.Version;
*/
@Entity
@Table(name = "products")
@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")})
@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") })
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")
private String productName;
@Column(name = "price", nullable = false)
private BigInteger price;
@Column(name = "sort", nullable = false)
private int sort;
@Column(name = "barcode")
......@@ -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
......@@ -69,96 +64,95 @@ public class Product implements ModelInterface {
}
public Product(Integer productsId) {
this.id = productsId;
this.id = productsId;
}
public Product(Integer productsId, BigInteger price, int sort) {
this.id = productsId;
this.price = price;
this.sort = sort;
this.id = productsId;
this.price = price;
this.sort = sort;
}
public String getProductName() {
return productName;
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
this.productName = productName;
}
public BigInteger getPrice() {
return price;
return price;
}
public void setPrice(BigInteger price) {
this.price = price;
this.price = price;
}
public int getSort() {
return sort;
return sort;
}
public void setSort(int sort) {
this.sort = sort;
this.sort = sort;
}
public String getBarcode() {
return barcode;
return barcode;
}
public void setBarcode(String barcode) {
this.barcode = barcode;
this.barcode = barcode;
}
public List<Place> getPlaceList() {
return placeList;
return placeList;
}
public void setPlaceList(List<Place> placeList) {
this.placeList = placeList;
this.placeList = placeList;
}
public List<AccountEvent> getAccountEventList() {
return accountEventList;
return accountEventList;
}
public void setAccountEventList(List<AccountEvent> accountEventList) {
this.accountEventList = accountEventList;
this.accountEventList = accountEventList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Product)) {
return false;
}
Product other = (Product) object;
if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Product)) {
return false;
}
Product other = (Product) object;
if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Product[productsId=" + getId()
+ "]";
return "fi.insomnia.bortal.model.Product[productsId=" + getId() + "]";
}
/**
* @return the foodWaveTemplate
*/
public List<FoodWaveTemplate> getFoodWaveTemplate() {
return foodWaveTemplate;
return foodWaveTemplate;
}
/**
......@@ -166,34 +160,36 @@ public class Product implements ModelInterface {
* the foodWaveTemplate to set
*/
public void setFoodWaveTemplate(List<FoodWaveTemplate> foodWaveTemplate) {
this.foodWaveTemplate = foodWaveTemplate;
this.foodWaveTemplate = foodWaveTemplate;
}
/**
* @return the id
*/
public Integer getId() {
return id;
return id;
}
/**
* @param id the id to set
* @param id
* the id to set
*/
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
* @return the jpaVersionField
*/
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
* @param jpaVersionField the jpaVersionField to set
* @param jpaVersionField
* the jpaVersionField to set
*/
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!