- All Superinterfaces:
CommonOptions
- All Known Implementing Classes:
AttributeOptionsImpl
Options for attributes.
- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of annotations.
Annotations start with an @.Gets the attribute this option-set belongs to.Gets the default value if [DEFAULT value] given.
The returned type corresponds to the DataType of the Attribute.Gets the initial value if [INIT value] given.booleanReturns whether this is the object id holding the context.booleanReturns whether only digits are allowed as input.
Applies only to strings.booleanReturns whether this is a unique domain key (or part of it).booleanisHidden()Returns whether the attribute is not declared in the interface.booleanReturns whether the attribute becomes part of the normtext.booleanReturns whether the attribute should be skipped in snapshot and copy operations.booleanReturns whether this is an unsigned numeric field.booleanisUTC()Returns whether this is a UTC timestamp.booleanReturns whether to use a dedicated timezone.
If set, the PDO must provide a method to configure the timezone for the given attribute of the form:Methods inherited from interface org.tentackle.model.CommonOptions
getAccessScope, getBindOptions, getComment, getStereotypes, isAutoSelect, isBindable, isFromSuper, isLowerCase, isMapNull, isMaxCol, isMute, isNoConstant, isNoDeclare, isNoMethod, isReadOnly, isTrimRead, isTrimWrite, isUpperCase, isWriteOnly, validate
-
Method Details
-
getAttribute
Attribute getAttribute()Gets the attribute this option-set belongs to.- Returns:
- the entity
-
getAnnotations
Gets the list of annotations.
Annotations start with an @. By default, they are applied to the getters of the interfaces only. However, the at-sign may be followed by one or two modifiers that changes the code generation:=: annotate setter only.+: annotate setter and getter.~: annotation is hidden, i.e. applied to the implementations instead of the interfaces.
@=~MyAnnowill be applied to the implementation of the setter only.- Returns:
- the annotations
-
getDefaultValue
Object getDefaultValue()Gets the default value if [DEFAULT value] given.
The returned type corresponds to the DataType of the Attribute.- Returns:
- the defaultValue
-
getInitialValue
String getInitialValue()Gets the initial value if [INIT value] given.- Returns:
- the string to initialize the declaration with
-
isContextId
boolean isContextId()Returns whether this is the object id holding the context.- Returns:
- true if context id
-
isDomainKey
boolean isDomainKey()Returns whether this is a unique domain key (or part of it).- Returns:
- true if domain key
-
isUTC
boolean isUTC()Returns whether this is a UTC timestamp.- Returns:
- true if UTC
-
isWithTimezone
boolean isWithTimezone()Returns whether to use a dedicated timezone.
If set, the PDO must provide a method to configure the timezone for the given attribute of the form:Calendar get<attribute-name>TimezoneConfig(); Example: Calendar getPrintedTimezoneConfig();
- Returns:
- true if with timezone
-
isUnsigned
boolean isUnsigned()Returns whether this is an unsigned numeric field.- Returns:
- true if unsigned
-
isDigitsOnly
boolean isDigitsOnly()Returns whether only digits are allowed as input.
Applies only to strings. Number types provide their own rules.- Returns:
- true if allow only digits
-
isHidden
boolean isHidden()Returns whether the attribute is not declared in the interface.- Returns:
- true if implemented only, no public interface definition
-
isShallow
boolean isShallow()Returns whether the attribute should be skipped in snapshot and copy operations.- Returns:
- true if skip this attribute, false to include (default)
-
isPartOfNormText
boolean isPartOfNormText()Returns whether the attribute becomes part of the normtext.- Returns:
- true if add to normtext
-