Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

EJB Query Language

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

789 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