Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

EJB Query Language

Posted on 2004-08-26
5
Medium Priority
?
233 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
[X]
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
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 100 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 100 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
A solution for Fortify Path Manipulation.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

688 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