DocumentClassMappingContext


class DocumentClassMappingContext


A context object that holds mapping information for document classes and their parent types.

This class encapsulates the documentClassMap and parentTypeMap used during the deserialization of GenericDocument instances into specific document classes.

See also
toDocumentClass

Summary

Public constructors

@ExperimentalAppSearchApi
DocumentClassMappingContext(
    documentClassMap: (Mutable)Map<String!, (Mutable)List<String!>!>?,
    parentTypeMap: (Mutable)Map<String!, (Mutable)List<String!>!>?
)

Constructs a new DocumentClassMappingContext.

Public functions

(Mutable)Map<String!, (Mutable)List<String!>!>

Returns the document class map.

(Mutable)Map<String!, (Mutable)List<String!>!>

Returns the parent type map.

Public constructors

DocumentClassMappingContext

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
DocumentClassMappingContext(
    documentClassMap: (Mutable)Map<String!, (Mutable)List<String!>!>?,
    parentTypeMap: (Mutable)Map<String!, (Mutable)List<String!>!>?
)

Constructs a new DocumentClassMappingContext.

Parameters
documentClassMap: (Mutable)Map<String!, (Mutable)List<String!>!>?

A map from AppSearch's type name specified by name to the list of the fully qualified names of the corresponding document classes. In most cases, passing the value returned by getGlobalMap will be sufficient.

parentTypeMap: (Mutable)Map<String!, (Mutable)List<String!>!>?

A map from AppSearch's type name specified by name to the list of its parent type names. In most cases, passing the value returned by getParentTypeMap will be sufficient.

Public functions

getDocumentClassMap

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
fun getDocumentClassMap(): (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the document class map.

getParentTypeMap

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
fun getParentTypeMap(): (Mutable)Map<String!, (Mutable)List<String!>!>

Returns the parent type map.