Package io.axoniq.dataprotection.api
Annotation Type DataSubjectId
-
@Retention(RUNTIME) @Target({ANNOTATION_TYPE,FIELD}) @Repeatable(DataSubjectIdContainer.class) public @interface DataSubjectId
Field annotation that marks the field as containing an identifier of the key to be used when encrypting personal data fields of this class. It can also be used as a meta-annotation on some other application-specific annotation.Multiple annotations of this type may be present on the same field, but they should have different group attributes.
For use in Scala programs, there is a
dataSubjectIdtype alias for this annotation, defined in the package object of the api package. This alias has thescala.annotation.meta.fieldmeta-annotation which allows it to be directly used on Scala class parameters, including case classes.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringgroupGet the name of the group of personal data fields that field identifies the key for.StringprefixGet the prefix used when constructing key ids from the field value.ScopescopeGet theScopeof the annotation.
-
-
-
Element Detail
-
group
String group
Get the name of the group of personal data fields that field identifies the key for. This is useful if multiple keys are used on a single class. The group links key identifier to fields, since thePersonalDataannotation has this same field. If multiple annotations of this type occur in the same class, all group attributes must be unique.Optional. If left empty this defaults to the default group, identified by the empty string.
- Returns:
- the group
- Default:
- ""
-
-
-
prefix
String prefix
Get the prefix used when constructing key ids from the field value. The effective key id will be prefix + value.Optional. If left empty this defaults to the empty string.
- Returns:
- the prefix
- Default:
- ""
-
-