Package com.onec.annotations
Annotation Interface Attribute
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanShortcut: the String value must be a valid email address.intdoubleMaximum allowed value for a numeric attribute.doubleMinimum allowed value for a numeric attribute.intMinimum length for a String attribute.A regex the String value must fully match.intString[]Former names of this attribute, so the schema upgrader can rename the existing column (keeping its data) instead of adding a fresh empty one.booleanintbooleanMarks a String attribute as sensitive (a credential, API key, password, …).
-
Element Details
-
name
String name- Default:
""
-
displayName
String displayName- Default:
""
-
previousNames
String[] previousNamesFormer names of this attribute, so the schema upgrader can rename the existing column (keeping its data) instead of adding a fresh empty one. List the old field/attribute name as it was written in Java (e.g."phone"after renaming the field tophoneNumber); it is mapped to a column name through the same naming strategy. Keep at least the most recent former name until every deployment has migrated.- Default:
{}
-
length
int length- Default:
255
-
required
boolean required- Default:
false
-
precision
int precision- Default:
15
-
scale
int scale- Default:
2
-
min
double minMinimum allowed value for a numeric attribute.NaN(default) means no bound.- Default:
0.0/0.0
-
max
double maxMaximum allowed value for a numeric attribute.NaN(default) means no bound.- Default:
0.0/0.0
-
minLength
int minLengthMinimum length for a String attribute.0(default) means no minimum. (length()is the max.)- Default:
0
-
pattern
String patternA regex the String value must fully match. Empty (default) means no pattern.- Default:
""
-
email
boolean emailShortcut: the String value must be a valid email address.- Default:
false
-
secret
boolean secretMarks a String attribute as sensitive (a credential, API key, password, …). A secret attribute is encrypted at rest, never returned in the clear by the generic API (read responses carry a "set / not set" sentinel instead of the value), and rendered as a write-only password control in the UI. Only meaningful forStringattributes; requiresonec.security.secret-keyto be configured.- Default:
false
-