Home » JDO » Query » setUnique(unique) - JDO Query's method

setUnique(unique) - JDO Query's method

void setUnique(
  boolean unique

Specify that only the first result of the query should be returned, rather than a collection. The execute method will return null if the query result size is 0.
unique - if true, only one element is returned
JDO 2.0

This documentation page is derived (with some adjustments) from the JDO 2.2 API
and is available under the terms of the Apache License, v. 2.0.