Commit c10849e0 by Juho Juopperi

model fixes

1 parent 34ad9a2c
......@@ -28,15 +28,17 @@ import javax.persistence.Version;
@Entity
@Table(name = "bills")
@NamedQueries( {
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
@NamedQuery(name = "Bill.findByBillsId", query = "SELECT b FROM Bill b WHERE id = :id"),
@NamedQuery(name = "Bill.findByDueDate", query = "SELECT b FROM Bill b WHERE b.dueDate = :dueDate"),
@NamedQuery(name = "Bill.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
@NamedQuery(name = "Bill.findAll", query = "SELECT b FROM Bill b"),
// @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.findByPaidDate", query = "SELECT b FROM Bill b WHERE b.paidDate = :paidDate"),
@NamedQuery(name = "Bill.findByReferenceNumber", query = "SELECT b FROM Bill b WHERE b.referenceNumber = :referenceNumber"),
@NamedQuery(name = "Bill.findByNotes", query = "SELECT b FROM Bill b WHERE b.notes = :notes") })
public class Bill implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "bills_id", nullable = false)
private Integer id;
......@@ -68,12 +70,12 @@ public class Bill implements ModelInterface {
@Override
public Integer getId() {
return id;
return id;
}
@Override
public void setId(Integer id) {
this.id = id;
this.id = id;
}
@Version
......@@ -84,99 +86,99 @@ public class Bill implements ModelInterface {
}
public Bill(Integer billsId) {
this.id = billsId;
this.id = billsId;
}
public Date getDueDate() {
return dueDate;
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
this.dueDate = dueDate;
}
public Date getPaidDate() {
return paidDate;
return paidDate;
}
public void setPaidDate(Date paidDate) {
this.paidDate = paidDate;
this.paidDate = paidDate;
}
public String getReferenceNumber() {
return referenceNumber;
return referenceNumber;
}
public void setReferenceNumber(String referenceNumber) {
this.referenceNumber = referenceNumber;
this.referenceNumber = referenceNumber;
}
public String getNotes() {
return notes;
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
this.notes = notes;
}
public List<BillLine> getBillLines() {
return billLines;
return billLines;
}
public void setBillLines(List<BillLine> billLineList) {
this.billLines = billLineList;
this.billLines = billLineList;
}
public AccountEvent getAccountEvent() {
return accountEvent;
return accountEvent;
}
public void setAccountEvent(AccountEvent accoutEventsId) {
this.accountEvent = accoutEventsId;
this.accountEvent = accoutEventsId;
}
public User getUser() {
return user;
return user;
}
public void setUser(User usersId) {
this.user = usersId;
this.user = usersId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Bill)) {
return false;
}
Bill other = (Bill) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Bill[id=" + id + "]";
return "fi.insomnia.bortal.model.Bill[id=" + id + "]";
}
@Override
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
@Override
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
}
......@@ -28,16 +28,16 @@ import javax.persistence.Version;
@Entity
@Table(name = "compos")
@NamedQueries( {
@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.findByCompoStart", query = "SELECT c FROM Compo c WHERE c.compoStart = :startTime"),
@NamedQuery(name = "Compo.findByVoteStart", query = "SELECT c FROM Compo c WHERE c.voteStart = :voteStart"),
@NamedQuery(name = "Compo.findByVoteEnd", query = "SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"),
@NamedQuery(name = "Compo.findBySubmitStart", query = "SELECT c FROM Compo c WHERE c.submitStart = :submitStart"),
@NamedQuery(name = "Compo.findBySubmitEnd", query = "SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"),
@NamedQuery(name = "Compo.findByHoldVoting", query = "SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting"),
@NamedQuery(name = "Compo.findByDescription", query = "SELECT c FROM Compo c WHERE c.description = :description") })
@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.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.findByVoteEnd", query = "SELECT c FROM Compo c WHERE c.voteEnd = :voteEnd"),
@NamedQuery(name = "Compo.findBySubmitStart", query = "SELECT c FROM Compo c WHERE c.submitStart = :submitStart"),
@NamedQuery(name = "Compo.findBySubmitEnd", query = "SELECT c FROM Compo c WHERE c.submitEnd = :submitEnd"),
@NamedQuery(name = "Compo.findByHoldVoting", query = "SELECT c FROM Compo c WHERE c.holdVoting = :holdVoting"),
@NamedQuery(name = "Compo.findByDescription", query = "SELECT c FROM Compo c WHERE c.description = :description") })
public class Compo implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
......@@ -86,142 +86,142 @@ public class Compo implements ModelInterface {
@Override
public Integer getId() {
return id;
return id;
}
@Override
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public Compo() {
}
public Compo(Integer composId) {
this.id = composId;
this.id = composId;
}
public Compo(Integer composId, String compoName, boolean holdVoting) {
this.id = composId;
this.name = compoName;
this.holdVoting = holdVoting;
this.id = composId;
this.name = compoName;
this.holdVoting = holdVoting;
}
public String getName() {
return name;
return name;
}
public void setName(String compoName) {
this.name = compoName;
this.name = compoName;
}
public Date getStartTime() {
return startTime;
return startTime;
}
public void setStartTime(Date compoStart) {
this.startTime = compoStart;
this.startTime = compoStart;
}
public Date getVoteStart() {
return voteStart;
return voteStart;
}
public void setVoteStart(Date voteStart) {
this.voteStart = voteStart;
this.voteStart = voteStart;
}
public Date getVoteEnd() {
return voteEnd;
return voteEnd;
}
public void setVoteEnd(Date voteEnd) {
this.voteEnd = voteEnd;
this.voteEnd = voteEnd;
}
public Date getSubmitStart() {
return submitStart;
return submitStart;
}
public void setSubmitStart(Date submitStart) {
this.submitStart = submitStart;
this.submitStart = submitStart;
}
public Date getSubmitEnd() {
return submitEnd;
return submitEnd;
}
public void setSubmitEnd(Date submitEnd) {
this.submitEnd = submitEnd;
this.submitEnd = submitEnd;
}
public boolean getHoldVoting() {
return holdVoting;
return holdVoting;
}
public void setHoldVoting(boolean holdVoting) {
this.holdVoting = holdVoting;
this.holdVoting = holdVoting;
}
public List<CompoEntry> getCompoEntries() {
return compoEntries;
return compoEntries;
}
public void setCompoEntries(List<CompoEntry> compoEntryList) {
this.compoEntries = compoEntryList;
this.compoEntries = compoEntryList;
}
public Event getEvent() {
return event;
return event;
}
public void setEvent(Event eventsId) {
this.event = eventsId;
this.event = eventsId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Compo)) {
return false;
}
Compo other = (Compo) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Compo)) {
return false;
}
Compo other = (Compo) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.Compo[id=" + id + "]";
return "fi.insomnia.bortal.model.Compo[id=" + id + "]";
}
@Override
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
@Override
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
public void setDescription(String description) {
this.description = description;
this.description = description;
}
public String getDescription() {
return description;
return description;
}
}
......@@ -26,14 +26,13 @@ import javax.persistence.Version;
@Entity
@Table(name = "entry_files")
@NamedQueries( {
@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.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"),
@NamedQuery(name = "CompoEntryFile.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"),
@NamedQuery(name = "CompoEntryFile.findByHash", query = "SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"),
@NamedQuery(name = "CompoEntryFile.findByComment", query = "SELECT c FROM CompoEntryFile c WHERE c.comment = :comment"),
@NamedQuery(name = "CompoEntryFile.findByUploaded", query = "SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded") })
@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.findByFileName", query = "SELECT c FROM CompoEntryFile c WHERE c.fileName = :fileName"),
@NamedQuery(name = "CompoEntryFile.findByDescription", query = "SELECT c FROM CompoEntryFile c WHERE c.description = :description"),
@NamedQuery(name = "CompoEntryFile.findByHash", query = "SELECT c FROM CompoEntryFile c WHERE c.hash = :hash"),
@NamedQuery(name = "CompoEntryFile.findByUploaded", query = "SELECT c FROM CompoEntryFile c WHERE c.uploaded = :uploaded") })
public class CompoEntryFile implements ModelInterface {
private static final long serialVersionUID = 1L;
@Id
......@@ -70,118 +69,118 @@ public class CompoEntryFile implements ModelInterface {
@Override
public Integer getId() {
return id;
return id;
}
@Override
public void setId(Integer id) {
this.id = id;
this.id = id;
}
public CompoEntryFile() {
}
public CompoEntryFile(Integer entryFilesId) {
this.id = entryFilesId;
this.id = entryFilesId;
}
public CompoEntryFile(Integer entryFilesId, Date uploaded) {
this.id = entryFilesId;
this.uploaded = uploaded;
this.id = entryFilesId;
this.uploaded = uploaded;
}
public String getMimeType() {
return mimeType;
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
this.mimeType = mimeType;
}
public String getFileName() {
return fileName;
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
this.fileName = fileName;
}
public String getDescription() {
return description;
return description;
}
public void setDescription(String description) {
this.description = description;
this.description = description;
}
public String getHash() {
return hash;
return hash;
}
public void setHash(String hash) {
this.hash = hash;
this.hash = hash;
}
public byte[] getFileData() {
return fileData;
return fileData;
}
public void setFileData(byte[] fileData) {
this.fileData = fileData;
this.fileData = fileData;
}
public Date getUploaded() {
return uploaded;
return uploaded;
}
public void setUploaded(Date uploaded) {
this.uploaded = uploaded;
this.uploaded = uploaded;
}
public CompoEntry getEntriesId() {
return entry;
return entry;
}
public void setEntriesId(CompoEntry entriesId) {
this.entry = entriesId;
this.entry = entriesId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryFile)) {
return false;
}
CompoEntryFile other = (CompoEntryFile) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof CompoEntryFile)) {
return false;
}
CompoEntryFile other = (CompoEntryFile) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id
+ "]";
return "fi.insomnia.bortal.model.CompoEntryFile[entryFilesId=" + id
+ "]";
}
@Override
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
@Override
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
}
......@@ -21,11 +21,11 @@ import javax.persistence.Version;
@Entity
@Table(name = "role_rights")
@NamedQueries( {
@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.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.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.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") })
public class RoleRight implements ModelInterface {
private static final long serialVersionUID = 1L;
......@@ -33,13 +33,13 @@ public class RoleRight implements ModelInterface {
@Column(name = "role_rights_id", nullable = false)
private Integer id;
@Column(name = "read", nullable = false)
@Column(name = "read_permission", nullable = false)
private boolean read;
@Column(name = "write", nullable = false)
@Column(name = "write_permission", nullable = false)
private boolean write;
@Column(name = "write", nullable = false)
@Column(name = "execute_permission", nullable = false)
private boolean execute;
@JoinColumn(name = "access_rights_id", referencedColumnName = "access_rights_id")
......@@ -58,72 +58,72 @@ public class RoleRight implements ModelInterface {
}
public RoleRight(Integer roleRights) {
this.id = roleRights;
this.id = roleRights;
}
public RoleRight(Integer roleRights, boolean read, boolean write) {
this.id = roleRights;
this.read = read;
this.write = write;
this.id = roleRights;
this.read = read;
this.write = write;
}
public boolean getRead() {
return read;
return read;
}
public void setRead(boolean read) {
this.read = read;
this.read = read;
}
public boolean getWrite() {
return write;
return write;
}
public void setWrite(boolean write) {
this.write = write;
this.write = write;
}
public AccessRight getAccessRight() {
return accessRight;
return accessRight;
}
public void setAccessRight(AccessRight accessRightsId) {
this.accessRight = accessRightsId;
this.accessRight = accessRightsId;
}
public Role getRole() {
return role;
return role;
}
public void setRole(Role rolesId) {
this.role = rolesId;
this.role = rolesId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
int hash = 0;
hash += (getId() != null ? getId().hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleRight)) {
return false;
}
RoleRight other = (RoleRight) object;
if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof RoleRight)) {
return false;
}
RoleRight other = (RoleRight) object;
if ((this.getId() == null && other.getId() != null)
|| (this.getId() != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "fi.insomnia.bortal.model.RoleRight[roleRights=" + getId() + "]";
return "fi.insomnia.bortal.model.RoleRight[roleRights=" + getId() + "]";
}
/**
......@@ -131,7 +131,7 @@ public class RoleRight implements ModelInterface {
*/
@Override
public Integer getId() {
return id;
return id;
}
/**
......@@ -140,7 +140,7 @@ public class RoleRight implements ModelInterface {
*/
@Override
public void setId(Integer id) {
this.id = id;
this.id = id;
}
/**
......@@ -148,7 +148,7 @@ public class RoleRight implements ModelInterface {
*/
@Override
public int getJpaVersionField() {
return jpaVersionField;
return jpaVersionField;
}
/**
......@@ -157,14 +157,14 @@ public class RoleRight implements ModelInterface {
*/
@Override
public void setJpaVersionField(int jpaVersionField) {
this.jpaVersionField = jpaVersionField;
this.jpaVersionField = jpaVersionField;
}
public void setExecute(boolean execute) {
this.execute = execute;
this.execute = execute;
}
public boolean isExecute() {
return execute;
return execute;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!