hi all, iam using oracle database which has a tables where we can find a single record using three primary key fields,so iwould like to know how to implement this in bmp, i have written a class accounPk - which has three variables, help is appreciated. san
Marcos Maia
Ranch Hand
Joined: Jan 06, 2001
Posts: 973
posted
0
Hi I�ve never done with a triple pk but I�ve done with a double one, also I�m using WL6.1 and ejb20, here goes an example, I think it�ll help you. regards. <code> package br.com.mmaia.ejb20.assucena; public class MedidorPK implements java.io.Serializable { public String nome_empresa; public String numero_medidor; private int hashCode = -1; public MedidorPK() {} public MedidorPK(String nome_empresa, String numero_medidor) { this.nome_empresa = nome_empresa; this.numero_medidor = numero_medidor; } public boolean equals(Object objeto_comparado) { if (objeto_comparado == this) return true; if (!(objeto_comparado instanceof MedidorPK)) return false;