Voce deve criar uma classe que sera sua PK, no seu bean declare um atributo do tipo desta classe.
Exemplo:
import java.io.Serializable;
public class OrderPk implements Serializable {
public Long pk;
public Long personPk;
public OrderPk() {
}
public OrderPk(Long pk, Long personPk) {
this.pk = pk;
this.personPk = personPk;
}
public int hashCode() {
return this.toString().hashCode();
}
public boolean equals(Object other) {
OrderPk otherPk = (OrderPk)other;
return otherPk.pk.equals(this.pk) && otherPk.personPk.equals(this.personPk);
}
public String toString() {
return "" + this.pk + this.personPk;
}
}
Ary Junior <[EMAIL PROTECTED]> escreveu:
Ol�... gostaria de saber como implementar um EntityBean q possua como chave-prim�ria dois dos seus campos... como declarar isto no DeploymentDescriptor e como utilizar os m�todos findByPrimaryKey... tudo isso no JBoss 3.0.0...Muito obrigado...[]'s Ary Junior______________________________________ Inflex - installed on mailserver for domain @valoriza.com.br Queries to: [EMAIL PROTECTED]
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas f�ceis de usar, espa�o de sobra e acess�rios.
