org.ektorp.support
Class CouchDbDocument

java.lang.Object
  extended by org.ektorp.support.CouchDbDocument
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Entity, OpenCouchDbDocument, ReplicatorDocument

public class CouchDbDocument
extends Object
implements Serializable

Author:
henrik lundgren
See Also:
Serialized Form

Field Summary
static String ATTACHMENTS_NAME
           
 
Constructor Summary
CouchDbDocument()
           
 
Method Summary
protected  void addInlineAttachment(Attachment a)
           
 Map<String,Attachment> getAttachments()
           
 List<String> getConflicts()
           
 String getId()
           
 String getRevision()
           
 Revisions getRevisions()
          Note: Will only be populated if this document has been loaded with the revisions option = true.
 boolean hasConflict()
           
 boolean isNew()
           
protected  void removeAttachment(String id)
           
 void setId(String s)
           
 void setRevision(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTACHMENTS_NAME

public static final String ATTACHMENTS_NAME
See Also:
Constant Field Values
Constructor Detail

CouchDbDocument

public CouchDbDocument()
Method Detail

getId

public String getId()

setId

public void setId(String s)

getRevision

public String getRevision()

setRevision

public void setRevision(String s)

isNew

public boolean isNew()

getAttachments

public Map<String,Attachment> getAttachments()

getRevisions

public Revisions getRevisions()
Note: Will only be populated if this document has been loaded with the revisions option = true.

Returns:

getConflicts

public List<String> getConflicts()
Returns:
a list of conflicting revisions. Note: Will only be populated if this document has been loaded through the CouchDbConnector.getWithConflicts method.

hasConflict

public boolean hasConflict()
Returns:
true if this document has a conflict. Note: Will only give a correct value if this document has been loaded through the CouchDbConnector.getWithConflicts method.

removeAttachment

protected void removeAttachment(String id)

addInlineAttachment

protected void addInlineAttachment(Attachment a)


Copyright © 2017. All rights reserved.