Annotation Type KeyField
-
@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface KeyField
Identifies a Metapath expression referencing a value that is used in generating a key as part of aIsUnique
,Index
, orIndexHasKey
constraint annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
pattern
Retrieve an optional pattern to use to retrieve the value.String
remarks
Any remarks about the key field, encoded as an escaped Markdown string.String
target
An optional metapath that points to the target flag or field value that the key applies to.
-
-
-
Element Detail
-
target
@NonNull String target
An optional metapath that points to the target flag or field value that the key applies to. If omitted the target will be ".", which means the target is the value of theBoundFlag
,BoundField
orMetaschemaFieldValue
annotation the constraint appears on. In the prior case, this annotation may only appear on aBoundField
if the field has no flags, which results in aBoundField
annotation on a field instance with a scalar, data type value.- Returns:
- the target metapath
- Default:
- "."
-
-
-
pattern
@NonNull String pattern
Retrieve an optional pattern to use to retrieve the value. If non-null
, the first capturing group is used to retrieve the value. This must be a pattern that can compile usingPattern.compile(String)
.- Returns:
- a pattern string or an empty string if no pattern is provided
- Default:
- ""
-
-