MotechBaseRepository

public abstract class MotechBaseRepository<T extends MotechBaseDataObject> extends CouchDbRepositorySupport<T>

Constructors

MotechBaseRepository

protected MotechBaseRepository(Class<T> type, CouchDbConnector db)

Methods

addOrReplace

protected void addOrReplace(T entity, String businessFieldName, String businessId)

bulkAddOrUpdate

public void bulkAddOrUpdate(List<T> records)

bulkDelete

public void bulkDelete(List<T> records)

getAll

public List<T> getAll()

getAll

protected List<T> getAll(int limit)

queryViewWithKeyList

public List<T> queryViewWithKeyList(String viewName, List<String> keys)

removeAll

public void removeAll(String fieldName, String value)

removeAll

public void removeAll()

safeRemove

public void safeRemove(T entity)

singleResult

protected T singleResult(List<T> resultSet)