@Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) @Documented public @interface Relationship
| Modifier and Type | Required Element and Description |
|---|---|
Class<?> |
resource
The resource class has a relationship to
|
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
includable
If true, the resource may be included
|
String |
joinField
The field of
resource() that the annotated field has a relationship to |
String |
name
The name of the relationship.
|
RelationshipType |
type
By default, relationships are assumed to be "to many", setting to true will treat the relationships as 1:1
|
boolean |
validateReferences
If true, create and updates will validate references
|
public abstract Class<?> resource
public abstract String name
public abstract String joinField
resource() that the annotated field has a relationship topublic abstract boolean validateReferences
public abstract RelationshipType type
Copyright © 2018. All rights reserved.