Package com.esprow.oapi.repository
Interface OapiFieldRule
public interface OapiFieldRule
A rule allowing to conditionally override the field's attributes or perform validation.
The following attributes and references are supported:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a list of assignment expressions for a message field or state variable.Returns a character encoding if it is other than US-ASCII.shortReturns a fixed length of the field.shortReturns the maximum length of the field.shortReturns the minimum length of the field.Returns an inclusive upper bound of a valid value range.Returns an inclusive lower bound of a valid value range.getName()Returns the name of the rule.Returns one of the possible values of presence (required, optional, forbidden, ignored, constant).Returns a hint on how to generate or render an element in a user interface.getType()Returns a datatype or a codeSet carrying an underlying datatype.Returns an indicator of a field value's uniqueness.getValue()Returns a default or constant value of the field.getWhen()Returns a logic statement defining the condition when the rule applies.voidsetEncoding(String value) Set a character encoding if it is other than US-ASCII.voidsetImplLength(short value) Set a fixed length of the field.voidsetImplMaxLength(short value) Set the maximum length of the field.voidsetImplMinLength(short value) Set the minimum length of the field.voidsetMaxInclusive(String value) Set an inclusive upper bound of a valid value range.voidsetMinInclusive(String value) Set an inclusive lower bound of a valid value range.voidSet the name of the rule.voidsetPresence(Presence value) Set one of the possible values of presence (required, optional, forbidden, ignored, constant).voidsetRendering(String value) Set a hint on how to generate or render an element in a user interface.voidSet a datatype or a codeSet carrying an underlying datatype.voidsetUnique(OapiUnique value) Set an indicator of a field value's uniqueness.voidSet a default or constant value of the field.voidSet a logic statement defining the condition when the rule applies.
-
Method Details
-
getUnique
OapiUnique getUnique()Returns an indicator of a field value's uniqueness.- Returns:
- an indicator of a field value's uniqueness
- See Also:
-
setUnique
Set an indicator of a field value's uniqueness.- Parameters:
value- the new value of the 'Unique' containment reference.- See Also:
-
getAssignments
Returns a list of assignment expressions for a message field or state variable.- Returns:
- a list of assignment expressions for a message field or state variable
-
getWhen
String getWhen()Returns a logic statement defining the condition when the rule applies.- Returns:
- a logic statement defining the condition when the rule applies
- See Also:
-
setWhen
Set a logic statement defining the condition when the rule applies.- Parameters:
value- the new value of the 'When' attribute.- See Also:
-
getEncoding
String getEncoding()Returns a character encoding if it is other than US-ASCII.- Returns:
- a character encoding if it is other than US-ASCII
- See Also:
-
setEncoding
Set a character encoding if it is other than US-ASCII.- Parameters:
value- the new value of the 'Encoding' attribute.- See Also:
-
getImplLength
short getImplLength()Returns a fixed length of the field.- Returns:
- a fixed length of the field
- See Also:
-
setImplLength
void setImplLength(short value) Set a fixed length of the field.- Parameters:
value- the new value of the 'Impl Length' attribute.- See Also:
-
getImplMaxLength
short getImplMaxLength()Returns the maximum length of the field.- Returns:
- the maximum length of the field
- See Also:
-
setImplMaxLength
void setImplMaxLength(short value) Set the maximum length of the field.- Parameters:
value- the new value of the 'Impl Max Length' attribute.- See Also:
-
getImplMinLength
short getImplMinLength()Returns the minimum length of the field.- Returns:
- the minimum length of the field
- See Also:
-
setImplMinLength
void setImplMinLength(short value) Set the minimum length of the field.- Parameters:
value- the new value of the 'Impl Min Length' attribute.- See Also:
-
getMaxInclusive
String getMaxInclusive()Returns an inclusive upper bound of a valid value range.- Returns:
- an inclusive upper bound of a valid value range
- See Also:
-
setMaxInclusive
Set an inclusive upper bound of a valid value range.- Parameters:
value- the new value of the 'Max Inclusive' attribute.- See Also:
-
getMinInclusive
String getMinInclusive()Returns an inclusive lower bound of a valid value range.- Returns:
- an inclusive lower bound of a valid value range
- See Also:
-
setMinInclusive
Set an inclusive lower bound of a valid value range.- Parameters:
value- the new value of the 'Min Inclusive' attribute.- See Also:
-
getName
String getName()Returns the name of the rule.- Returns:
- the name of the rule
- See Also:
-
setName
Set the name of the rule.- Parameters:
value- the new value of the 'Name' attribute.- See Also:
-
getPresence
Presence getPresence()Returns one of the possible values of presence (required, optional, forbidden, ignored, constant). The default value is"optional". The literals are from the enumerationPresence.- Returns:
- one of the possible values of presence (required, optional, forbidden, ignored, constant)
- See Also:
-
setPresence
Set one of the possible values of presence (required, optional, forbidden, ignored, constant).- Parameters:
value- the new value of the 'Presence' attribute.- See Also:
-
getRendering
String getRendering()Returns a hint on how to generate or render an element in a user interface.- Returns:
- a hint on how to generate or render an element in a user interface
- See Also:
-
setRendering
Set a hint on how to generate or render an element in a user interface.- Parameters:
value- the new value of the 'Rendering' attribute.- See Also:
-
getType
String getType()Returns a datatype or a codeSet carrying an underlying datatype.- Returns:
- a datatype or a codeSet carrying an underlying datatype
- See Also:
-
setType
Set a datatype or a codeSet carrying an underlying datatype.- Parameters:
value- the new value of the 'Type' attribute.- See Also:
-
getValue
String getValue()Returns a default or constant value of the field.- Returns:
- a default or constant value of the field
- See Also:
-
setValue
Set a default or constant value of the field.- Parameters:
value- the new value of the 'Value' attribute.- See Also:
-