Pessoal, tenho as seguintes classes :
public class Tabproc implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
protected TabprocPK tabprocPK;
getter's e setter's
************************
@Embeddable
public class TabprocPK implements Serializable {
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 8)
@Column(nullable = false, length = 8)
private String codproc;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 8)
@Column(name = "cod_int", nullable = false, length = 8)
private String codInt;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 5)
@Column(nullable = false, length = 5)
private String codtab;
getter's e setter's
Gostaria de usar o set no valores da minha classe TabprocPK assim :
public void incluiprocedimento() {
Cadguia guia = new Cadguia();
guia.setCodguia(1);
Integer vid = 0;
for (Itensguia met:Itensguias) {
itemguia.add(new Itensguia(1,met.getId(),met.getTabproc(),guia));
vid = met.getId();
}
Tabproc taproc = new Tabproc();
// taproc.getTabprocPK().setCodproc(getCodproced()); ***tentei fazer assim mas da erro de nullpoint
taproc.setDescricao(getDescproced());
itemguia.add(new Itensguia(1,vid+1,taproc,guia));
Itensguias = itemguia;
}
Alguem pode me ajudar ???