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

io.github.wistefan.mapping.annotations.AttributeGetter Maven / Gradle / Ivy

package io.github.wistefan.mapping.annotations;

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

/**
 * Annotation to indicate that a field should be mapped to an NGSI attribute.
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AttributeGetter {

	/**
	 * Type of attribute the field should be mapped to.
	 */
	AttributeType value() default AttributeType.PROPERTY;

	/**
	 * Name of target attribute
	 */
	String targetName();

	/**
	 * In case the entity is used as a relationship, should the field be embedded into
	 * the relationship or is it only relevant for serialization to a full entity?
	 */
	boolean embedProperty() default false;

}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy