Solved

EJB Query Language

Posted on 2004-08-26
5
213 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
stringclean challenge 26 56
mapBully challenge 6 89
Python Assistance 7 35
Impossible to extract MSI from new JAVA releases 2 41
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

705 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