• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two more mock questions

 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, folks, it IS time to be getting back to work toward the *real* exam.
Here are two little EJBQL questions.
The *real* exam will tell you how many answers are correct, but since we want to make things a little more challenging, we won't tell you.
================================
1) Which is a valid EJBQL query? (check all that apply, at least one is correct)
A) SELECT OBJECT(o)
FROM Order o
B) SELECT OBJECT(o)
FROM Order o
WHERE o < 100
C) SELECT o.order
FROM Customer customer
D) SELECT DISTINCT OBJECT(o)
FROM Order o
WHERE o.lineItems IS NOT EMPTY
E) SELECT c.customer
FROM Customer AS c
F) SELECT OBJECT(o)
FROM Customer AS foo, IN(foo.things)

=====================
2) Which statement (or statements) about EJBQL is correct? (check all that apply, at least one is correct)
A) The FROM clause is required
B) The WHERE clause is required
C) Duplicate values may be returned from an EJBQL query
D) You may define EJBQL for the implementation of your home business methods.
E) If a query is for a finder method, the result of the finder MUST be the bean's local interface.
Have fun,
Kathy
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kathy, these are my answers;
Q1.
A. Correct (easy)
B. Incorrect (comparing a domain to a number?)
C. Incorrect ("0" not mentioned in FROM clause)
D. Correct
E. Correct
F. Incorrect ("o" not mentioned in FROM clause).
Q2.
A. TRUE
B. FALSE (WHERE is optional).
C. TRUE
D. FALSE (unless you mean that home methods using EJBSelect counts).
E. FALSE (can be remote as well)
Regards,
Ray Gill - SCJP, SCWCD
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic