Skip to content

Instantly share code, notes, and snippets.

@kombadzomba
Created September 29, 2016 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kombadzomba/621f92095f6f7fb20ccd0a2efa77e77d to your computer and use it in GitHub Desktop.
Save kombadzomba/621f92095f6f7fb20ccd0a2efa77e77d to your computer and use it in GitHub Desktop.
database.setFilter("deviceFilter", new ReplicationFilter() {
@Override
public boolean filter(SavedRevision revision, Map<String, Object> params) {
String nameParam = (String) params.get(CommonEntity.FIELD_TYPE);
return nameParam != null && nameParam.equals(revision.getProperty(DocumentTypeCode.SYS_USER));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment