EJB Query Language

How can i return Double from EJB QL in ejb.finder method.

Can we only return Collections?

I am trying to selelct sum... Query.

Thanks.
LVL 2
sangeethaAsked:
Who is Participating?
 
TimYatesConnect With a Mentor Commented:
SELECT SUM( job.totalSale )
FROM Customer AS c, IN( c.jobs ) AS job
WHERE c = ?1

should return a double...
0
 
sangeethaAuthor Commented:
yes, i did the Query part....can we do line this ?

@ejb.finder signature = "java.util.Double findByPeriode(java.util.Date from, java.util.Date to, java.lang.Integer event, java.lang.Integer coWorker)"

I am not able to return Double from the Query.
0
 
DaveyEssConnect With a Mentor Commented:
Should it be java.lang.Double rather than java.util.Double
0
 
DaveyEssCommented:
Sorry, pressed "Submit" too quickly.

EJB-QL does not restrict you from only returning collections.
0
 
TimYatesCommented:
>  Should it be java.lang.Double rather than java.util.Double

That is a very good point!!  Well spotted :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.