@StableMinor(version="12.4", sinceVersion="8.1") public class Document extends Object implements Map<String,Serializable>, Serializable
Map
. This object is used to be
indexed by a indexer
and searched by a searcher
.Modifier | Constructor and Description |
---|---|
protected |
Document(DocumentType documentType)
Constructs an empty instance of
Document . |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Serializable>> |
entrySet() |
Serializable |
get(DocumentTypeField field)
Returns the value stored in this document using the given field identifier as key.
|
Serializable |
get(Object key) |
DocumentType |
getDocumentType()
Returns the
document type of this document. |
String |
getId()
Returns the identifier of this document.
|
boolean |
isEmpty() |
Set<String> |
keySet() |
protected <T> T |
newFieldValueProxy(DocumentTypeField field,
Class<T> proxyInterface)
Creates a new proxy for a document root field value.
|
Serializable |
put(DocumentTypeField field,
Serializable... values)
Stores the given value in this document using the given field identifier as key.
|
Serializable |
put(String key,
Serializable value) |
void |
putAll(Map<? extends String,? extends Serializable> m) |
Serializable |
remove(Object key) |
void |
setId(String id)
Sets the identifier of this document.
|
int |
size() |
Collection<Serializable> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Document(DocumentType documentType)
Document
.id
- the identifier of this document.documentType
- the document type of this document.IllegalArgumentException
- if the given identifier is null
.IllegalArgumentException
- if the given DocumentType
is null
.protected <T> T newFieldValueProxy(DocumentTypeField field, Class<T> proxyInterface)
field
- the field.proxyInterface
- the interface the proxy must implement.public DocumentType getDocumentType()
document type
of this document.document type
of this document.public String getId()
public void setId(String id)
id
- the identifier.public int size()
size
in interface Map<String,Serializable>
public boolean isEmpty()
isEmpty
in interface Map<String,Serializable>
public Serializable get(Object key)
get
in interface Map<String,Serializable>
public Serializable get(DocumentTypeField field)
field
- the field.get(Object)
public boolean containsKey(Object key)
containsKey
in interface Map<String,Serializable>
public Serializable put(String key, Serializable value)
put
in interface Map<String,Serializable>
public Serializable put(DocumentTypeField field, Serializable... values)
field
- the field.value
- the value.put(String, Serializable)
public void putAll(Map<? extends String,? extends Serializable> m)
putAll
in interface Map<String,Serializable>
public Serializable remove(Object key)
remove
in interface Map<String,Serializable>
public void clear()
clear
in interface Map<String,Serializable>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Serializable>
public Collection<Serializable> values()
values
in interface Map<String,Serializable>
public Set<Map.Entry<String,Serializable>> entrySet()
entrySet
in interface Map<String,Serializable>
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.