@Override
 public void updateBranchAddress(String branchName, Address address) {
   m_template.updateMulti(
       new Query(Criteria.where(BRANCH_NAME).is(branchName)),
       new Update().set(BRANCH_ADDRESS, address),
       USER_PROFILE_COLLECTION);
 }
Esempio n. 2
0
 @Override
 public void doUpdate(IUpdateAble updateAble, Class collectionClass) {
   Query query = new Query();
   Update update = new Update();
   updateAble.queryUpdate(query, update);
   template.updateMulti(query, update, collectionClass);
 }
 /** Switch all "Incoming" entries to "Online" */
 public void switchToOnline() {
   template.updateMulti(
       query(where("status").is(GeographicalAreaReplicationStatus.INCOMING)),
       Update.update("status", GeographicalAreaReplicationStatus.ONLINE),
       GeographicalArea.class);
 }