public class BaseDocument extends BaseEntity implements DocumentHolder
| Modifier and Type | Field and Description |
|---|---|
static String |
FROM |
static String |
ID |
static String |
KEY |
static String |
REV |
static String |
TO |
| Constructor and Description |
|---|
BaseDocument()
create an empty BaseDocument
|
BaseDocument(Map<String,Object> properties)
create an BaseDocument with given attributes
|
BaseDocument(String documentKey)
create an empty BaseDocument with a given key
|
BaseDocument(String documentKey,
Map<String,Object> properties)
create an BaseDocument with given key and attributes
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String key,
Object value)
add an attribute to the document.
|
Object |
getAttribute(String key)
get a single attribute of the document
|
String |
getDocumentHandle() |
String |
getDocumentKey() |
long |
getDocumentRevision() |
Map<String,Object> |
getProperties() |
void |
setDocumentHandle(String documentHandle) |
void |
setDocumentKey(String documentKey) |
void |
setDocumentRevision(long documentRevision) |
void |
setProperties(Map<String,Object> properties) |
String |
toString() |
void |
updateAttribute(String key,
Object value)
update the value of the attribute with the given key
|
getCode, getErrorMessage, getErrorNumber, getEtag, getRequestId, getStatusCode, isBatchResponseEntity, isError, isNotModified, isUnauthorized, setCode, setError, setErrorMessage, setErrorNumber, setEtag, setRequestId, setStatusCodepublic static final String REV
public static final String KEY
public static final String ID
public static final String FROM
public static final String TO
public BaseDocument()
public BaseDocument(String documentKey)
documentKey - the unique key of the documentpublic BaseDocument(Map<String,Object> properties)
properties - the attributes (key/value) of the document to be createdpublic long getDocumentRevision()
getDocumentRevision in interface DocumentHolderpublic String getDocumentHandle()
getDocumentHandle in interface DocumentHolderpublic String getDocumentKey()
getDocumentKey in interface DocumentHolderpublic void setDocumentRevision(long documentRevision)
setDocumentRevision in interface DocumentHolderpublic void setDocumentHandle(String documentHandle)
setDocumentHandle in interface DocumentHolderpublic void setDocumentKey(String documentKey)
setDocumentKey in interface DocumentHolderpublic void addAttribute(String key, Object value)
key - the key of the attributevalue - the value of the attributepublic void updateAttribute(String key, Object value)
key - the key of the attributevalue - the value of the attribute ti replace the old valuepublic Object getAttribute(String key)
key - the key of the attributepublic String toString()
toString in class BaseEntityCopyright © 2012–2016 ArangoDB GmbH. All rights reserved.