Commit 182f8ab5 by Juho Juopperi

removed :id fetches

1 parent c10849e0
Showing with 913 additions and 915 deletions
...@@ -24,7 +24,7 @@ import javax.persistence.Version; ...@@ -24,7 +24,7 @@ import javax.persistence.Version;
@Table(name = "access_rights") @Table(name = "access_rights")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"), @NamedQuery(name = "AccessRight.findAll", query = "SELECT a FROM AccessRight a"),
@NamedQuery(name = "AccessRight.findById", query = "SELECT a FROM AccessRight a WHERE a.id = :id"),
@NamedQuery(name = "AccessRight.findByName", query = "SELECT a FROM AccessRight a WHERE a.name = :name") }) @NamedQuery(name = "AccessRight.findByName", query = "SELECT a FROM AccessRight a WHERE a.name = :name") })
public class AccessRight implements ModelInterface { public class AccessRight implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -29,12 +29,12 @@ import javax.persistence.Version; ...@@ -29,12 +29,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "account_events") @Table(name = "account_events")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "AccountEvent.findAll", query = "SELECT a FROM AccountEvent a"), @NamedQuery(name = "AccountEvent.findAll", query = "SELECT a FROM AccountEvent a"),
@NamedQuery(name = "AccountEvent.findById", query = "SELECT a FROM AccountEvent a WHERE a.id = :id"),
@NamedQuery(name = "AccountEvent.findByUnitPrice", query = "SELECT a FROM AccountEvent a WHERE a.unitPrice = :unitPrice"), @NamedQuery(name = "AccountEvent.findByUnitPrice", query = "SELECT a FROM AccountEvent a WHERE a.unitPrice = :unitPrice"),
@NamedQuery(name = "AccountEvent.findByUnits", query = "SELECT a FROM AccountEvent a WHERE a.units = :units"), @NamedQuery(name = "AccountEvent.findByUnits", query = "SELECT a FROM AccountEvent a WHERE a.units = :units"),
@NamedQuery(name = "AccountEvent.findByEventTime", query = "SELECT a FROM AccountEvent a WHERE a.eventTime = :eventTime"), @NamedQuery(name = "AccountEvent.findByEventTime", query = "SELECT a FROM AccountEvent a WHERE a.eventTime = :eventTime"),
@NamedQuery(name = "AccountEvent.findByDelivered", query = "SELECT a FROM AccountEvent a WHERE a.delivered = :delivered") }) @NamedQuery(name = "AccountEvent.findByDelivered", query = "SELECT a FROM AccountEvent a WHERE a.delivered = :delivered") })
public class AccountEvent implements ModelInterface { public class AccountEvent implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -84,145 +84,145 @@ public class AccountEvent implements ModelInterface { ...@@ -84,145 +84,145 @@ public class AccountEvent implements ModelInterface {
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public AccountEvent() { public AccountEvent() {
} }
public AccountEvent(Integer accountEventsId) { public AccountEvent(Integer accountEventsId) {
this.id = accountEventsId; this.id = accountEventsId;
} }
public AccountEvent(Integer accountEventsId, BigDecimal unitPrice, public AccountEvent(Integer accountEventsId, BigDecimal unitPrice,
BigDecimal unitCount, Date eventTime) { BigDecimal unitCount, Date eventTime) {
this.id = accountEventsId; this.id = accountEventsId;
this.setUnitPrice(unitPrice); this.setUnitPrice(unitPrice);
this.setUnits(unitCount); this.setUnits(unitCount);
this.eventTime = eventTime; this.eventTime = eventTime;
} }
public Date getEventTime() { public Date getEventTime() {
return eventTime; return eventTime;
} }
public void setEventTime(Date eventTime) { public void setEventTime(Date eventTime) {
this.eventTime = eventTime; this.eventTime = eventTime;
} }
public Date getDelivered() { public Date getDelivered() {
return delivered; return delivered;
} }
public void setDelivered(Date delivered) { public void setDelivered(Date delivered) {
this.delivered = delivered; this.delivered = delivered;
} }
public User getUser() { public User getUser() {
return user; return user;
} }
public void setUser(User usersId) { public void setUser(User usersId) {
this.user = usersId; this.user = usersId;
} }
public List<DiscountInstance> getDiscountInstances() { public List<DiscountInstance> getDiscountInstances() {
return discountInstances; return discountInstances;
} }
public void setDiscountInstances(List<DiscountInstance> discountInstanceList) { public void setDiscountInstances(List<DiscountInstance> discountInstanceList) {
this.discountInstances = discountInstanceList; this.discountInstances = discountInstanceList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the // TODO: Warning - this method won't work in the case the
// id fields are // id fields are
// not set // not set
if (!(object instanceof AccountEvent)) { if (!(object instanceof AccountEvent)) {
return false; return false;
} }
AccountEvent other = (AccountEvent) object; AccountEvent other = (AccountEvent) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.AccountEvent[id=" + id + "]"; return "fi.insomnia.bortal.model.AccountEvent[id=" + id + "]";
} }
public void setFoodWave(FoodWave foodWave) { public void setFoodWave(FoodWave foodWave) {
this.foodWave = foodWave; this.foodWave = foodWave;
} }
public FoodWave getFoodWave() { public FoodWave getFoodWave() {
return foodWave; return foodWave;
} }
public void setProduct(Product product) { public void setProduct(Product product) {
this.product = product; this.product = product;
} }
public Product getProduct() { public Product getProduct() {
return product; return product;
} }
public void setSeller(User seller) { public void setSeller(User seller) {
this.seller = seller; this.seller = seller;
} }
public User getSeller() { public User getSeller() {
return seller; return seller;
} }
public void setBill(Bill bill) { public void setBill(Bill bill) {
this.bill = bill; this.bill = bill;
} }
public Bill getBill() { public Bill getBill() {
return bill; return bill;
} }
public void setUnitPrice(BigDecimal unitPrice) { public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice; this.unitPrice = unitPrice;
} }
public BigDecimal getUnitPrice() { public BigDecimal getUnitPrice() {
return unitPrice; return unitPrice;
} }
public void setUnits(BigDecimal units) { public void setUnits(BigDecimal units) {
this.units = units; this.units = units;
} }
public BigDecimal getUnits() { public BigDecimal getUnits() {
return units; return units;
} }
} }
...@@ -30,7 +30,7 @@ import javax.persistence.Version; ...@@ -30,7 +30,7 @@ import javax.persistence.Version;
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"), @NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
// @NamedQuery(name = "Bill.findById", query = // @NamedQuery(name = "Bill.findById", query =
// "SELECT b FROM Bill b WHERE id = :id"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"), @NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"), @NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"), @NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
......
...@@ -23,12 +23,12 @@ import javax.persistence.Version; ...@@ -23,12 +23,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "bill_lines") @Table(name = "bill_lines")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "BillLine.findAll", query = "SELECT b FROM BillLine b"), @NamedQuery(name = "BillLine.findAll", query = "SELECT b FROM BillLine b"),
@NamedQuery(name = "BillLine.findById", query = "SELECT b FROM BillLine b WHERE id = :id"),
@NamedQuery(name = "BillLine.findByProduct", query = "SELECT b FROM BillLine b WHERE b.product = :name"), @NamedQuery(name = "BillLine.findByProduct", query = "SELECT b FROM BillLine b WHERE b.product = :name"),
@NamedQuery(name = "BillLine.findByUnits", query = "SELECT b FROM BillLine b WHERE b.units = :units"), @NamedQuery(name = "BillLine.findByUnits", query = "SELECT b FROM BillLine b WHERE b.units = :units"),
@NamedQuery(name = "BillLine.findByUnitPrice", query = "SELECT b FROM BillLine b WHERE b.unitPrice = :unitPrice"), @NamedQuery(name = "BillLine.findByUnitPrice", query = "SELECT b FROM BillLine b WHERE b.unitPrice = :unitPrice"),
@NamedQuery(name = "BillLine.findByVat", query = "SELECT b FROM BillLine b WHERE b.vat = :vat") }) @NamedQuery(name = "BillLine.findByVat", query = "SELECT b FROM BillLine b WHERE b.vat = :vat") })
public class BillLine implements ModelInterface { public class BillLine implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -59,103 +59,103 @@ public class BillLine implements ModelInterface { ...@@ -59,103 +59,103 @@ public class BillLine implements ModelInterface {
} }
public BillLine(Integer billLinesId) { public BillLine(Integer billLinesId) {
this.id = billLinesId; this.id = billLinesId;
} }
public BillLine(Integer billLinesId, String product, BigDecimal units, public BillLine(Integer billLinesId, String product, BigDecimal units,
BigDecimal unitPrice, BigDecimal vat) { BigDecimal unitPrice, BigDecimal vat) {
this.id = billLinesId; this.id = billLinesId;
this.name = product; this.name = product;
this.setUnits(units); this.setUnits(units);
this.setUnitPrice(unitPrice); this.setUnitPrice(unitPrice);
this.setVat(vat); this.setVat(vat);
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String product) { public void setName(String product) {
this.name = product; this.name = product;
} }
public Bill getBill() { public Bill getBill() {
return bill; return bill;
} }
public void setBill(Bill billsId) { public void setBill(Bill billsId) {
this.bill = billsId; this.bill = billsId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof BillLine)) { if (!(object instanceof BillLine)) {
return false; return false;
} }
BillLine other = (BillLine) object; BillLine other = (BillLine) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.BillLine[id=" + id + "]"; return "fi.insomnia.bortal.model.BillLine[id=" + id + "]";
} }
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public void setUnits(BigDecimal units) { public void setUnits(BigDecimal units) {
this.units = units; this.units = units;
} }
public BigDecimal getUnits() { public BigDecimal getUnits() {
return units; return units;
} }
public void setUnitPrice(BigDecimal price) { public void setUnitPrice(BigDecimal price) {
this.unitPrice = price; this.unitPrice = price;
} }
public BigDecimal getUnitPrice() { public BigDecimal getUnitPrice() {
return unitPrice; return unitPrice;
} }
public void setVat(BigDecimal vat) { public void setVat(BigDecimal vat) {
this.vat = vat; this.vat = vat;
} }
public BigDecimal getVat() { public BigDecimal getVat() {
return vat; return vat;
} }
} }
...@@ -26,7 +26,7 @@ import javax.persistence.Version; ...@@ -26,7 +26,7 @@ import javax.persistence.Version;
@Table(name = "card_templates") @Table(name = "card_templates")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "CardTemplate.findAll", query = "SELECT c FROM CardTemplate c"), @NamedQuery(name = "CardTemplate.findAll", query = "SELECT c FROM CardTemplate c"),
@NamedQuery(name = "CardTemplate.findById", query = "SELECT c FROM CardTemplate c WHERE c.id = :id"),
@NamedQuery(name = "CardTemplate.findByName", query = "SELECT c FROM CardTemplate c WHERE c.name = :name") }) @NamedQuery(name = "CardTemplate.findByName", query = "SELECT c FROM CardTemplate c WHERE c.name = :name") })
public class CardTemplate implements ModelInterface { public class CardTemplate implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -29,7 +29,7 @@ import javax.persistence.Version; ...@@ -29,7 +29,7 @@ import javax.persistence.Version;
@Table(name = "compos") @Table(name = "compos")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Compo.findAll", query = "SELECT c FROM Compo c"), @NamedQuery(name = "Compo.findAll", query = "SELECT c FROM Compo c"),
@NamedQuery(name = "Compo.findById", query = "SELECT c FROM Compo c WHERE c.id = :id"),
@NamedQuery(name = "Compo.findByName", query = "SELECT c FROM Compo c WHERE c.name = :name"), @NamedQuery(name = "Compo.findByName", query = "SELECT c FROM Compo c WHERE c.name = :name"),
@NamedQuery(name = "Compo.findByStartTime", query = "SELECT c FROM Compo c WHERE c.startTime = :startTime"), @NamedQuery(name = "Compo.findByStartTime", query = "SELECT c FROM Compo c WHERE c.startTime = :startTime"),
@NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"), @NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"),
......
...@@ -30,7 +30,7 @@ import javax.persistence.Version; ...@@ -30,7 +30,7 @@ import javax.persistence.Version;
@Table(name = "entries") @Table(name = "entries")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "CompoEntry.findAll", query = "SELECT c FROM CompoEntry c"), @NamedQuery(name = "CompoEntry.findAll", query = "SELECT c FROM CompoEntry c"),
@NamedQuery(name = "CompoEntry.findById", query = "SELECT c FROM CompoEntry c WHERE c.id = :id"),
@NamedQuery(name = "CompoEntry.findByCreated", query = "SELECT c FROM CompoEntry c WHERE c.created = :created"), @NamedQuery(name = "CompoEntry.findByCreated", query = "SELECT c FROM CompoEntry c WHERE c.created = :created"),
@NamedQuery(name = "CompoEntry.findByName", query = "SELECT c FROM CompoEntry c WHERE c.name = :name"), @NamedQuery(name = "CompoEntry.findByName", query = "SELECT c FROM CompoEntry c WHERE c.name = :name"),
@NamedQuery(name = "CompoEntry.findByNotes", query = "SELECT c FROM CompoEntry c WHERE c.notes = :notes"), @NamedQuery(name = "CompoEntry.findByNotes", query = "SELECT c FROM CompoEntry c WHERE c.notes = :notes"),
......
...@@ -27,7 +27,7 @@ import javax.persistence.Version; ...@@ -27,7 +27,7 @@ import javax.persistence.Version;
@Table(name = "entry_files") @Table(name = "entry_files")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "CompoEntryFile.findAll", query = "SELECT c FROM CompoEntryFile c"), @NamedQuery(name = "CompoEntryFile.findAll", query = "SELECT c FROM CompoEntryFile c"),
@NamedQuery(name = "CompoEntryFile.findById", query = "SELECT c FROM CompoEntryFile c WHERE c.id = :id"),
@NamedQuery(name = "CompoEntryFile.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"), @NamedQuery(name = "CompoEntryFile.findByMimeType", query = "SELECT c FROM CompoEntryFile c WHERE c.mimeType = :mimeType"),
@NamedQuery(name = "CompoEntryFile.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"), @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.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"),
......
...@@ -21,9 +21,9 @@ import javax.persistence.Version; ...@@ -21,9 +21,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "entry_participations") @Table(name = "entry_participations")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "CompoEntryParticipant.findAll", query = "SELECT c FROM CompoEntryParticipant c"), @NamedQuery(name = "CompoEntryParticipant.findAll", query = "SELECT c FROM CompoEntryParticipant c"),
@NamedQuery(name = "CompoEntryParticipant.findById", query = "SELECT c FROM CompoEntryParticipant c WHERE c.id = :id"),
@NamedQuery(name = "CompoEntryParticipant.findByRole", query = "SELECT c FROM CompoEntryParticipant c WHERE c.role = :role") }) @NamedQuery(name = "CompoEntryParticipant.findByRole", query = "SELECT c FROM CompoEntryParticipant c WHERE c.role = :role") })
public class CompoEntryParticipant implements ModelInterface { public class CompoEntryParticipant implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -48,97 +48,97 @@ public class CompoEntryParticipant implements ModelInterface { ...@@ -48,97 +48,97 @@ public class CompoEntryParticipant implements ModelInterface {
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public CompoEntry getEntry() { public CompoEntry getEntry() {
return entry; return entry;
} }
public void setEntry(CompoEntry entry) { public void setEntry(CompoEntry entry) {
this.entry = entry; this.entry = entry;
} }
public User getUsers() { public User getUsers() {
return users; return users;
} }
public void setUsers(User users) { public void setUsers(User users) {
this.users = users; this.users = users;
} }
public CompoEntryParticipant() { public CompoEntryParticipant() {
} }
public CompoEntryParticipant(Integer entryParticipationsId) { public CompoEntryParticipant(Integer entryParticipationsId) {
this.id = entryParticipationsId; this.id = entryParticipationsId;
} }
public String getRole() { public String getRole() {
return role; return role;
} }
public void setRole(String role) { public void setRole(String role) {
this.role = role; this.role = role;
} }
public CompoEntry getEntriesId() { public CompoEntry getEntriesId() {
return entry; return entry;
} }
public void setEntriesId(CompoEntry entriesId) { public void setEntriesId(CompoEntry entriesId) {
this.entry = entriesId; this.entry = entriesId;
} }
public User getUsersId() { public User getUsersId() {
return users; return users;
} }
public void setUsersId(User usersId) { public void setUsersId(User usersId) {
this.users = usersId; this.users = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof CompoEntryParticipant)) { if (!(object instanceof CompoEntryParticipant)) {
return false; return false;
} }
CompoEntryParticipant other = (CompoEntryParticipant) object; CompoEntryParticipant other = (CompoEntryParticipant) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId=" return "fi.insomnia.bortal.model.CompoEntryParticipant[entryParticipationsId="
+ id + "]"; + id + "]";
} }
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
} }
...@@ -25,16 +25,16 @@ import javax.persistence.Version; ...@@ -25,16 +25,16 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "discounts") @Table(name = "discounts")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Discount.findAll", query = "SELECT d FROM Discount d"), @NamedQuery(name = "Discount.findAll", query = "SELECT d FROM Discount d"),
@NamedQuery(name = "Discount.findById", query = "SELECT d FROM Discount d WHERE d.id = :id"),
@NamedQuery(name = "Discount.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"), @NamedQuery(name = "Discount.findByPercentage", query = "SELECT d FROM Discount d WHERE d.percentage = :percentage"),
@NamedQuery(name = "Discount.findByCode", query = "SELECT d FROM Discount d WHERE d.code = :code"), @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.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.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.findByAmountMax", query = "SELECT d FROM Discount d WHERE d.amountMax = :amountMax"),
@NamedQuery(name = "Discount.findByActive", query = "SELECT d FROM Discount d WHERE d.active = :active"), @NamedQuery(name = "Discount.findByActive", query = "SELECT d FROM Discount d WHERE d.active = :active"),
@NamedQuery(name = "Discount.findByMaxNum", query = "SELECT d FROM Discount d WHERE d.maxNum = :maxNum"), @NamedQuery(name = "Discount.findByMaxNum", query = "SELECT d FROM Discount d WHERE d.maxNum = :maxNum"),
@NamedQuery(name = "Discount.findByPerUser", query = "SELECT d FROM Discount d WHERE d.perUser = :perUser") }) @NamedQuery(name = "Discount.findByPerUser", query = "SELECT d FROM Discount d WHERE d.perUser = :perUser") })
public class Discount implements ModelInterface { public class Discount implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -84,153 +84,153 @@ public class Discount implements ModelInterface { ...@@ -84,153 +84,153 @@ public class Discount implements ModelInterface {
} }
public Discount(Integer discountsId) { public Discount(Integer discountsId) {
this.id = discountsId; this.id = discountsId;
} }
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public Discount(Integer discountsId, int percentage, int amountMin, public Discount(Integer discountsId, int percentage, int amountMin,
int amountMax, boolean active, int maxNum, int perUser) { int amountMax, boolean active, int maxNum, int perUser) {
this.id = discountsId; this.id = discountsId;
this.setPercentage(percentage); this.setPercentage(percentage);
this.amountMin = amountMin; this.amountMin = amountMin;
this.amountMax = amountMax; this.amountMax = amountMax;
this.active = active; this.active = active;
this.maxNum = maxNum; this.maxNum = maxNum;
this.perUser = perUser; this.perUser = perUser;
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String code) { public void setCode(String code) {
this.code = code; this.code = code;
} }
public String getDetails() { public String getDetails() {
return details; return details;
} }
public void setDetails(String details) { public void setDetails(String details) {
this.details = details; this.details = details;
} }
public int getAmountMin() { public int getAmountMin() {
return amountMin; return amountMin;
} }
public void setAmountMin(int amountMin) { public void setAmountMin(int amountMin) {
this.amountMin = amountMin; this.amountMin = amountMin;
} }
public int getAmountMax() { public int getAmountMax() {
return amountMax; return amountMax;
} }
public void setAmountMax(int amountMax) { public void setAmountMax(int amountMax) {
this.amountMax = amountMax; this.amountMax = amountMax;
} }
public boolean getActive() { public boolean getActive() {
return active; return active;
} }
public void setActive(boolean active) { public void setActive(boolean active) {
this.active = active; this.active = active;
} }
public int getMaxNum() { public int getMaxNum() {
return maxNum; return maxNum;
} }
public void setMaxNum(int maxNum) { public void setMaxNum(int maxNum) {
this.maxNum = maxNum; this.maxNum = maxNum;
} }
public int getPerUser() { public int getPerUser() {
return perUser; return perUser;
} }
public void setPerUser(int perUser) { public void setPerUser(int perUser) {
this.perUser = perUser; this.perUser = perUser;
} }
public List<DiscountInstance> getDiscountInstances() { public List<DiscountInstance> getDiscountInstances() {
return discountInstances; return discountInstances;
} }
public void setDiscountInstances(List<DiscountInstance> discountInstanceList) { public void setDiscountInstances(List<DiscountInstance> discountInstanceList) {
this.discountInstances = discountInstanceList; this.discountInstances = discountInstanceList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Discount)) { if (!(object instanceof Discount)) {
return false; return false;
} }
Discount other = (Discount) object; Discount other = (Discount) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Discount[id=" + id + "]"; return "fi.insomnia.bortal.model.Discount[id=" + id + "]";
} }
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
public void setPercentage(int percentage) { public void setPercentage(int percentage) {
this.percentage = percentage; this.percentage = percentage;
} }
public int getPercentage() { public int getPercentage() {
return percentage; return percentage;
} }
public void setRole(Role role) { public void setRole(Role role) {
this.role = role; this.role = role;
} }
public Role getRole() { public Role getRole() {
return role; return role;
} }
public void setProduct(Product product) { public void setProduct(Product product) {
this.product = product; this.product = product;
} }
public Product getProduct() { public Product getProduct() {
return product; return product;
} }
} }
...@@ -23,9 +23,7 @@ import javax.persistence.Version; ...@@ -23,9 +23,7 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "discount_instances") @Table(name = "discount_instances")
@NamedQueries( { @NamedQueries( { @NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"), })
@NamedQuery(name = "DiscountInstance.findAll", query = "SELECT d FROM DiscountInstance d"),
@NamedQuery(name = "DiscountInstance.findById", query = "SELECT d FROM DiscountInstance d WHERE d.id = :id") })
public class DiscountInstance implements ModelInterface { public class DiscountInstance implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -28,12 +28,12 @@ import javax.persistence.Version; ...@@ -28,12 +28,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "events") @Table(name = "events")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"), @NamedQuery(name = "Event.findAll", query = "SELECT e FROM Event e"),
@NamedQuery(name = "Event.findById", query = "SELECT e FROM Event e WHERE e.id = :id"),
@NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"), @NamedQuery(name = "Event.findByStartTime", query = "SELECT e FROM Event e WHERE e.startTime = :startTime"),
@NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"), @NamedQuery(name = "Event.findByEndTime", query = "SELECT e FROM Event e WHERE e.endTime = :endTime"),
@NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"), @NamedQuery(name = "Event.findByName", query = "SELECT e FROM Event e WHERE e.name = :name"),
@NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer") }) @NamedQuery(name = "Event.findByReferer", query = "SELECT e FROM Event e WHERE e.referer = :referer") })
public class Event implements ModelInterface { public class Event implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -87,127 +87,127 @@ public class Event implements ModelInterface { ...@@ -87,127 +87,127 @@ public class Event implements ModelInterface {
} }
public Event(Integer eventsId) { public Event(Integer eventsId) {
this.id = eventsId; this.id = eventsId;
} }
public Event(Integer eventsId, String name) { public Event(Integer eventsId, String name) {
this.id = eventsId; this.id = eventsId;
this.name = name; this.name = name;
} }
public Date getStartTime() { public Date getStartTime() {
return startTime; return startTime;
} }
public void setStartTime(Date startTime) { public void setStartTime(Date startTime) {
this.startTime = startTime; this.startTime = startTime;
} }
public Date getEndTime() { public Date getEndTime() {
return endTime; return endTime;
} }
public void setEndTime(Date endTime) { public void setEndTime(Date endTime) {
this.endTime = endTime; this.endTime = endTime;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getReferer() { public String getReferer() {
return referer; return referer;
} }
public void setReferer(String referer) { public void setReferer(String referer) {
this.referer = referer; this.referer = referer;
} }
public EventSettings getSettings() { public EventSettings getSettings() {
return settings; return settings;
} }
public void setSettings(EventSettings eventSettingsId) { public void setSettings(EventSettings eventSettingsId) {
this.settings = eventSettingsId; this.settings = eventSettingsId;
} }
public EventStatus getStatus() { public EventStatus getStatus() {
return status; return status;
} }
public void setStatus(EventStatus eventStatusId) { public void setStatus(EventStatus eventStatusId) {
this.status = eventStatusId; this.status = eventStatusId;
} }
public Role getDefaultRole() { public Role getDefaultRole() {
return defaultRole; return defaultRole;
} }
public void setDefaultRole(Role defaultRole) { public void setDefaultRole(Role defaultRole) {
this.defaultRole = defaultRole; this.defaultRole = defaultRole;
} }
public List<Compo> getCompos() { public List<Compo> getCompos() {
return compos; return compos;
} }
public void setCompos(List<Compo> compoList) { public void setCompos(List<Compo> compoList) {
this.compos = compoList; this.compos = compoList;
} }
public List<CardTemplate> getCardTemplates() { public List<CardTemplate> getCardTemplates() {
return cardTemplates; return cardTemplates;
} }
public void setCardTemplates(List<CardTemplate> cardTemplateList) { public void setCardTemplates(List<CardTemplate> cardTemplateList) {
this.cardTemplates = cardTemplateList; this.cardTemplates = cardTemplateList;
} }
public List<EventMap> getEventMaps() { public List<EventMap> getEventMaps() {
return eventMaps; return eventMaps;
} }
public void setEventMaps(List<EventMap> eventMapList) { public void setEventMaps(List<EventMap> eventMapList) {
this.eventMaps = eventMapList; this.eventMaps = eventMapList;
} }
public List<Role> getRoles() { public List<Role> getRoles() {
return roles; return roles;
} }
public void setRoles(List<Role> roleList) { public void setRoles(List<Role> roleList) {
this.roles = roleList; this.roles = roleList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Event)) { if (!(object instanceof Event)) {
return false; return false;
} }
Event other = (Event) object; Event other = (Event) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Event[eventsId=" + getId() + "]"; return "fi.insomnia.bortal.model.Event[eventsId=" + getId() + "]";
} }
/** /**
...@@ -215,7 +215,7 @@ public class Event implements ModelInterface { ...@@ -215,7 +215,7 @@ public class Event implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -224,7 +224,7 @@ public class Event implements ModelInterface { ...@@ -224,7 +224,7 @@ public class Event implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -232,7 +232,7 @@ public class Event implements ModelInterface { ...@@ -232,7 +232,7 @@ public class Event implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -241,6 +241,6 @@ public class Event implements ModelInterface { ...@@ -241,6 +241,6 @@ public class Event implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -25,9 +25,9 @@ import javax.persistence.Version; ...@@ -25,9 +25,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "maps") @Table(name = "maps")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"), @NamedQuery(name = "EventMap.findAll", query = "SELECT e FROM EventMap e"),
@NamedQuery(name = "EventMap.findById", query = "SELECT e FROM EventMap e WHERE id = :id"),
@NamedQuery(name = "EventMap.findByName", query = "SELECT e FROM EventMap e WHERE e.name = :name") }) @NamedQuery(name = "EventMap.findByName", query = "SELECT e FROM EventMap e WHERE e.name = :name") })
public class EventMap implements ModelInterface { public class EventMap implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -57,66 +57,66 @@ public class EventMap implements ModelInterface { ...@@ -57,66 +57,66 @@ public class EventMap implements ModelInterface {
} }
public EventMap(Integer mapsId) { public EventMap(Integer mapsId) {
this.id = mapsId; this.id = mapsId;
} }
public byte[] getMapData() { public byte[] getMapData() {
return mapData; return mapData;
} }
public void setMapData(byte[] mapData) { public void setMapData(byte[] mapData) {
this.mapData = mapData; this.mapData = mapData;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String mapName) { public void setName(String mapName) {
this.name = mapName; this.name = mapName;
} }
public List<Place> getPlaces() { public List<Place> getPlaces() {
return places; return places;
} }
public void setPlaces(List<Place> placeList) { public void setPlaces(List<Place> placeList) {
this.places = placeList; this.places = placeList;
} }
public Event getEvent() { public Event getEvent() {
return event; return event;
} }
public void setEvent(Event eventsId) { public void setEvent(Event eventsId) {
this.event = eventsId; this.event = eventsId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof EventMap)) { if (!(object instanceof EventMap)) {
return false; return false;
} }
EventMap other = (EventMap) object; EventMap other = (EventMap) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.EventMap[id=" + getId() + "]"; return "fi.insomnia.bortal.model.EventMap[id=" + getId() + "]";
} }
/** /**
...@@ -124,7 +124,7 @@ public class EventMap implements ModelInterface { ...@@ -124,7 +124,7 @@ public class EventMap implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -133,7 +133,7 @@ public class EventMap implements ModelInterface { ...@@ -133,7 +133,7 @@ public class EventMap implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -141,7 +141,7 @@ public class EventMap implements ModelInterface { ...@@ -141,7 +141,7 @@ public class EventMap implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -150,6 +150,6 @@ public class EventMap implements ModelInterface { ...@@ -150,6 +150,6 @@ public class EventMap implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -22,10 +22,10 @@ import javax.persistence.Version; ...@@ -22,10 +22,10 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "event_settings") @Table(name = "event_settings")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"), @NamedQuery(name = "EventSettings.findAll", query = "SELECT e FROM EventSettings e"),
@NamedQuery(name = "EventSettings.findById", query = "SELECT e FROM EventSettings e WHERE e.id = :id"),
@NamedQuery(name = "EventSettings.findByBaseName", query = "SELECT e FROM EventSettings e WHERE e.baseName = :baseName"), @NamedQuery(name = "EventSettings.findByBaseName", query = "SELECT e FROM EventSettings e WHERE e.baseName = :baseName"),
@NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet") }) @NamedQuery(name = "EventSettings.findByStyleSheet", query = "SELECT e FROM EventSettings e WHERE e.styleSheet = :styleSheet") })
public class EventSettings implements ModelInterface { public class EventSettings implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -50,58 +50,58 @@ public class EventSettings implements ModelInterface { ...@@ -50,58 +50,58 @@ public class EventSettings implements ModelInterface {
} }
public EventSettings(Integer eventSettingsId) { public EventSettings(Integer eventSettingsId) {
this.id = eventSettingsId; this.id = eventSettingsId;
} }
public String getBaseName() { public String getBaseName() {
return baseName; return baseName;
} }
public void setBaseName(String resourceBundle) { public void setBaseName(String resourceBundle) {
this.baseName = resourceBundle; this.baseName = resourceBundle;
} }
public String getStyleSheet() { public String getStyleSheet() {
return styleSheet; return styleSheet;
} }
public void setStyleSheet(String styleSheet) { public void setStyleSheet(String styleSheet) {
this.styleSheet = styleSheet; this.styleSheet = styleSheet;
} }
public List<Event> getEvents() { public List<Event> getEvents() {
return events; return events;
} }
public void setEvents(List<Event> eventList) { public void setEvents(List<Event> eventList) {
this.events = eventList; this.events = eventList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof EventSettings)) { if (!(object instanceof EventSettings)) {
return false; return false;
} }
EventSettings other = (EventSettings) object; EventSettings other = (EventSettings) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.EventSettings[id=" + getId() + "]"; return "fi.insomnia.bortal.model.EventSettings[id=" + getId() + "]";
} }
/** /**
...@@ -109,7 +109,7 @@ public class EventSettings implements ModelInterface { ...@@ -109,7 +109,7 @@ public class EventSettings implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -118,7 +118,7 @@ public class EventSettings implements ModelInterface { ...@@ -118,7 +118,7 @@ public class EventSettings implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -126,7 +126,7 @@ public class EventSettings implements ModelInterface { ...@@ -126,7 +126,7 @@ public class EventSettings implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -135,6 +135,6 @@ public class EventSettings implements ModelInterface { ...@@ -135,6 +135,6 @@ public class EventSettings implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -23,9 +23,9 @@ import javax.persistence.Version; ...@@ -23,9 +23,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "event_status", uniqueConstraints = { @UniqueConstraint(columnNames = { "status_name" }) }) @Table(name = "event_status", uniqueConstraints = { @UniqueConstraint(columnNames = { "status_name" }) })
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"), @NamedQuery(name = "EventStatus.findAll", query = "SELECT e FROM EventStatus e"),
@NamedQuery(name = "EventStatus.findById", query = "SELECT e FROM EventStatus e WHERE e.id = :id"),
@NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName") }) @NamedQuery(name = "EventStatus.findByStatusName", query = "SELECT e FROM EventStatus e WHERE e.statusName = :statusName") })
public class EventStatus implements ModelInterface { public class EventStatus implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -48,55 +48,55 @@ public class EventStatus implements ModelInterface { ...@@ -48,55 +48,55 @@ public class EventStatus implements ModelInterface {
} }
public EventStatus(Integer eventStatusId) { public EventStatus(Integer eventStatusId) {
this.id = eventStatusId; this.id = eventStatusId;
} }
public EventStatus(Integer eventStatusId, String statusName) { public EventStatus(Integer eventStatusId, String statusName) {
this.id = eventStatusId; this.id = eventStatusId;
this.statusName = statusName; this.statusName = statusName;
} }
public String getStatusName() { public String getStatusName() {
return statusName; return statusName;
} }
public void setStatusName(String statusName) { public void setStatusName(String statusName) {
this.statusName = statusName; this.statusName = statusName;
} }
public List<Event> getEvents() { public List<Event> getEvents() {
return events; return events;
} }
public void setEvents(List<Event> eventList) { public void setEvents(List<Event> eventList) {
this.events = eventList; this.events = eventList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof EventStatus)) { if (!(object instanceof EventStatus)) {
return false; return false;
} }
EventStatus other = (EventStatus) object; EventStatus other = (EventStatus) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.EventStatus[id=" + getId() + "]"; return "fi.insomnia.bortal.model.EventStatus[id=" + getId() + "]";
} }
/** /**
...@@ -104,7 +104,7 @@ public class EventStatus implements ModelInterface { ...@@ -104,7 +104,7 @@ public class EventStatus implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -113,7 +113,7 @@ public class EventStatus implements ModelInterface { ...@@ -113,7 +113,7 @@ public class EventStatus implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -121,7 +121,7 @@ public class EventStatus implements ModelInterface { ...@@ -121,7 +121,7 @@ public class EventStatus implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -130,6 +130,6 @@ public class EventStatus implements ModelInterface { ...@@ -130,6 +130,6 @@ public class EventStatus implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -24,12 +24,12 @@ import javax.persistence.Version; ...@@ -24,12 +24,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "food_waves") @Table(name = "food_waves")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"), @NamedQuery(name = "FoodWave.findAll", query = "SELECT f FROM FoodWave f"),
@NamedQuery(name = "FoodWave.findById", query = "SELECT f FROM FoodWave f WHERE f.id = :id"),
@NamedQuery(name = "FoodWave.findByName", query = "SELECT f FROM FoodWave f WHERE f.name = :name"), @NamedQuery(name = "FoodWave.findByName", query = "SELECT f FROM FoodWave f WHERE f.name = :name"),
@NamedQuery(name = "FoodWave.findByDescription", query = "SELECT f FROM FoodWave f WHERE f.description = :description"), @NamedQuery(name = "FoodWave.findByDescription", query = "SELECT f FROM FoodWave f WHERE f.description = :description"),
@NamedQuery(name = "FoodWave.findByTime", query = "SELECT f FROM FoodWave f WHERE f.time = :time"), @NamedQuery(name = "FoodWave.findByTime", query = "SELECT f FROM FoodWave f WHERE f.time = :time"),
@NamedQuery(name = "FoodWave.findByClosed", query = "SELECT f FROM FoodWave f WHERE f.closed = :closed") }) @NamedQuery(name = "FoodWave.findByClosed", query = "SELECT f FROM FoodWave f WHERE f.closed = :closed") })
public class FoodWave implements ModelInterface { public class FoodWave implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -61,81 +61,81 @@ public class FoodWave implements ModelInterface { ...@@ -61,81 +61,81 @@ public class FoodWave implements ModelInterface {
} }
public FoodWave(Integer foodWavesId) { public FoodWave(Integer foodWavesId) {
this.id = foodWavesId; this.id = foodWavesId;
} }
public FoodWave(Integer foodWavesId, String waveName, boolean waveClosed) { public FoodWave(Integer foodWavesId, String waveName, boolean waveClosed) {
this.id = foodWavesId; this.id = foodWavesId;
this.name = waveName; this.name = waveName;
this.closed = waveClosed; this.closed = waveClosed;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String waveName) { public void setName(String waveName) {
this.name = waveName; this.name = waveName;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String waveDescription) { public void setDescription(String waveDescription) {
this.description = waveDescription; this.description = waveDescription;
} }
public Date getTime() { public Date getTime() {
return time; return time;
} }
public void setTime(Date waveTime) { public void setTime(Date waveTime) {
this.time = waveTime; this.time = waveTime;
} }
public boolean getClosed() { public boolean getClosed() {
return closed; return closed;
} }
public void setClosed(boolean waveClosed) { public void setClosed(boolean waveClosed) {
this.closed = waveClosed; this.closed = waveClosed;
} }
public List<AccountEvent> getAccountEvents() { public List<AccountEvent> getAccountEvents() {
return accountEvents; return accountEvents;
} }
public void setAccountEvents(List<AccountEvent> accountEventList) { public void setAccountEvents(List<AccountEvent> accountEventList) {
this.accountEvents = accountEventList; this.accountEvents = accountEventList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id // TODO: Warning - this method won't work in the case the id
// fields are // fields are
// not set // not set
if (!(object instanceof FoodWave)) { if (!(object instanceof FoodWave)) {
return false; return false;
} }
FoodWave other = (FoodWave) object; FoodWave other = (FoodWave) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.FoodWave[id=" + getId() + "]"; return "fi.insomnia.bortal.model.FoodWave[id=" + getId() + "]";
} }
/** /**
...@@ -143,7 +143,7 @@ public class FoodWave implements ModelInterface { ...@@ -143,7 +143,7 @@ public class FoodWave implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -152,7 +152,7 @@ public class FoodWave implements ModelInterface { ...@@ -152,7 +152,7 @@ public class FoodWave implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -160,7 +160,7 @@ public class FoodWave implements ModelInterface { ...@@ -160,7 +160,7 @@ public class FoodWave implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -169,6 +169,6 @@ public class FoodWave implements ModelInterface { ...@@ -169,6 +169,6 @@ public class FoodWave implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -21,10 +21,10 @@ import javax.persistence.Version; ...@@ -21,10 +21,10 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "food_wave_templates") @Table(name = "food_wave_templates")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"), @NamedQuery(name = "FoodWaveTemplate.findAll", query = "SELECT f FROM FoodWaveTemplate f"),
@NamedQuery(name = "FoodWaveTemplate.findById", query = "SELECT f FROM FoodWaveTemplate f WHERE f.id = :id"),
@NamedQuery(name = "FoodWaveTemplate.findByName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.name = :name"), @NamedQuery(name = "FoodWaveTemplate.findByName", query = "SELECT f FROM FoodWaveTemplate f WHERE f.name = :name"),
@NamedQuery(name = "FoodWaveTemplate.findByDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.description = :description") }) @NamedQuery(name = "FoodWaveTemplate.findByDescription", query = "SELECT f FROM FoodWaveTemplate f WHERE f.description = :description") })
public class FoodWaveTemplate implements ModelInterface { public class FoodWaveTemplate implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -49,62 +49,62 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -49,62 +49,62 @@ public class FoodWaveTemplate implements ModelInterface {
} }
public FoodWaveTemplate(Integer foodWaveTemplatesId) { public FoodWaveTemplate(Integer foodWaveTemplatesId) {
this.id = foodWaveTemplatesId; this.id = foodWaveTemplatesId;
} }
public FoodWaveTemplate(Integer foodWaveTemplatesId, String templateName) { public FoodWaveTemplate(Integer foodWaveTemplatesId, String templateName) {
this.id = foodWaveTemplatesId; this.id = foodWaveTemplatesId;
this.name = templateName; this.name = templateName;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String templateName) { public void setName(String templateName) {
this.name = templateName; this.name = templateName;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String templateDescription) { public void setDescription(String templateDescription) {
this.description = templateDescription; this.description = templateDescription;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof FoodWaveTemplate)) { if (!(object instanceof FoodWaveTemplate)) {
return false; return false;
} }
FoodWaveTemplate other = (FoodWaveTemplate) object; FoodWaveTemplate other = (FoodWaveTemplate) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.FoodWaveTemplate[id=" + getId() + "]"; return "fi.insomnia.bortal.model.FoodWaveTemplate[id=" + getId() + "]";
} }
/** /**
* @return the products * @return the products
*/ */
public List<Product> getProducts() { public List<Product> getProducts() {
return products; return products;
} }
/** /**
...@@ -112,7 +112,7 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -112,7 +112,7 @@ public class FoodWaveTemplate implements ModelInterface {
* the products to set * the products to set
*/ */
public void setProducts(List<Product> products) { public void setProducts(List<Product> products) {
this.products = products; this.products = products;
} }
/** /**
...@@ -120,7 +120,7 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -120,7 +120,7 @@ public class FoodWaveTemplate implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -129,7 +129,7 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -129,7 +129,7 @@ public class FoodWaveTemplate implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -137,7 +137,7 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -137,7 +137,7 @@ public class FoodWaveTemplate implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -146,6 +146,6 @@ public class FoodWaveTemplate implements ModelInterface { ...@@ -146,6 +146,6 @@ public class FoodWaveTemplate implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -25,13 +25,13 @@ import javax.persistence.Version; ...@@ -25,13 +25,13 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "group_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = { @Table(name = "group_memberships", uniqueConstraints = { @UniqueConstraint(columnNames = {
"users_id", "groups_id" }) }) "users_id", "groups_id" }) })
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"), @NamedQuery(name = "GroupMembership.findAll", query = "SELECT g FROM GroupMembership g"),
@NamedQuery(name = "GroupMembership.findById", query = "SELECT g FROM GroupMembership g WHERE g.id = :id"),
@NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"), @NamedQuery(name = "GroupMembership.findByInviteAccepted", query = "SELECT g FROM GroupMembership g WHERE g.inviteAccepted = :inviteAccepted"),
@NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"), @NamedQuery(name = "GroupMembership.findByInviteEmail", query = "SELECT g FROM GroupMembership g WHERE g.inviteEmail = :inviteEmail"),
@NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName") }) @NamedQuery(name = "GroupMembership.findByInviteName", query = "SELECT g FROM GroupMembership g WHERE g.inviteName = :inviteName") })
public class GroupMembership implements ModelInterface { public class GroupMembership implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -69,82 +69,82 @@ public class GroupMembership implements ModelInterface { ...@@ -69,82 +69,82 @@ public class GroupMembership implements ModelInterface {
} }
public GroupMembership(Integer groupMembershipsId) { public GroupMembership(Integer groupMembershipsId) {
this.id = groupMembershipsId; this.id = groupMembershipsId;
} }
public Date getInviteAccepted() { public Date getInviteAccepted() {
return inviteAccepted; return inviteAccepted;
} }
public void setInviteAccepted(Date inviteAccepted) { public void setInviteAccepted(Date inviteAccepted) {
this.inviteAccepted = inviteAccepted; this.inviteAccepted = inviteAccepted;
} }
public String getInviteEmail() { public String getInviteEmail() {
return inviteEmail; return inviteEmail;
} }
public void setInviteEmail(String inviteEmail) { public void setInviteEmail(String inviteEmail) {
this.inviteEmail = inviteEmail; this.inviteEmail = inviteEmail;
} }
public String getInviteName() { public String getInviteName() {
return inviteName; return inviteName;
} }
public void setInviteName(String inviteName) { public void setInviteName(String inviteName) {
this.inviteName = inviteName; this.inviteName = inviteName;
} }
public PlaceGroup getPlaceGroup() { public PlaceGroup getPlaceGroup() {
return placeGroup; return placeGroup;
} }
public void setPlaceGroup(PlaceGroup groupsId) { public void setPlaceGroup(PlaceGroup groupsId) {
this.placeGroup = groupsId; this.placeGroup = groupsId;
} }
public Place getPlaceReservation() { public Place getPlaceReservation() {
return placeReservation; return placeReservation;
} }
public void setPlaceReservation(Place placeReservation) { public void setPlaceReservation(Place placeReservation) {
this.placeReservation = placeReservation; this.placeReservation = placeReservation;
} }
public User getUser() { public User getUser() {
return user; return user;
} }
public void setUser(User usersId) { public void setUser(User usersId) {
this.user = usersId; this.user = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof GroupMembership)) { if (!(object instanceof GroupMembership)) {
return false; return false;
} }
GroupMembership other = (GroupMembership) object; GroupMembership other = (GroupMembership) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.GroupMembership[id=" + getId() + "]"; return "fi.insomnia.bortal.model.GroupMembership[id=" + getId() + "]";
} }
/** /**
...@@ -152,7 +152,7 @@ public class GroupMembership implements ModelInterface { ...@@ -152,7 +152,7 @@ public class GroupMembership implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -161,7 +161,7 @@ public class GroupMembership implements ModelInterface { ...@@ -161,7 +161,7 @@ public class GroupMembership implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -169,7 +169,7 @@ public class GroupMembership implements ModelInterface { ...@@ -169,7 +169,7 @@ public class GroupMembership implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -178,6 +178,6 @@ public class GroupMembership implements ModelInterface { ...@@ -178,6 +178,6 @@ public class GroupMembership implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -22,7 +22,7 @@ import javax.persistence.Version; ...@@ -22,7 +22,7 @@ import javax.persistence.Version;
@Table(name = "locations") @Table(name = "locations")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"), @NamedQuery(name = "Location.findAll", query = "SELECT l FROM Location l"),
@NamedQuery(name = "Location.findById", query = "SELECT l FROM Location l WHERE l.id = :id"),
@NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :name") }) @NamedQuery(name = "Location.findByLocationName", query = "SELECT l FROM Location l WHERE l.locationName = :name") })
public class Location implements ModelInterface { public class Location implements ModelInterface {
......
...@@ -24,10 +24,10 @@ import javax.persistence.Version; ...@@ -24,10 +24,10 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "event_log") @Table(name = "event_log")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"), @NamedQuery(name = "LogEntry.findAll", query = "SELECT l FROM LogEntry l"),
@NamedQuery(name = "LogEntry.findById", query = "SELECT l FROM LogEntry l WHERE l.id = :id"),
@NamedQuery(name = "LogEntry.findByTime", query = "SELECT l FROM LogEntry l WHERE l.time = :time"), @NamedQuery(name = "LogEntry.findByTime", query = "SELECT l FROM LogEntry l WHERE l.time = :time"),
@NamedQuery(name = "LogEntry.findByDescription", query = "SELECT l FROM LogEntry l WHERE l.description = :description") }) @NamedQuery(name = "LogEntry.findByDescription", query = "SELECT l FROM LogEntry l WHERE l.description = :description") })
public class LogEntry implements ModelInterface { public class LogEntry implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -59,71 +59,71 @@ public class LogEntry implements ModelInterface { ...@@ -59,71 +59,71 @@ public class LogEntry implements ModelInterface {
} }
public LogEntry(Integer eventLogId) { public LogEntry(Integer eventLogId) {
this.id = eventLogId; this.id = eventLogId;
} }
public LogEntry(Integer eventLogId, Date eventTime) { public LogEntry(Integer eventLogId, Date eventTime) {
this.id = eventLogId; this.id = eventLogId;
this.time = eventTime; this.time = eventTime;
} }
public Date getTime() { public Date getTime() {
return time; return time;
} }
public void setTime(Date eventTime) { public void setTime(Date eventTime) {
this.time = eventTime; this.time = eventTime;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String eventDescription) { public void setDescription(String eventDescription) {
this.description = eventDescription; this.description = eventDescription;
} }
public LogEntryType getType() { public LogEntryType getType() {
return type; return type;
} }
public void setType(LogEntryType eventLogTypesId) { public void setType(LogEntryType eventLogTypesId) {
this.type = eventLogTypesId; this.type = eventLogTypesId;
} }
public User getUser() { public User getUser() {
return user; return user;
} }
public void setUser(User usersId) { public void setUser(User usersId) {
this.user = usersId; this.user = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof LogEntry)) { if (!(object instanceof LogEntry)) {
return false; return false;
} }
LogEntry other = (LogEntry) object; LogEntry other = (LogEntry) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + getId() + "]"; return "fi.insomnia.bortal.model.LogEntry[eventLogId=" + getId() + "]";
} }
/** /**
...@@ -131,7 +131,7 @@ public class LogEntry implements ModelInterface { ...@@ -131,7 +131,7 @@ public class LogEntry implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -140,7 +140,7 @@ public class LogEntry implements ModelInterface { ...@@ -140,7 +140,7 @@ public class LogEntry implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -148,7 +148,7 @@ public class LogEntry implements ModelInterface { ...@@ -148,7 +148,7 @@ public class LogEntry implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -157,6 +157,6 @@ public class LogEntry implements ModelInterface { ...@@ -157,6 +157,6 @@ public class LogEntry implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -22,9 +22,9 @@ import javax.persistence.Version; ...@@ -22,9 +22,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "event_log_types") @Table(name = "event_log_types")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"), @NamedQuery(name = "LogEntryType.findAll", query = "SELECT l FROM LogEntryType l"),
@NamedQuery(name = "LogEntryType.findById", query = "SELECT l FROM LogEntryType l WHERE l.id = :id"),
@NamedQuery(name = "LogEntryType.findByDescription", query = "SELECT l FROM LogEntryType l WHERE l.description = :description") }) @NamedQuery(name = "LogEntryType.findByDescription", query = "SELECT l FROM LogEntryType l WHERE l.description = :description") })
public class LogEntryType implements ModelInterface { public class LogEntryType implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -47,55 +47,55 @@ public class LogEntryType implements ModelInterface { ...@@ -47,55 +47,55 @@ public class LogEntryType implements ModelInterface {
} }
public LogEntryType(Integer eventLogTypesId) { public LogEntryType(Integer eventLogTypesId) {
this.id = eventLogTypesId; this.id = eventLogTypesId;
} }
public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) { public LogEntryType(Integer eventLogTypesId, String eventTypeDescription) {
this.id = eventLogTypesId; this.id = eventLogTypesId;
this.description = eventTypeDescription; this.description = eventTypeDescription;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String eventTypeDescription) { public void setDescription(String eventTypeDescription) {
this.description = eventTypeDescription; this.description = eventTypeDescription;
} }
public List<LogEntry> getLogEntries() { public List<LogEntry> getLogEntries() {
return logEntries; return logEntries;
} }
public void setLogEntries(List<LogEntry> logEntryList) { public void setLogEntries(List<LogEntry> logEntryList) {
this.logEntries = logEntryList; this.logEntries = logEntryList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof LogEntryType)) { if (!(object instanceof LogEntryType)) {
return false; return false;
} }
LogEntryType other = (LogEntryType) object; LogEntryType other = (LogEntryType) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.LogEntryType[id=" + getId() + "]"; return "fi.insomnia.bortal.model.LogEntryType[id=" + getId() + "]";
} }
/** /**
...@@ -103,7 +103,7 @@ public class LogEntryType implements ModelInterface { ...@@ -103,7 +103,7 @@ public class LogEntryType implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -112,7 +112,7 @@ public class LogEntryType implements ModelInterface { ...@@ -112,7 +112,7 @@ public class LogEntryType implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -120,7 +120,7 @@ public class LogEntryType implements ModelInterface { ...@@ -120,7 +120,7 @@ public class LogEntryType implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -129,6 +129,6 @@ public class LogEntryType implements ModelInterface { ...@@ -129,6 +129,6 @@ public class LogEntryType implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -25,14 +25,14 @@ import javax.persistence.Version; ...@@ -25,14 +25,14 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "news") @Table(name = "news")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"), @NamedQuery(name = "News.findAll", query = "SELECT n FROM News n"),
@NamedQuery(name = "News.findById", query = "SELECT n FROM News n WHERE n.id = :id"),
@NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"), @NamedQuery(name = "News.findByTitle", query = "SELECT n FROM News n WHERE n.title = :title"),
@NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"), @NamedQuery(name = "News.findByBody", query = "SELECT n FROM News n WHERE n.body = :body"),
@NamedQuery(name = "News.findByAbstract", query = "SELECT n FROM News n WHERE n.bodyAbstract = :bodyAbstract"), @NamedQuery(name = "News.findByAbstract", query = "SELECT n FROM News n WHERE n.bodyAbstract = :bodyAbstract"),
@NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"), @NamedQuery(name = "News.findByPublish", query = "SELECT n FROM News n WHERE n.publish = :publish"),
@NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"), @NamedQuery(name = "News.findByExpire", query = "SELECT n FROM News n WHERE n.expire = :expire"),
@NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") }) @NamedQuery(name = "News.findByPriority", query = "SELECT n FROM News n WHERE n.priority = :priority") })
public class News implements ModelInterface { public class News implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -72,96 +72,96 @@ public class News implements ModelInterface { ...@@ -72,96 +72,96 @@ public class News implements ModelInterface {
} }
public News(Integer newsId) { public News(Integer newsId) {
this.id = newsId; this.id = newsId;
} }
public News(Integer newsId, String title, int priority) { public News(Integer newsId, String title, int priority) {
this.id = newsId; this.id = newsId;
this.title = title; this.title = title;
this.priority = priority; this.priority = priority;
} }
public String getTitle() { public String getTitle() {
return title; return title;
} }
public void setTitle(String title) { public void setTitle(String title) {
this.title = title; this.title = title;
} }
public String getBody() { public String getBody() {
return body; return body;
} }
public void setBody(String body) { public void setBody(String body) {
this.body = body; this.body = body;
} }
public String getBodyAbstract() { public String getBodyAbstract() {
return bodyAbstract; return bodyAbstract;
} }
public void setBodyAbstract(String abstract1) { public void setBodyAbstract(String abstract1) {
this.bodyAbstract = abstract1; this.bodyAbstract = abstract1;
} }
public Date getPublish() { public Date getPublish() {
return publish; return publish;
} }
public void setPublish(Date publish) { public void setPublish(Date publish) {
this.publish = publish; this.publish = publish;
} }
public Date getExpire() { public Date getExpire() {
return expire; return expire;
} }
public void setExpire(Date expire) { public void setExpire(Date expire) {
this.expire = expire; this.expire = expire;
} }
public int getPriority() { public int getPriority() {
return priority; return priority;
} }
public void setPriority(int priority) { public void setPriority(int priority) {
this.priority = priority; this.priority = priority;
} }
public NewsGroup getGroup() { public NewsGroup getGroup() {
return group; return group;
} }
public void setGroup(NewsGroup newsGroupsId) { public void setGroup(NewsGroup newsGroupsId) {
this.group = newsGroupsId; this.group = newsGroupsId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof News)) { if (!(object instanceof News)) {
return false; return false;
} }
News other = (News) object; News other = (News) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.News[id=" + getId() + "]"; return "fi.insomnia.bortal.model.News[id=" + getId() + "]";
} }
/** /**
...@@ -169,7 +169,7 @@ public class News implements ModelInterface { ...@@ -169,7 +169,7 @@ public class News implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -178,7 +178,7 @@ public class News implements ModelInterface { ...@@ -178,7 +178,7 @@ public class News implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -186,7 +186,7 @@ public class News implements ModelInterface { ...@@ -186,7 +186,7 @@ public class News implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -195,6 +195,6 @@ public class News implements ModelInterface { ...@@ -195,6 +195,6 @@ public class News implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -25,11 +25,11 @@ import javax.persistence.Version; ...@@ -25,11 +25,11 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "news_groups") @Table(name = "news_groups")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"), @NamedQuery(name = "NewsGroup.findAll", query = "SELECT n FROM NewsGroup n"),
@NamedQuery(name = "NewsGroup.findById", query = "SELECT n FROM NewsGroup n WHERE n.id = :id"),
@NamedQuery(name = "NewsGroup.findByName", query = "SELECT n FROM NewsGroup n WHERE n.name = :name"), @NamedQuery(name = "NewsGroup.findByName", query = "SELECT n FROM NewsGroup n WHERE n.name = :name"),
@NamedQuery(name = "NewsGroup.findByDescription", query = "SELECT n FROM NewsGroup n WHERE n.description = :description"), @NamedQuery(name = "NewsGroup.findByDescription", query = "SELECT n FROM NewsGroup n WHERE n.description = :description"),
@NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") }) @NamedQuery(name = "NewsGroup.findByPriority", query = "SELECT n FROM NewsGroup n WHERE n.priority = :priority") })
public class NewsGroup implements ModelInterface { public class NewsGroup implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -62,81 +62,81 @@ public class NewsGroup implements ModelInterface { ...@@ -62,81 +62,81 @@ public class NewsGroup implements ModelInterface {
} }
public NewsGroup(Integer newsGroupsId) { public NewsGroup(Integer newsGroupsId) {
this.id = newsGroupsId; this.id = newsGroupsId;
} }
public NewsGroup(Integer newsGroupsId, String groupName, int priority) { public NewsGroup(Integer newsGroupsId, String groupName, int priority) {
this.id = newsGroupsId; this.id = newsGroupsId;
this.name = groupName; this.name = groupName;
this.priority = priority; this.priority = priority;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String groupName) { public void setName(String groupName) {
this.name = groupName; this.name = groupName;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String groupDescription) { public void setDescription(String groupDescription) {
this.description = groupDescription; this.description = groupDescription;
} }
public int getPriority() { public int getPriority() {
return priority; return priority;
} }
public void setPriority(int priority) { public void setPriority(int priority) {
this.priority = priority; this.priority = priority;
} }
public AccessRight getAccessRight() { public AccessRight getAccessRight() {
return accessRight; return accessRight;
} }
public void setAccessRight(AccessRight accessRightsId) { public void setAccessRight(AccessRight accessRightsId) {
this.accessRight = accessRightsId; this.accessRight = accessRightsId;
} }
public List<News> getNews() { public List<News> getNews() {
return news; return news;
} }
public void setNews(List<News> newsList) { public void setNews(List<News> newsList) {
this.news = newsList; this.news = newsList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof NewsGroup)) { if (!(object instanceof NewsGroup)) {
return false; return false;
} }
NewsGroup other = (NewsGroup) object; NewsGroup other = (NewsGroup) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId() return "fi.insomnia.bortal.model.NewsGroup[newsGroupsId=" + getId()
+ "]"; + "]";
} }
/** /**
...@@ -144,7 +144,7 @@ public class NewsGroup implements ModelInterface { ...@@ -144,7 +144,7 @@ public class NewsGroup implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -153,7 +153,7 @@ public class NewsGroup implements ModelInterface { ...@@ -153,7 +153,7 @@ public class NewsGroup implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -161,7 +161,7 @@ public class NewsGroup implements ModelInterface { ...@@ -161,7 +161,7 @@ public class NewsGroup implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -170,6 +170,6 @@ public class NewsGroup implements ModelInterface { ...@@ -170,6 +170,6 @@ public class NewsGroup implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -21,14 +21,14 @@ import javax.persistence.Version; ...@@ -21,14 +21,14 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "places") @Table(name = "places")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"), @NamedQuery(name = "Place.findAll", query = "SELECT p FROM Place p"),
@NamedQuery(name = "Place.findByDescription", query = "SELECT p FROM Place p WHERE p.description = :description"), @NamedQuery(name = "Place.findByDescription", query = "SELECT p FROM Place p WHERE p.description = :description"),
@NamedQuery(name = "Place.findById", query = "SELECT p FROM Place p WHERE p.id = :id"),
@NamedQuery(name = "Place.findByName", query = "SELECT p FROM Place p WHERE p.name = :name"), @NamedQuery(name = "Place.findByName", query = "SELECT p FROM Place p WHERE p.name = :name"),
@NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"), @NamedQuery(name = "Place.findByMapX", query = "SELECT p FROM Place p WHERE p.mapX = :mapX"),
@NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"), @NamedQuery(name = "Place.findByMapY", query = "SELECT p FROM Place p WHERE p.mapY = :mapY"),
@NamedQuery(name = "Place.findByDetails", query = "SELECT p FROM Place p WHERE p.details = :details"), @NamedQuery(name = "Place.findByDetails", query = "SELECT p FROM Place p WHERE p.details = :details"),
@NamedQuery(name = "Place.findByCode", query = "SELECT p FROM Place p WHERE p.code = :code") }) @NamedQuery(name = "Place.findByCode", query = "SELECT p FROM Place p WHERE p.code = :code") })
public class Place implements ModelInterface { public class Place implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -85,114 +85,114 @@ public class Place implements ModelInterface { ...@@ -85,114 +85,114 @@ public class Place implements ModelInterface {
} }
public Place(Integer placesId) { public Place(Integer placesId) {
this.id = placesId; this.id = placesId;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String placeDescription) { public void setDescription(String placeDescription) {
this.description = placeDescription; this.description = placeDescription;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String placeName) { public void setName(String placeName) {
this.name = placeName; this.name = placeName;
} }
public Integer getMapX() { public Integer getMapX() {
return mapX; return mapX;
} }
public void setMapX(Integer mapX) { public void setMapX(Integer mapX) {
this.mapX = mapX; this.mapX = mapX;
} }
public Integer getMapY() { public Integer getMapY() {
return mapY; return mapY;
} }
public void setMapY(Integer mapY) { public void setMapY(Integer mapY) {
this.mapY = mapY; this.mapY = mapY;
} }
public String getDetails() { public String getDetails() {
return details; return details;
} }
public void setDetails(String placeDetails) { public void setDetails(String placeDetails) {
this.details = placeDetails; this.details = placeDetails;
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String placeCode) { public void setCode(String placeCode) {
this.code = placeCode; this.code = placeCode;
} }
public PlaceGroup getPlaceGroup() { public PlaceGroup getPlaceGroup() {
return placeGroup; return placeGroup;
} }
public void setPlaceGroup(PlaceGroup groupsId) { public void setPlaceGroup(PlaceGroup groupsId) {
this.placeGroup = groupsId; this.placeGroup = groupsId;
} }
public EventMap getMap() { public EventMap getMap() {
return map; return map;
} }
public void setMap(EventMap mapsId) { public void setMap(EventMap mapsId) {
this.map = mapsId; this.map = mapsId;
} }
public Product getProduct() { public Product getProduct() {
return product; return product;
} }
public void setProduct(Product productsId) { public void setProduct(Product productsId) {
this.product = productsId; this.product = productsId;
} }
public User getCurrentUser() { public User getCurrentUser() {
return currentUser; return currentUser;
} }
public void setCurrentUser(User usersId) { public void setCurrentUser(User usersId) {
this.currentUser = usersId; this.currentUser = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Place)) { if (!(object instanceof Place)) {
return false; return false;
} }
Place other = (Place) object; Place other = (Place) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Place[id=" + getId() + "]"; return "fi.insomnia.bortal.model.Place[id=" + getId() + "]";
} }
/** /**
...@@ -200,7 +200,7 @@ public class Place implements ModelInterface { ...@@ -200,7 +200,7 @@ public class Place implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -209,7 +209,7 @@ public class Place implements ModelInterface { ...@@ -209,7 +209,7 @@ public class Place implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -217,7 +217,7 @@ public class Place implements ModelInterface { ...@@ -217,7 +217,7 @@ public class Place implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -226,14 +226,14 @@ public class Place implements ModelInterface { ...@@ -226,14 +226,14 @@ public class Place implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public void setPlaceReserver(GroupMembership placeReserver) { public void setPlaceReserver(GroupMembership placeReserver) {
this.placeReserver = placeReserver; this.placeReserver = placeReserver;
} }
public GroupMembership getPlaceReserver() { public GroupMembership getPlaceReserver() {
return placeReserver; return placeReserver;
} }
} }
...@@ -28,7 +28,7 @@ import javax.persistence.Version; ...@@ -28,7 +28,7 @@ import javax.persistence.Version;
@Table(name = "groups") @Table(name = "groups")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"), @NamedQuery(name = "PlaceGroup.findAll", query = "SELECT p FROM PlaceGroup p"),
@NamedQuery(name = "PlaceGroup.findById", query = "SELECT p FROM PlaceGroup p WHERE p.id = :id"),
@NamedQuery(name = "PlaceGroup.findByCreated", query = "SELECT p FROM PlaceGroup p WHERE p.created = :created"), @NamedQuery(name = "PlaceGroup.findByCreated", query = "SELECT p FROM PlaceGroup p WHERE p.created = :created"),
@NamedQuery(name = "PlaceGroup.findByEdited", query = "SELECT p FROM PlaceGroup p WHERE p.edited = :edited"), @NamedQuery(name = "PlaceGroup.findByEdited", query = "SELECT p FROM PlaceGroup p WHERE p.edited = :edited"),
@NamedQuery(name = "PlaceGroup.findByCode", query = "SELECT p FROM PlaceGroup p WHERE p.code = :code"), @NamedQuery(name = "PlaceGroup.findByCode", query = "SELECT p FROM PlaceGroup p WHERE p.code = :code"),
......
...@@ -28,12 +28,12 @@ import javax.persistence.Version; ...@@ -28,12 +28,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "printed_cards") @Table(name = "printed_cards")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"), @NamedQuery(name = "PrintedCard.findAll", query = "SELECT p FROM PrintedCard p"),
@NamedQuery(name = "PrintedCard.findById", query = "SELECT p FROM PrintedCard p WHERE p.id = :id"),
@NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"), @NamedQuery(name = "PrintedCard.findByPrintTime", query = "SELECT p FROM PrintedCard p WHERE p.printTime = :printTime"),
@NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"), @NamedQuery(name = "PrintedCard.findByBarcode", query = "SELECT p FROM PrintedCard p WHERE p.barcode = :barcode"),
@NamedQuery(name = "PrintedCard.findByEnabled", query = "SELECT p FROM PrintedCard p WHERE p.enabled = :enabled"), @NamedQuery(name = "PrintedCard.findByEnabled", query = "SELECT p FROM PrintedCard p WHERE p.enabled = :enabled"),
@NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") }) @NamedQuery(name = "PrintedCard.findByRfidUid", query = "SELECT p FROM PrintedCard p WHERE p.rfidUid = :rfidUid") })
public class PrintedCard implements ModelInterface { public class PrintedCard implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -77,124 +77,124 @@ public class PrintedCard implements ModelInterface { ...@@ -77,124 +77,124 @@ public class PrintedCard implements ModelInterface {
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
public PrintedCard(Integer printedCardsId) { public PrintedCard(Integer printedCardsId) {
this.id = printedCardsId; this.id = printedCardsId;
} }
public PrintedCard(Integer printedCardsId, Date printTime, public PrintedCard(Integer printedCardsId, Date printTime,
boolean cardEnabled) { boolean cardEnabled) {
this.id = printedCardsId; this.id = printedCardsId;
this.printTime = printTime; this.printTime = printTime;
this.enabled = cardEnabled; this.enabled = cardEnabled;
} }
public Date getPrintTime() { public Date getPrintTime() {
return printTime; return printTime;
} }
public void setPrintTime(Date printTime) { public void setPrintTime(Date printTime) {
this.printTime = printTime; this.printTime = printTime;
} }
public String getBarcode() { public String getBarcode() {
return barcode; return barcode;
} }
public void setBarcode(String barcode) { public void setBarcode(String barcode) {
this.barcode = barcode; this.barcode = barcode;
} }
public boolean getEnabled() { public boolean getEnabled() {
return enabled; return enabled;
} }
public void setEnabled(boolean cardEnabled) { public void setEnabled(boolean cardEnabled) {
this.enabled = cardEnabled; this.enabled = cardEnabled;
} }
public String getRfidUid() { public String getRfidUid() {
return rfidUid; return rfidUid;
} }
public void setRfidUid(String rfidUid) { public void setRfidUid(String rfidUid) {
this.rfidUid = rfidUid; this.rfidUid = rfidUid;
} }
public List<ReaderEvent> getReaderEvents() { public List<ReaderEvent> getReaderEvents() {
return readerEvents; return readerEvents;
} }
public void setReaderEvents(List<ReaderEvent> readerEventList) { public void setReaderEvents(List<ReaderEvent> readerEventList) {
this.readerEvents = readerEventList; this.readerEvents = readerEventList;
} }
public Location getCurrentLocation() { public Location getCurrentLocation() {
return currentLocation; return currentLocation;
} }
public void setCurrentLocation(Location currentLocation) { public void setCurrentLocation(Location currentLocation) {
this.currentLocation = currentLocation; this.currentLocation = currentLocation;
} }
public User getUser() { public User getUser() {
return user; return user;
} }
public void setUser(User usersId) { public void setUser(User usersId) {
this.user = usersId; this.user = usersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof PrintedCard)) { if (!(object instanceof PrintedCard)) {
return false; return false;
} }
PrintedCard other = (PrintedCard) object; PrintedCard other = (PrintedCard) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.PrintedCard[id=" + id + "]"; return "fi.insomnia.bortal.model.PrintedCard[id=" + id + "]";
} }
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
public void setTemplate(CardTemplate template) { public void setTemplate(CardTemplate template) {
this.template = template; this.template = template;
} }
public CardTemplate getTemplate() { public CardTemplate getTemplate() {
return template; return template;
} }
} }
...@@ -26,12 +26,12 @@ import javax.persistence.Version; ...@@ -26,12 +26,12 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "products") @Table(name = "products")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"), @NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p"),
@NamedQuery(name = "Product.findById", query = "SELECT p FROM Product p WHERE p.id = :id"),
@NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.name = :name"), @NamedQuery(name = "Product.findByProductName", query = "SELECT p FROM Product p WHERE p.name = :name"),
@NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"), @NamedQuery(name = "Product.findByPrice", query = "SELECT p FROM Product p WHERE p.price = :price"),
@NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"), @NamedQuery(name = "Product.findBySort", query = "SELECT p FROM Product p WHERE p.sort = :sort"),
@NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode") }) @NamedQuery(name = "Product.findByBarcode", query = "SELECT p FROM Product p WHERE p.barcode = :barcode") })
public class Product implements ModelInterface { public class Product implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -73,95 +73,95 @@ public class Product implements ModelInterface { ...@@ -73,95 +73,95 @@ public class Product implements ModelInterface {
} }
public Product(Integer productsId) { public Product(Integer productsId) {
this.id = productsId; this.id = productsId;
} }
public Product(Integer productsId, BigInteger price, int sort) { public Product(Integer productsId, BigInteger price, int sort) {
this.id = productsId; this.id = productsId;
this.price = price; this.price = price;
this.sort = sort; this.sort = sort;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String productName) { public void setName(String productName) {
this.name = productName; this.name = productName;
} }
public BigInteger getPrice() { public BigInteger getPrice() {
return price; return price;
} }
public void setPrice(BigInteger price) { public void setPrice(BigInteger price) {
this.price = price; this.price = price;
} }
public int getSort() { public int getSort() {
return sort; return sort;
} }
public void setSort(int sort) { public void setSort(int sort) {
this.sort = sort; this.sort = sort;
} }
public String getBarcode() { public String getBarcode() {
return barcode; return barcode;
} }
public void setBarcode(String barcode) { public void setBarcode(String barcode) {
this.barcode = barcode; this.barcode = barcode;
} }
public List<Place> getPlaces() { public List<Place> getPlaces() {
return places; return places;
} }
public void setPlaces(List<Place> placeList) { public void setPlaces(List<Place> placeList) {
this.places = placeList; this.places = placeList;
} }
public List<AccountEvent> getAccountEvents() { public List<AccountEvent> getAccountEvents() {
return accountEvents; return accountEvents;
} }
public void setAccountEvents(List<AccountEvent> accountEventList) { public void setAccountEvents(List<AccountEvent> accountEventList) {
this.accountEvents = accountEventList; this.accountEvents = accountEventList;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Product)) { if (!(object instanceof Product)) {
return false; return false;
} }
Product other = (Product) object; Product other = (Product) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Product[productsId=" + getId() + "]"; return "fi.insomnia.bortal.model.Product[productsId=" + getId() + "]";
} }
/** /**
* @return the foodWaveTemplate * @return the foodWaveTemplate
*/ */
public List<FoodWaveTemplate> getFoodWaveTemplate() { public List<FoodWaveTemplate> getFoodWaveTemplate() {
return foodWaveTemplate; return foodWaveTemplate;
} }
/** /**
...@@ -169,7 +169,7 @@ public class Product implements ModelInterface { ...@@ -169,7 +169,7 @@ public class Product implements ModelInterface {
* the foodWaveTemplate to set * the foodWaveTemplate to set
*/ */
public void setFoodWaveTemplate(List<FoodWaveTemplate> foodWaveTemplate) { public void setFoodWaveTemplate(List<FoodWaveTemplate> foodWaveTemplate) {
this.foodWaveTemplate = foodWaveTemplate; this.foodWaveTemplate = foodWaveTemplate;
} }
/** /**
...@@ -177,7 +177,7 @@ public class Product implements ModelInterface { ...@@ -177,7 +177,7 @@ public class Product implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -186,7 +186,7 @@ public class Product implements ModelInterface { ...@@ -186,7 +186,7 @@ public class Product implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -194,7 +194,7 @@ public class Product implements ModelInterface { ...@@ -194,7 +194,7 @@ public class Product implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -203,14 +203,14 @@ public class Product implements ModelInterface { ...@@ -203,14 +203,14 @@ public class Product implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public void setDiscounts(List<Discount> discounts) { public void setDiscounts(List<Discount> discounts) {
this.discounts = discounts; this.discounts = discounts;
} }
public List<Discount> getDiscounts() { public List<Discount> getDiscounts() {
return discounts; return discounts;
} }
} }
...@@ -24,10 +24,10 @@ import javax.persistence.Version; ...@@ -24,10 +24,10 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "readers") @Table(name = "readers")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"), @NamedQuery(name = "Reader.findAll", query = "SELECT r FROM Reader r"),
@NamedQuery(name = "Reader.findById", query = "SELECT r FROM Reader r WHERE r.id = :id"),
@NamedQuery(name = "Reader.findByIdentification", query = "SELECT r FROM Reader r WHERE r.identification = :identification"), @NamedQuery(name = "Reader.findByIdentification", query = "SELECT r FROM Reader r WHERE r.identification = :identification"),
@NamedQuery(name = "Reader.findByDescription", query = "SELECT r FROM Reader r WHERE r.description = :description") }) @NamedQuery(name = "Reader.findByDescription", query = "SELECT r FROM Reader r WHERE r.description = :description") })
public class Reader implements ModelInterface { public class Reader implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -57,66 +57,66 @@ public class Reader implements ModelInterface { ...@@ -57,66 +57,66 @@ public class Reader implements ModelInterface {
} }
public Reader(Integer readersId) { public Reader(Integer readersId) {
this.id = readersId; this.id = readersId;
} }
public String getIdentification() { public String getIdentification() {
return identification; return identification;
} }
public void setIdentification(String readerId) { public void setIdentification(String readerId) {
this.identification = readerId; this.identification = readerId;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String readerDescription) { public void setDescription(String readerDescription) {
this.description = readerDescription; this.description = readerDescription;
} }
public List<ReaderEvent> getEvents() { public List<ReaderEvent> getEvents() {
return events; return events;
} }
public void setEvents(List<ReaderEvent> readerEventList) { public void setEvents(List<ReaderEvent> readerEventList) {
this.events = readerEventList; this.events = readerEventList;
} }
public Location getLocation() { public Location getLocation() {
return location; return location;
} }
public void setLocation(Location locationsId) { public void setLocation(Location locationsId) {
this.location = locationsId; this.location = locationsId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Reader)) { if (!(object instanceof Reader)) {
return false; return false;
} }
Reader other = (Reader) object; Reader other = (Reader) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Reader[id=" + getId() + "]"; return "fi.insomnia.bortal.model.Reader[id=" + getId() + "]";
} }
/** /**
...@@ -124,7 +124,7 @@ public class Reader implements ModelInterface { ...@@ -124,7 +124,7 @@ public class Reader implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -133,7 +133,7 @@ public class Reader implements ModelInterface { ...@@ -133,7 +133,7 @@ public class Reader implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -141,7 +141,7 @@ public class Reader implements ModelInterface { ...@@ -141,7 +141,7 @@ public class Reader implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -150,6 +150,6 @@ public class Reader implements ModelInterface { ...@@ -150,6 +150,6 @@ public class Reader implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -24,10 +24,10 @@ import javax.persistence.Version; ...@@ -24,10 +24,10 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "reader_events") @Table(name = "reader_events")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"), @NamedQuery(name = "ReaderEvent.findAll", query = "SELECT r FROM ReaderEvent r"),
@NamedQuery(name = "ReaderEvent.findById", query = "SELECT r FROM ReaderEvent r WHERE r.id = :id"),
@NamedQuery(name = "ReaderEvent.findByTime", query = "SELECT r FROM ReaderEvent r WHERE r.time = :time"), @NamedQuery(name = "ReaderEvent.findByTime", query = "SELECT r FROM ReaderEvent r WHERE r.time = :time"),
@NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value") }) @NamedQuery(name = "ReaderEvent.findByValue", query = "SELECT r FROM ReaderEvent r WHERE r.value = :value") })
public class ReaderEvent implements ModelInterface { public class ReaderEvent implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -59,71 +59,71 @@ public class ReaderEvent implements ModelInterface { ...@@ -59,71 +59,71 @@ public class ReaderEvent implements ModelInterface {
} }
public ReaderEvent(Integer readerEventsId) { public ReaderEvent(Integer readerEventsId) {
this.id = readerEventsId; this.id = readerEventsId;
} }
public ReaderEvent(Integer readerEventsId, Date eventTime) { public ReaderEvent(Integer readerEventsId, Date eventTime) {
this.id = readerEventsId; this.id = readerEventsId;
this.time = eventTime; this.time = eventTime;
} }
public Date getTime() { public Date getTime() {
return time; return time;
} }
public void setTime(Date eventTime) { public void setTime(Date eventTime) {
this.time = eventTime; this.time = eventTime;
} }
public String getValue() { public String getValue() {
return value; return value;
} }
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
public PrintedCard getPrintedCard() { public PrintedCard getPrintedCard() {
return printedCard; return printedCard;
} }
public void setPrintedCard(PrintedCard printedCardsId) { public void setPrintedCard(PrintedCard printedCardsId) {
this.printedCard = printedCardsId; this.printedCard = printedCardsId;
} }
public Reader getReader() { public Reader getReader() {
return reader; return reader;
} }
public void setReader(Reader readersId) { public void setReader(Reader readersId) {
this.reader = readersId; this.reader = readersId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof ReaderEvent)) { if (!(object instanceof ReaderEvent)) {
return false; return false;
} }
ReaderEvent other = (ReaderEvent) object; ReaderEvent other = (ReaderEvent) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.ReaderEvent[id=" + getId() + "]"; return "fi.insomnia.bortal.model.ReaderEvent[id=" + getId() + "]";
} }
/** /**
...@@ -131,7 +131,7 @@ public class ReaderEvent implements ModelInterface { ...@@ -131,7 +131,7 @@ public class ReaderEvent implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -140,7 +140,7 @@ public class ReaderEvent implements ModelInterface { ...@@ -140,7 +140,7 @@ public class ReaderEvent implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -148,7 +148,7 @@ public class ReaderEvent implements ModelInterface { ...@@ -148,7 +148,7 @@ public class ReaderEvent implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -157,6 +157,6 @@ public class ReaderEvent implements ModelInterface { ...@@ -157,6 +157,6 @@ public class ReaderEvent implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
} }
...@@ -26,9 +26,9 @@ import javax.persistence.Version; ...@@ -26,9 +26,9 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "roles") @Table(name = "roles")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"), @NamedQuery(name = "Role.findAll", query = "SELECT r FROM Role r"),
@NamedQuery(name = "Role.findById", query = "SELECT r FROM Role r WHERE r.id = :id"),
@NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.name = :name") }) @NamedQuery(name = "Role.findByRoleName", query = "SELECT r FROM Role r WHERE r.name = :name") })
public class Role implements ModelInterface { public class Role implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -73,71 +73,71 @@ public class Role implements ModelInterface { ...@@ -73,71 +73,71 @@ public class Role implements ModelInterface {
} }
public Role(Integer rolesId) { public Role(Integer rolesId) {
this.id = rolesId; this.id = rolesId;
} }
public Role(Integer rolesId, String roleName) { public Role(Integer rolesId, String roleName) {
this.id = rolesId; this.id = rolesId;
this.name = roleName; this.name = roleName;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String roleName) { public void setName(String roleName) {
this.name = roleName; this.name = roleName;
} }
public List<RoleRight> getRoleRights() { public List<RoleRight> getRoleRights() {
return roleRights; return roleRights;
} }
public void setRoleRights(List<RoleRight> roleRightList) { public void setRoleRights(List<RoleRight> roleRightList) {
this.roleRights = roleRightList; this.roleRights = roleRightList;
} }
public CardTemplate getCardTemplate() { public CardTemplate getCardTemplate() {
return cardTemplate; return cardTemplate;
} }
public void setCardTemplate(CardTemplate cardTemplatesId) { public void setCardTemplate(CardTemplate cardTemplatesId) {
this.cardTemplate = cardTemplatesId; this.cardTemplate = cardTemplatesId;
} }
public Event getEvent() { public Event getEvent() {
return event; return event;
} }
public void setEvent(Event eventsId) { public void setEvent(Event eventsId) {
this.event = eventsId; this.event = eventsId;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Role)) { if (!(object instanceof Role)) {
return false; return false;
} }
Role other = (Role) object; Role other = (Role) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Role[id=" + getId() + "]"; return "fi.insomnia.bortal.model.Role[id=" + getId() + "]";
} }
/** /**
...@@ -145,7 +145,7 @@ public class Role implements ModelInterface { ...@@ -145,7 +145,7 @@ public class Role implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -154,7 +154,7 @@ public class Role implements ModelInterface { ...@@ -154,7 +154,7 @@ public class Role implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -162,7 +162,7 @@ public class Role implements ModelInterface { ...@@ -162,7 +162,7 @@ public class Role implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -171,38 +171,38 @@ public class Role implements ModelInterface { ...@@ -171,38 +171,38 @@ public class Role implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
public void setUsers(List<User> users) { public void setUsers(List<User> users) {
this.users = users; this.users = users;
} }
public List<User> getUsers() { public List<User> getUsers() {
return users; return users;
} }
public void setDiscounts(List<Discount> discounts) { public void setDiscounts(List<Discount> discounts) {
this.discounts = discounts; this.discounts = discounts;
} }
public List<Discount> getDiscounts() { public List<Discount> getDiscounts() {
return discounts; return discounts;
} }
public void setParents(List<Role> parents) { public void setParents(List<Role> parents) {
this.parents = parents; this.parents = parents;
} }
public List<Role> getParents() { public List<Role> getParents() {
return parents; return parents;
} }
public void setChildren(List<Role> children) { public void setChildren(List<Role> children) {
this.children = children; this.children = children;
} }
public List<Role> getChildren() { public List<Role> getChildren() {
return children; return children;
} }
} }
...@@ -22,7 +22,7 @@ import javax.persistence.Version; ...@@ -22,7 +22,7 @@ import javax.persistence.Version;
@Table(name = "role_rights") @Table(name = "role_rights")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"), @NamedQuery(name = "RoleRight.findAll", query = "SELECT r FROM RoleRight r"),
@NamedQuery(name = "RoleRight.findById", query = "SELECT r FROM RoleRight r WHERE r.id = :id"),
@NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"), @NamedQuery(name = "RoleRight.findByRead", query = "SELECT r FROM RoleRight r WHERE r.read = :read"),
@NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write"), @NamedQuery(name = "RoleRight.findByWrite", query = "SELECT r FROM RoleRight r WHERE r.write = :write"),
@NamedQuery(name = "RoleRight.findByExecute", query = "SELECT r FROM RoleRight r WHERE r.execute = :execute") }) @NamedQuery(name = "RoleRight.findByExecute", query = "SELECT r FROM RoleRight r WHERE r.execute = :execute") })
......
...@@ -21,11 +21,11 @@ import javax.persistence.Version; ...@@ -21,11 +21,11 @@ import javax.persistence.Version;
@Entity @Entity
@Table(name = "user_images") @Table(name = "user_images")
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"), @NamedQuery(name = "UserImage.findAll", query = "SELECT u FROM UserImage u"),
@NamedQuery(name = "UserImage.findById", query = "SELECT u FROM UserImage u WHERE u.id = :id"),
@NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"), @NamedQuery(name = "UserImage.findByName", query = "SELECT u FROM UserImage u WHERE u.name = :name"),
@NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"), @NamedQuery(name = "UserImage.findByDescription", query = "SELECT u FROM UserImage u WHERE u.description = :description"),
@NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType") }) @NamedQuery(name = "UserImage.findByMimeType", query = "SELECT u FROM UserImage u WHERE u.mimeType = :mimeType") })
public class UserImage implements ModelInterface { public class UserImage implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -59,66 +59,66 @@ public class UserImage implements ModelInterface { ...@@ -59,66 +59,66 @@ public class UserImage implements ModelInterface {
} }
public UserImage(Integer userImagesId) { public UserImage(Integer userImagesId) {
this.id = userImagesId; this.id = userImagesId;
} }
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getDescription() { public String getDescription() {
return description; return description;
} }
public void setDescription(String description) { public void setDescription(String description) {
this.description = description; this.description = description;
} }
public String getMimeType() { public String getMimeType() {
return mimeType; return mimeType;
} }
public void setMimeType(String mimeType) { public void setMimeType(String mimeType) {
this.mimeType = mimeType; this.mimeType = mimeType;
} }
public byte[] getImageData() { public byte[] getImageData() {
return imageData; return imageData;
} }
public void setImageData(byte[] imageData) { public void setImageData(byte[] imageData) {
this.imageData = imageData; this.imageData = imageData;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0); hash += (getId() != null ? getId().hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof UserImage)) { if (!(object instanceof UserImage)) {
return false; return false;
} }
UserImage other = (UserImage) object; UserImage other = (UserImage) object;
if ((this.getId() == null && other.getId() != null) if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) { || (this.getId() != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.UserImage[id=" + getId() + "]"; return "fi.insomnia.bortal.model.UserImage[id=" + getId() + "]";
} }
/** /**
...@@ -126,7 +126,7 @@ public class UserImage implements ModelInterface { ...@@ -126,7 +126,7 @@ public class UserImage implements ModelInterface {
*/ */
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
/** /**
...@@ -135,7 +135,7 @@ public class UserImage implements ModelInterface { ...@@ -135,7 +135,7 @@ public class UserImage implements ModelInterface {
*/ */
@Override @Override
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/** /**
...@@ -143,7 +143,7 @@ public class UserImage implements ModelInterface { ...@@ -143,7 +143,7 @@ public class UserImage implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -152,14 +152,14 @@ public class UserImage implements ModelInterface { ...@@ -152,14 +152,14 @@ public class UserImage implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
/** /**
* @return the user * @return the user
*/ */
public User getUser() { public User getUser() {
return user; return user;
} }
/** /**
...@@ -167,6 +167,6 @@ public class UserImage implements ModelInterface { ...@@ -167,6 +167,6 @@ public class UserImage implements ModelInterface {
* the user to set * the user to set
*/ */
public void setUser(User user) { public void setUser(User user) {
this.user = user; this.user = user;
} }
} }
...@@ -24,12 +24,12 @@ import javax.persistence.Version; ...@@ -24,12 +24,12 @@ import javax.persistence.Version;
*/ */
@Entity @Entity
@Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = { @Table(name = "votes", uniqueConstraints = { @UniqueConstraint(columnNames = {
"entries_id", "users_id" }) }) "entries_id", "users_id" }) })
@NamedQueries( { @NamedQueries( {
@NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"), @NamedQuery(name = "Vote.findAll", query = "SELECT v FROM Vote v"),
@NamedQuery(name = "Vote.findById", query = "SELECT v FROM Vote v WHERE v.id = :id"),
@NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"), @NamedQuery(name = "Vote.findByScore", query = "SELECT v FROM Vote v WHERE v.score = :score"),
@NamedQuery(name = "Vote.findByTime", query = "SELECT v FROM Vote v WHERE v.time = :time") }) @NamedQuery(name = "Vote.findByTime", query = "SELECT v FROM Vote v WHERE v.time = :time") })
public class Vote implements ModelInterface { public class Vote implements ModelInterface {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -55,64 +55,64 @@ public class Vote implements ModelInterface { ...@@ -55,64 +55,64 @@ public class Vote implements ModelInterface {
} }
public Vote(Integer votesId) { public Vote(Integer votesId) {
this.id = votesId; this.id = votesId;
} }
public Vote(Integer votesId, Date voteTime) { public Vote(Integer votesId, Date voteTime) {
this.id = votesId; this.id = votesId;
this.time = voteTime; this.time = voteTime;
} }
@Override @Override
public Integer getId() { public Integer getId() {
return id; return id;
} }
@Override @Override
public void setId(Integer votesId) { public void setId(Integer votesId) {
this.id = votesId; this.id = votesId;
} }
public Integer getScore() { public Integer getScore() {
return score; return score;
} }
public void setScore(Integer score) { public void setScore(Integer score) {
this.score = score; this.score = score;
} }
public Date getTime() { public Date getTime() {
return time; return time;
} }
public void setTime(Date voteTime) { public void setTime(Date voteTime) {
this.time = voteTime; this.time = voteTime;
} }
@Override @Override
public int hashCode() { public int hashCode() {
int hash = 0; int hash = 0;
hash += (id != null ? id.hashCode() : 0); hash += (id != null ? id.hashCode() : 0);
return hash; return hash;
} }
@Override @Override
public boolean equals(Object object) { public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are // TODO: Warning - this method won't work in the case the id fields are
// not set // not set
if (!(object instanceof Vote)) { if (!(object instanceof Vote)) {
return false; return false;
} }
Vote other = (Vote) object; Vote other = (Vote) object;
if ((this.id == null && other.id != null) if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) { || (this.id != null && !this.id.equals(other.id))) {
return false; return false;
} }
return true; return true;
} }
@Override @Override
public String toString() { public String toString() {
return "fi.insomnia.bortal.model.Vote[id=" + id + "]"; return "fi.insomnia.bortal.model.Vote[id=" + id + "]";
} }
/** /**
...@@ -120,7 +120,7 @@ public class Vote implements ModelInterface { ...@@ -120,7 +120,7 @@ public class Vote implements ModelInterface {
*/ */
@Override @Override
public int getJpaVersionField() { public int getJpaVersionField() {
return jpaVersionField; return jpaVersionField;
} }
/** /**
...@@ -129,14 +129,14 @@ public class Vote implements ModelInterface { ...@@ -129,14 +129,14 @@ public class Vote implements ModelInterface {
*/ */
@Override @Override
public void setJpaVersionField(int jpaVersionField) { public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField; this.jpaVersionField = jpaVersionField;
} }
/** /**
* @return the compoEntry * @return the compoEntry
*/ */
public CompoEntry getCompoEntry() { public CompoEntry getCompoEntry() {
return compoEntry; return compoEntry;
} }
/** /**
...@@ -144,14 +144,14 @@ public class Vote implements ModelInterface { ...@@ -144,14 +144,14 @@ public class Vote implements ModelInterface {
* the compoEntry to set * the compoEntry to set
*/ */
public void setCompoEntry(CompoEntry compoEntry) { public void setCompoEntry(CompoEntry compoEntry) {
this.compoEntry = compoEntry; this.compoEntry = compoEntry;
} }
/** /**
* @return the voter * @return the voter
*/ */
public User getVoter() { public User getVoter() {
return voter; return voter;
} }
/** /**
...@@ -159,6 +159,6 @@ public class Vote implements ModelInterface { ...@@ -159,6 +159,6 @@ public class Vote implements ModelInterface {
* the voter to set * the voter to set
*/ */
public void setVoter(User voter) { public void setVoter(User voter) {
this.voter = voter; this.voter = voter;
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!