Including a finder definition in an EJB such as:
public abstract DataObjPK ejbFindByPrimaryKey (DataObjPK pk);
generates a call in a generated BMP such as
public DataObjPK ejbFindByPrimaryKey(DataObjPK pk)
{
return getDao().findByPrimaryKey(pk);
}
Question: how can the DAOImpl.findByPrimary key method populate the ejb's attributes? It does not have a reference to the ejb. Other calls to DAO methods (load, store, create) all pass a reference to the ejb. It would be nice to have that reference in the finder methods, unless I'm misunderstanding????
If the method is not declared abstract, then the BMP has a call to super, then it calls the DAO. If that strategy is taken, then the super can populate its attributes, but then it has to implement data access, which is supposed to be encapsulated in the DAO. Also, then what is the point of the call to DAOImpl.find if the call to super has already done the work, other than just to return the PK?
Thanks in advance
Pete Fletcher
