DateField

class DateField<T>(parent: Container<*>, fieldName: String, fieldType: KType, val formats: List<DateFormat> = emptyList()) : Field<T>

Metamodel field for the Elasticsearch date field type, mapped from FieldType.Date.

Optionally carries the DateFormat values declared on the source @Field annotation so consumers can inspect which date formats the underlying Elasticsearch mapping accepts.

Parameters

formats

the accepted date formats, empty when no explicit format was declared

Type Parameters

T

the Kotlin type carried by this field

Constructors

Link copied to clipboard
constructor(parent: Container<*>, fieldName: String, fieldType: KType, formats: List<DateFormat> = emptyList())

Properties

Link copied to clipboard
val formats: List<DateFormat>

Functions

Link copied to clipboard
fun fieldClass(): KClass<out T & Any>?

Returns the KClass for this field's type, or null if the type is not a concrete class (e.g., if it's a type parameter or complex type intersection).

Link copied to clipboard

Returns the Kotlin KType carried by this field, as captured at generation time.

Link copied to clipboard

Returns true if any ancestor container is marked as nested in Elasticsearch.

Link copied to clipboard
fun name(): String

Returns the local Elasticsearch field name, without any parent path segments.

Link copied to clipboard

Returns the paths of the ancestor containers that are marked as nested, closest first.

Link copied to clipboard
open override fun parent(): Container<*>

Returns the direct parent container in the metamodel hierarchy, or null for a root.

Link copied to clipboard

Returns the sequence of ancestor containers, starting with the direct parent.

Link copied to clipboard
fun path(): String

Returns the dot-separated Elasticsearch path of this field, built from its ancestor chain.