org.skyscreamer.yoga.annotations
Annotation Type ExtraField


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface ExtraField

ExtraField is used to identify a method in an entity configuration that extends the returned fields for an entity.

The field name is specified by the annotation's value. If a parameter is passed to the method it should be an object of the class supported by the configuration.

Example:

      public class UserConfiguration extends YogaEntityConfiguration {
          @Resource private MyService myService;

          public Class getEntityClass() { return User.class; }

          @ExtraField("recommendedAlbums")
          public List getRecommendedAlbums(User user) {
              myService.getRecommendedAlbums(user);
          }
      }
 

See Also:
YogaEntityConfiguration

Required Element Summary
 String value
           
 

Element Detail

value

public abstract String value


Copyright © 2013. All Rights Reserved.