1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
| package jpa;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity // ***********************************ENTITY
@Table(name = "article", catalog = "artisance", schema = "public")
@NamedQueries({@NamedQuery(name = "Article.findAll", query = "SELECT a FROM Article a"),
@NamedQuery(name = "Article.findByArtIntId", query = "SELECT a FROM Article a WHERE a.artIntId = :artIntId"),
@NamedQuery(name = "Article.findByArtVch...", query = "SELECT a FROM Article a WHERE a.artVch... = :artVch..."),
...
@NamedQuery(name = "Article.findByArtDecCoefnumchutearticlepopup", query = "SELECT a FROM Article a WHERE a.artDecCoefnumchutearticlepopup = :artDecCoefnumchutearticlepopup"),
@NamedQuery(name = "Article.findByBipDecTauxmargeSurheure", query = "SELECT a FROM Article a WHERE a.bipDecTauxmargeSurheure = :bipDecTauxmargeSurheure"),
....
@NamedQuery(name = "Article.findByArtDateCreation", query = "SELECT a FROM Article a WHERE a.artDateCreation = :artDateCreation"),
@NamedQuery(name = "Article.findByArtDateModification", query = "SELECT a FROM Article a WHERE a.artDateModification = :artDateModification")})
public class Article implements Serializable {// ***********************************public class Article
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "article_seq")
@SequenceGenerator(name = "article_seq", sequenceName = "article_art_int_id_seq", allocationSize = 1)
@Basic(optional = false)
@Column(name = "art_int_id")
private Integer artIntId;
// ajout coef chute 18 02 2015
@Basic(optional = false)
@Column(name = "art_dec_coefnumchutearticlepopup")
private BigDecimal artDecCoefnumchutearticlepopup;
// fin ajout
// ajout/modif 09 04 2015 MAP TABLE BILAN (BIP) *******public class Article**********
@Basic(optional = false)
@Column(name = "bip_dec_tauxmarge_surheure")
private BigDecimal bipDecTauxmargeSurheure;
// FIN AJOUT ***********
@Basic(optional = false)
@Column(name = "art_date_creation")
@Temporal(TemporalType.DATE)
private Date artDateCreation;
@Column(name = "art_date_modification")
@Temporal(TemporalType.DATE)
private Date artDateModification;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "artIntId", fetch = FetchType.LAZY)
private Collection<Ldarticle> ldarticleCollection;
@JoinColumn(name = "fam_int_id", referencedColumnName = "fam_int_id")
@ManyToOne(optional = false, fetch = FetchType.LAZY)
private Reffamillearticle famIntId;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "article", fetch = FetchType.LAZY)
private Collection<ArticlecatalogueHasArticle> articlecatalogueHasArticleCollection;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "artIntId", fetch = FetchType.LAZY)
private Collection<Commandearticle> commandearticleCollection;
public Article() {
}
public Article(Integer artIntId) {// ***********************************publicArticle
this.artIntId = artIntId;
}
public Article(Integer artIntId,// ***********************************public Article (Integer artIntId,
String artVch...,
...
BigDecimal artDecCoefnumchutearticlepopup,
BigDecimal bipDecTauxmargeSurheure,
Date artDateCreation) {
this.artIntId = artIntId;
this.artVch... = artVch...
this.artDateCreation = artDateCreation;
this.artDecCoefnumchutearticlepopup = artDecCoefnumchutearticlepopup;
this.BipDecTauxmargeSurheure = BipDecTauxmargeSurheure;
}
public Integer getArtIntId() {
return artIntId;
}
public void setArtIntId(Integer artIntId) {
this.artIntId = artIntId;
}
public String getArtVch...() {
return artVch...;
}
public void setArtVch...(String artVch...) {
this.artVchN... = artVch...;
}
public BigDecimal getArtDecCoefnumchutearticlepopup() {
return artDecCoefnumchutearticlepopup;
}
public void setArtDecCoefnumchutearticlepopup(BigDecimal artDecCoefnumchutearticlepopup) {
this.artDecCoefnumchutearticlepopup = artDecCoefnumchutearticlepopup;
}
// ajout 09 04 2015
public BigDecimal getBiptDecTauxmargeSurheure() {
return bipDecTauxmargeSurheure;
}
public void setBipDecTauxmargeSurheure(BigDecimal bipDecTauxmargeSurheure) {
this.bipDecTauxmargeSurheure = bipDecTauxmargeSurheure;
}
public Date getArtDateCreation() {
return artDateCreation;
}
public void setArtDateCreation(Date artDateCreation) {
this.artDateCreation = artDateCreation;
}
public Date getArtDateModification() {
return artDateModification;
}
public void setArtDateModification(Date artDateModification) {
this.artDateModification = artDateModification;
}
public Collection<Posteconsommablearticle> getPosteconsommablearticleCollection() {
return posteconsommablearticleCollection;
}
public void setPosteconsommablearticleCollection(Collection<Posteconsommablearticle> posteconsommablearticleCollection) {
this.posteconsommablearticleCollection = posteconsommablearticleCollection;
}
public Collection<Ldarticle> getLdarticleCollection() {
return ldarticleCollection;
}
public void setLdarticleCollection(Collection<Ldarticle> ldarticleCollection) {
this.ldarticleCollection = ldarticleCollection;
}
public Collection<ArticlecatalogueHasArticle> getArticlecatalogueHasArticleCollection() {
return articlecatalogueHasArticleCollection;
}
public void setArticlecatalogueHasArticleCollection(Collection<ArticlecatalogueHasArticle> articlecatalogueHasArticleCollection) {
this.articlecatalogueHasArticleCollection = articlecatalogueHasArticleCollection;
}
....
public Collection<Commandearticle> getCommandearticleCollection() {
return commandearticleCollection;
}
public void setCommandearticleCollection(Collection<Commandearticle> commandearticleCollection) {
this.commandearticleCollection = commandearticleCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (artIntId != null ? artIntId.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 Article)) {
return false;
}
Article other = (Article) object;
if ((this.artIntId == null && other.artIntId != null) || (this.artIntId != null && !this.artIntId.equals(other.artIntId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "jpa.Article[artIntId=" + artIntId + "]";
}
} |