DocumentClassMappingContext


public 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(
    @Nullable Map<StringList<String>> documentClassMap,
    @Nullable Map<StringList<String>> parentTypeMap
)

Constructs a new DocumentClassMappingContext.

Public methods

@NonNull Map<StringList<String>>

Returns the document class map.

@NonNull Map<StringList<String>>

Returns the parent type map.

Public constructors

DocumentClassMappingContext

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public DocumentClassMappingContext(
    @Nullable Map<StringList<String>> documentClassMap,
    @Nullable Map<StringList<String>> parentTypeMap
)

Constructs a new DocumentClassMappingContext.

Parameters
@Nullable Map<StringList<String>> documentClassMap

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.

@Nullable Map<StringList<String>> parentTypeMap

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 methods

getDocumentClassMap

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public @NonNull Map<StringList<String>> getDocumentClassMap()

Returns the document class map.

getParentTypeMap

Added in 1.1.0-alpha07
@ExperimentalAppSearchApi
public @NonNull Map<StringList<String>> getParentTypeMap()

Returns the parent type map.