org.ektorp.impl
Class StreamedCouchDbConnector

java.lang.Object
  extended by org.ektorp.impl.StdCouchDbConnector
      extended by org.ektorp.impl.StreamedCouchDbConnector
All Implemented Interfaces:
CouchDbConnector, LocalBulkBuffer

public class StreamedCouchDbConnector
extends StdCouchDbConnector


Field Summary
 
Fields inherited from class org.ektorp.impl.StdCouchDbConnector
dbURI, objectMapper, queryExecutor, restTemplate, revisionHandler
 
Constructor Summary
StreamedCouchDbConnector(String databaseName, CouchDbInstance dbInstance)
           
StreamedCouchDbConnector(String databaseName, CouchDbInstance dbi, ObjectMapperFactory om)
           
 
Method Summary
 void create(Object o)
          Creates the Object as a document in the database.
 void create(String id, Object node)
           
protected  org.apache.http.HttpEntity createHttpEntity(Object o)
           
 PurgeResult purge(Map<String,List<String>> revisionsToPurge)
          Permanently removes the references to deleted documents from the database.
 void update(Object o)
          Updates the document.
 
Methods inherited from class org.ektorp.impl.StdCouchDbConnector
addToBulkBuffer, assertDocIdHasValue, callUpdateHandler, callUpdateHandler, callUpdateHandler, callUpdateHandler, changes, changesAsStream, changesFeed, cleanupViews, clearBulkBuffer, compact, compactViews, contains, copy, copy, createAttachment, createAttachment, createDatabaseIfNotExists, delete, delete, deleteAttachment, ensureFullCommit, executeAllOrNothing, executeAllOrNothing, executeBulk, executeBulk, executeBulk, executeBulk, executeQuery, find, find, flushBulkBuffer, get, get, get, getAllDocIds, getAsStream, getAsStream, getAsStream, getAttachment, getAttachment, getConnection, getCurrentRevision, getDatabaseName, getDbInfo, getDesignDocInfo, getRevisionLimit, getRevisions, getSecurity, getWithConflicts, path, queryForPage, queryForStream, queryForStreamingView, queryView, queryView, replicateFrom, replicateFrom, replicateTo, replicateTo, serializeToJson, setCollectionBulkExecutor, setInputStreamBulkExecutor, setJsonSerializer, setLocalBulkBuffer, setQueryExecutor, setRevisionLimit, update, updateMultipart, updateSecurity, URIWithDocId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamedCouchDbConnector

public StreamedCouchDbConnector(String databaseName,
                                CouchDbInstance dbInstance)

StreamedCouchDbConnector

public StreamedCouchDbConnector(String databaseName,
                                CouchDbInstance dbi,
                                ObjectMapperFactory om)
Method Detail

createHttpEntity

protected org.apache.http.HttpEntity createHttpEntity(Object o)

create

public void create(Object o)
Description copied from interface: CouchDbConnector
Creates the Object as a document in the database. If the id is not set it will be generated by the database. The Object's revision field will be updated through the setRevision(String s) method.

Specified by:
create in interface CouchDbConnector
Overrides:
create in class StdCouchDbConnector

create

public void create(String id,
                   Object node)
Specified by:
create in interface CouchDbConnector
Overrides:
create in class StdCouchDbConnector

purge

public PurgeResult purge(Map<String,List<String>> revisionsToPurge)
Description copied from interface: CouchDbConnector
Permanently removes the references to deleted documents from the database.

Specified by:
purge in interface CouchDbConnector
Overrides:
purge in class StdCouchDbConnector
Parameters:
revisionsToPurge - document IDs & revisions to be purged
Returns:
contains the purge sequence number, and a list of the document IDs and revisions successfully purged.

update

public void update(Object o)
Description copied from interface: CouchDbConnector
Updates the document. The Object's revision field will be updated through the setRevision(String s) method.

Specified by:
update in interface CouchDbConnector
Overrides:
update in class StdCouchDbConnector


Copyright © 2017. All rights reserved.