Class LoadResult<T>

java.lang.Object
com.googlecode.objectify.LoadResult<T>
All Implemented Interfaces:
Result<T>

public class LoadResult<T> extends Object implements Result<T>

Enhances the basic Resultinvalid input: '<'?> with some additional methods useful when loading data.

Author:
Jeff Schnitzer invalid input: '<'[email protected]>
  • Constructor Details

    • LoadResult

      public LoadResult(Key<T> key, Result<T> result)
  • Method Details

    • now

      public T now()
      Obtain the loaded value now.
      Specified by:
      now in interface Result<T>
      Returns:
      the computed result
    • safe

      public final T safe() throws NotFoundException
      Like now(), but throws NotFoundException instead of returning null.
      Throws:
      NotFoundException - if the loaded value was not found