Solved

EJB Query Language

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

617 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