hello! i like to join many of ejb entities to obtain my request with EJBQL but i'm using jdeveloper !!! and i dont knew how to write a request who return a result from two or three entity bean:
import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
//SELECT photo.identification , retouche.contraste FROM Photo AS photo JOIN photo.retouche AS retouche
@Entity
@NamedQuery(name = "Ligne.findAll", query = "select o from Ligne o"),
public class Ligne implements Serializable {
@Column(name="DAT_CR", nullable = false)
private String datCr;
@Id
@Column(nullable = false)
private String nligne;
@Column(nullable = false)
private String type;
@OneToMany(mappedBy = "ligne")
private List<Adsl> adslList;
@ManyToOne
@JoinColumn(name = "NCOMPTE", referencedColumnName = "NCOMPTE")
private Client client;
public Ligne() {
}
public String getDatCr() {
return datCr;
}
public void setDatCr(String datCr) {
this.datCr = datCr;
}
public String getNligne() {
return nligne;
}
public void setNligne(String nligne) {
this.nligne = nligne;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<Adsl> getAdslList() {
return adslList;
}
public void setAdslList(List<Adsl> adslList) {
this.adslList = adslList;
}
public Adsl addAdsl(Adsl adsl) {
getAdslList().add(adsl);
adsl.setLigne(this);
return adsl;
}
public Adsl removeAdsl(Adsl adsl) {
getAdslList().remove(adsl);
adsl.setLigne(null);
return adsl;
}
public Client getClient() {
return client;
}
public void setClient(Client client) {
this.client = client;
}
}
