All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.jackson.annotation.JsonManagedReference Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote Jakarta Enterprise Beans and Jakarta Messaging, including all dependencies. It is intended for use by those not using maven, maven users should just import the Jakarta Enterprise Beans and Jakarta Messaging BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 35.0.0.Beta1
Show newest version
package com.fasterxml.jackson.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation used to indicate that annotated property is part of
 * two-way linkage between fields; and that its role is "parent" (or "forward") link.
 * Value type (class) of property must have a single compatible property annotated with
 * {@link JsonBackReference}. Linkage is handled such that the property
 * annotated with this annotation is handled normally (serialized normally, no
 * special handling for deserialization); it is the matching back reference
 * that requires special handling
 *

* All references have logical name to allow handling multiple linkages; typical case * would be that where nodes have both parent/child and sibling linkages. If so, * pairs of references should be named differently. * It is an error for a class too have multiple managed references with same name, * even if types pointed are different. *

* Note: only methods and fields can be annotated with this annotation: constructor * arguments should NOT be annotated, as they can not be either managed or back * references. * * @author tatu */ @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotation public @interface JsonManagedReference { /** * Logical have for the reference property pair; used to link managed and * back references. Default name can be used if there is just single * reference pair (for example, node class that just has parent/child linkage, * consisting of one managed reference and matching back reference) */ public String value() default "defaultReference"; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy