finder methods

Discussions

EJB programming & troubleshooting: finder methods

  1. finder methods (2 messages)

    Hi,
    In my bean implementations I have to extract certain fields from finder methods to put them in to ejb-ql's (I want to use CMP). eg;

    findByProductDefinitionAndRetrievalDate( ProductDefinition productDefinition, Calendar retrievalDate )

    in this finder I have to extract atributes using getters.

    Is it posible to do this in ejb-ql or do I have to make my ejb's BMP.


    Thanks,
    Gavin

    Threaded Messages (2)

  2. finder methods[ Go to top ]

    What do you mean by "in this finder I have to extract atributes using getters."?

    If you just want to use CMP and write a finder method that accepts the two specified parameters, go ahead and write it. You ejb-ql would look something like:

    Select Object(o) from table as o where productDefinition = ?1 and retrievalDate = ?2

  3. finder methods[ Go to top ]

    Hi,
       The problem is the productDefinition is not the coresponding field in the DB and retrivalDate is a clender class and that has to be converted in to a TimeStamp for the quesry. I hope you understand...