Annotation Type Load


@Retention(RUNTIME)
@Target({FIELD,PARAMETER})
public @interface Load

Placed on an entity field of type Ref, this will cause Objectify to fetch that entity when the containing entity is loaded.

If one or more Class values are passed in, these represent load groups. The entity will be fetched only if the load group is activated. The class can be any arbitrary class, and class inheritance is respected.

For example, for a class Foo extends Bar, specifying @Load(Bar.class) will cause a field to load if the Foo.class group is enabled.

Author:
Jeff Schnitzer
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Groups which negate loading.
    Class<?>[]
    Groups which indicate the value should be loaded.
  • Element Details

    • value

      Class<?>[] value
      Groups which indicate the value should be loaded. Empty means "always".
      Default:
      {}
    • unless

      Class<?>[] unless
      Groups which negate loading. In case of conflict with value(), unless() wins.
      Default:
      {}