Package com.googlecode.objectify
Class NotFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.googlecode.objectify.NotFoundException
-
- All Implemented Interfaces:
Serializable
public class NotFoundException extends RuntimeException
Exception thrown when a fetch for something could not be found. This is associated with the getSafe() and keySafe() methods on Ref; if the item being sought in the Ref couldn't be found, this will be thrown.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NotFoundException()
Thrown when there is no key context (eg, query.first() on an empty result set)NotFoundException(Key<?> key)
Thrown when we at least know what we are looking for!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Key<?>
getKey()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NotFoundException
public NotFoundException()
Thrown when there is no key context (eg, query.first() on an empty result set)
-
NotFoundException
public NotFoundException(Key<?> key)
Thrown when we at least know what we are looking for!
-
-
Method Detail
-
getKey
public Key<?> getKey()
- Returns:
- the key we are looking for, if known
-
-