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

io.crnk.jpa.annotations.JpaResource Maven / Gradle / Ivy

There is a newer version: 2.6.20180522184741
Show newest version
package io.crnk.jpa.annotations;

import io.crnk.core.resource.annotations.JsonApiResource;

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

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Allows to specify a resource type for an exposed entity. This annotation is
 * optional. By default the resource type is derived from the entity name (e.g.
 * Person => person).
 * 

* The annotation corresponds to the default {@link JsonApiResource} annotation, * but with the additional benefit of reading JPA annotations to detect primary * keys, relationships, etc. without having to define redudant Crnk * annotations. */ @Retention(RUNTIME) @Target(TYPE) public @interface JpaResource { /** * Defines the type of the resource. */ String type(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy