package com.mcm.ejb.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.SequenceGenerator; import javax.persistence.Table; /** * @author MCM */ @Entity @Table(name="tProductionSettings") public class ProductionSettings implements Serializable { // Member fields. private Long mId; private StoredFile mLogo; private String mLogoLinkUrl; // Accessor methods and persistence annotations. @Id @SequenceGenerator(name="ProductionSettingsSeqGen", sequenceName="seq_ProductionSettings_id") @GeneratedValue(strategy=GenerationType.SEQUENCE) public Long getId() { return mId; } public void setId(Long id) { mId = id; } @ManyToOne @Column(nullable=false) public StoredFile getLogo() { return mLogo; } public void setLogo(StoredFile logo) { mLogo = logo; } public String getLogoLinkUrl() { return mLogoLinkUrl; } public void setLogoLinkUrl(String logoLinkUrl) { mLogoLinkUrl = logoLinkUrl; } // Other member methods. public int hashCode() { return (getId() == null) ? -1 : getId().intValue(); } public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof ProductionSettings)) { return false; } ProductionSettings lOther = (ProductionSettings) object; return getId().equals(lOther.getId()); } public String toString() { return "com.mcm.ejb.entity.ProductionSettings[id=" + getId() + "]"; } }