dcsimg
EJB: Container Managed Persistence (CMP)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Arun_Seetharam
Posted On:   Thursday, January 3, 2002 08:00 AM

Dear Gurus, My application uses a CMP. What is the most optimal way to check whether a value exists in a particular field of a table?

I guess I can not run a query such as

select field from table where description = "some description";

Can I map this query in CMP EJB somehow? This might return a collection which is of not much interest to me. Bringing the collection, which I dont use into the memory may be bad design. A boolean will do for me. Your thoughts on this would be much appreciated.

Re: EJB: Container Managed Persistence (CMP)

Posted By:   Bozidar_Dangubic  
Posted On:   Thursday, January 3, 2002 09:10 AM

create a method in the interface such as

public boolean valueExists(String description)

implement it in the EJB and you are good to go.
About | Sitemap | Contact