Package org.lightcouch
Class Document
java.lang.Object
org.lightcouch.Document
- Direct Known Subclasses:
DesignDocument
,ReplicatorDocument
Convenient base class for CouchDB documents, defines the basic
id
, revision
properties, and attachments.- Since:
- 0.0.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(String name, Attachment attachment) Adds an in-line document attachment.boolean
getId()
int
hashCode()
void
setAttachments
(Map<String, Attachment> attachments) void
void
setRevision
(String revision)
-
Field Details
-
id
-
revision
-
attachments
-
-
Constructor Details
-
Document
public Document() -
Document
Copy contructor that does a deep copy- Parameters:
other
- The document to copy.
-
-
Method Details
-
getId
-
getRevision
-
getAttachments
-
setId
-
setRevision
-
setAttachments
-
addAttachment
Adds an in-line document attachment.- Parameters:
name
- The attachment file nameattachment
- The attachment instance
-
hashCode
public int hashCode() -
equals
-