Interface CtxProperty
@Immutable
public interface CtxProperty
Context for a DTO property.
-
Method Summary
Modifier and TypeMethodDescription@Nullable CtxEnum
Returns allowable enumeration values or null.baseName()
Returns the OpenApi property name.static dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxProperty.Builder
builder()
Returns a builder for this type.@Nullable String
dataType()
Returns dataType in an enumeration or null.Returns the java type name.@Nullable String
Returns the property default value, or null.Returns the optional description of the property.example()
Returns an optional property example.getter()
Returns the name of the getter.boolean
isArray()
Returns true if this property should be rendered as an array, otherwise false.boolean
Returns true if this property is a container, otherwise false.boolean
isDate()
Returns true if this property should be rendered as a date, otherwise false.boolean
Returns true if this property should be rendered as a date-time, otherwise false.boolean
isEnum()
Returns true if this property should render an enumeration, otherwise false.boolean
isMap()
Returns true if this property should be rendered as a map, otherwise false.boolean
isSet()
Returns true if this property should be rendered as a set, otherwise false.madaProp()
Returns additional custom template data for the property.name()
Returns the java field name.Returns the java field name in camel case, used to construct method names.Returns the java field name in snake case, used to construct constant names.boolean
required()
Returns true if this property is required.setter()
Returns the name of the setter.Returns context for bean validation if relevant for this property.
-
Method Details
-
builder
static dk.mada.jaxrs.generator.mpclient.dto.tmpl.ImmutableCtxProperty.Builder builder()Returns a builder for this type.- Returns:
- a builder for this type
-
name
String name()Returns the java field name.- Returns:
- the java field name
-
baseName
String baseName()Returns the OpenApi property name.- Returns:
- the OpenApi property name
-
nameInCamelCase
String nameInCamelCase()Returns the java field name in camel case, used to construct method names.- Returns:
- the java field name in camel case, used to construct method names
-
nameInSnakeCase
String nameInSnakeCase()Returns the java field name in snake case, used to construct constant names.- Returns:
- the java field name in snake case, used to construct constant names
-
datatypeWithEnum
String datatypeWithEnum()Returns the java type name.- Returns:
- the java type name
-
getter
String getter()Returns the name of the getter.- Returns:
- the name of the getter
-
setter
String setter()Returns the name of the setter.- Returns:
- the name of the setter
-
dataType
@Nullable String dataType()Returns dataType in an enumeration or null.- Returns:
- dataType in an enumeration or null
-
allowableValues
@Nullable CtxEnum allowableValues()Returns allowable enumeration values or null.- Returns:
- allowable enumeration values or null
-
defaultValue
@Nullable String defaultValue()Returns the property default value, or null.- Returns:
- the property default value, or null
-
description
Returns the optional description of the property.- Returns:
- the optional description of the property
-
validation
Optional<CtxValidation> validation()Returns context for bean validation if relevant for this property.- Returns:
- context for bean validation if relevant for this property
-
isArray
boolean isArray()Returns true if this property should be rendered as an array, otherwise false.- Returns:
- true if this property should be rendered as an array, otherwise false
-
isMap
boolean isMap()Returns true if this property should be rendered as a map, otherwise false.- Returns:
- true if this property should be rendered as a map, otherwise false
-
isSet
boolean isSet()Returns true if this property should be rendered as a set, otherwise false.- Returns:
- true if this property should be rendered as a set, otherwise false
-
isContainer
boolean isContainer()Returns true if this property is a container, otherwise false.- Returns:
- true if this property is a container, otherwise false
-
isDate
boolean isDate()Returns true if this property should be rendered as a date, otherwise false.- Returns:
- true if this property should be rendered as a date, otherwise false
-
isDateTime
boolean isDateTime()Returns true if this property should be rendered as a date-time, otherwise false.- Returns:
- true if this property should be rendered as a date-time, otherwise false
-
isEnum
boolean isEnum()Returns true if this property should render an enumeration, otherwise false.- Returns:
- true if this property should render an enumeration, otherwise false
-
required
boolean required()Returns true if this property is required.- Returns:
- true if this property is required
-
example
Returns an optional property example.- Returns:
- an optional property example
-
madaProp
CtxPropertyExt madaProp()Returns additional custom template data for the property.- Returns:
- additional custom template data for the property
-