Solved

EJB Query Language

Posted on 2004-08-26
5
214 Views
Last Modified: 2013-11-24
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.
0
Comment
Question by:sangeetha
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 25 total points
ID: 11901439
SELECT SUM( job.totalSale )
FROM Customer AS c, IN( c.jobs ) AS job
WHERE c = ?1

should return a double...
0
 
LVL 2

Author Comment

by:sangeetha
ID: 11901516
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
 
LVL 4

Assisted Solution

by:DaveyEss
DaveyEss earned 25 total points
ID: 11903278
Should it be java.lang.Double rather than java.util.Double
0
 
LVL 4

Expert Comment

by:DaveyEss
ID: 11903291
Sorry, pressed "Submit" too quickly.

EJB-QL does not restrict you from only returning collections.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 11903321
>  Should it be java.lang.Double rather than java.util.Double

That is a very good point!!  Well spotted :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
firstChar challenge 13 107
Python Assistance 7 72
solarwind tftp server 2 44
JList custom Cell Renderer refresh 15 53
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now