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

com.github.jasminb.jsonapi.annotations.Relationship Maven / Gradle / Ivy

Go to download

JSONAPI-Converter is a library that provides means for integrating with services using JSON API specification.

There is a newer version: 0.14
Show newest version
package com.github.jasminb.jsonapi.annotations;

import com.github.jasminb.jsonapi.RelType;

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

/**
 * Annotation used to configure relationship field in JSON API resources.
 *
 * @author jbegic
 */

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Relationship {
	String value();
	boolean resolve() default false;
	boolean serialise() default true;
	RelType relType() default RelType.SELF;
	
	/**
	 * Resource path, used to generate self link.
	 */
	String path() default "";
	
	/**
	 * Resource path, used to generate related link.
	 */
	String relatedPath() default "";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy