/** * Returns whether the given {@link String} is the type key. * * @param key * @return * @see MongoTypeMapper#isTypeKey(String) * @since 2.2 */ protected boolean isTypeKey(String key) { return converter.getTypeMapper().isTypeKey(key); }
private Document updateTypeRestrictions(Document query, Example example) { Document result = new Document(); if (isTypeRestricting(example)) { result.putAll(query); this.converter.getTypeMapper().writeTypeRestrictions(result, getTypesToMatch(example)); return result; } for (Map.Entry<String, Object> entry : query.entrySet()) { if (!this.converter.getTypeMapper().isTypeKey(entry.getKey())) { result.put(entry.getKey(), entry.getValue()); } } return result; }
private boolean isTypeRestricting(Example example) { if (example.getMatcher() instanceof UntypedExampleMatcher) { return false; } if (example.getMatcher().getIgnoredPaths().isEmpty()) { return true; } for (String path : example.getMatcher().getIgnoredPaths()) { if (this.converter.getTypeMapper().isTypeKey(path)) { return false; } } return true; }
if (typeMapper.isTypeKey(entry.getKey())) { continue;
if (typeMapper.isTypeKey(key)) {
/** * Returns whether the given {@link String} is the type key. * * @param key * @return * @see MongoTypeMapper#isTypeKey(String) * @since 2.2 */ protected boolean isTypeKey(String key) { return converter.getTypeMapper().isTypeKey(key); }
private Document updateTypeRestrictions(Document query, Example example) { Document result = new Document(); if (isTypeRestricting(example)) { result.putAll(query); this.converter.getTypeMapper().writeTypeRestrictions(result, getTypesToMatch(example)); return result; } for (Map.Entry<String, Object> entry : query.entrySet()) { if (!this.converter.getTypeMapper().isTypeKey(entry.getKey())) { result.put(entry.getKey(), entry.getValue()); } } return result; }
if (typeMapper.isTypeKey(entry.getKey())) { continue;
private boolean isTypeRestricting(Example example) { if (example.getMatcher() instanceof UntypedExampleMatcher) { return false; } if (example.getMatcher().getIgnoredPaths().isEmpty()) { return true; } for (String path : example.getMatcher().getIgnoredPaths()) { if (this.converter.getTypeMapper().isTypeKey(path)) { return false; } } return true; }
if (typeMapper.isTypeKey(key)) {
public List<YAttribute> convert(BasicDBObject source) { List<YAttribute> attributes = new ArrayList<>(); for (String key : source.keySet()) { if(getConverter().getTypeMapper().isTypeKey(key)){ continue; } Object value = source.get(key); key = getConverter().potentiallyUnescapeMapKey(key); attributes.addAll(processAttributes(key, value)); } return attributes; }