org.ektorp.support
Class OpenCouchDbDocument

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

public class OpenCouchDbDocument
extends CouchDbDocument

Provides convenience field and methods for holding unmapped fields in JSON serialization / deserialization. Subclasses of this class can be read and written to and from JSON documents without loosing unmapped fields in the process. i.e. the class will be tolerant for changes in the underlying JSON data,

Author:
henriklundgren
See Also:
Serialized Form

Constructor Summary
OpenCouchDbDocument()
           
 
Method Summary
 Map<String,Object> getAnonymous()
           
 void setAnonymous(String key, Object value)
           
 
Methods inherited from class org.ektorp.support.CouchDbDocument
addInlineAttachment, getAttachments, getConflicts, getId, getRevision, getRevisions, hasConflict, isNew, removeAttachment, setId, setRevision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenCouchDbDocument

public OpenCouchDbDocument()
Method Detail

getAnonymous

public Map<String,Object> getAnonymous()
Returns:
a Map containing fields that did not map to any other field in the class during object deserializarion from a JSON document.

setAnonymous

public void setAnonymous(String key,
                         Object value)
Parameters:
key -
value -


Copyright © 2011. All Rights Reserved.