Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7537095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:45:20+00:00 2026-05-30T06:45:20+00:00

According to the documentation here (under unique results) and here , A JDO default

  • 0

According to the documentation here (under “unique results”) and here, A JDO “default” query result will return a List, and a “unique” specified query returns null if they are empty.

So am I safe to just use .isEmpty() to check that I got rows for a normal query? Likewise for those times that a query is marked “unique”, should I just use == null?

I tested and a empty result does indeed return a List with .size() of 0. So it seems my only danger of a NullPointerException lies with a “unique” query.

What other precautions should I take (if any)? Do I cover my bases acceptably with just those two types of checks? Pretty much looking for some best practice advice, and any potential gotcha’s. I am pretty novice with both Java and JDO/ORM persistence.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:45:21+00:00Added an answer on May 30, 2026 at 6:45 am

    Right way ? A List is a List and that has a Java contract (API). JDO doesn’t change that. Also the JDO spec (and DN docs) define what form of result comes from a query
    http://www.datanucleus.org/products/accessplatform_3_0/jdo/jdoql_result.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to the documentation located here: http://archive.plugins.jquery.com/project/query-object In order to customize $.query 's parameters
Here's the information according to the official documentation : There are four different pairs
According to the documentation, a prepared query provides a significant performance benefit if you're
According to the documentation in VB6 the Mid() function returns a variant, but Mid$()
According the Perl documentation on regexes : By default, the "^" character is guaranteed
According to the documentation , List.contains can throw NullPointerException in this scenario: if the
According to the documentation , socket_read() is supposed to return FALSE when the remote
According to the NHibernate Validator documentation here: http://nhforge.org/wikis/validator/nhibernate-validator-1-0-0-documentation.aspx I should be able to pass
Can anyone discern what I'm doing wrong here? According to the documentation in 1.47
http://babymoments.co/preview/highres%20preview/5_357/ According to the FPDF documentation here: http://www.fpdf.org/en/doc/image.htm You are supposed to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.