@Override public Map<Object, Object> getNormalizedValueForUpdate(Object obj) { if (obj == null) { return null; } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object normalizedKey = keyType.getNormalizedValueForUpdate(e.getKey()); if (normalizedKey != null) { Object value = e.getValue(); if (value != null) { Object normalizedValue = valueType.getNormalizedValueForUpdate(e.getValue()); if (normalizedValue != null) { ret.put(normalizedKey, normalizedValue); } else { return null; // invalid value } } else { ret.put(normalizedKey, value); } } else { return null; // invalid key } } return ret; } return null; }
@Override public Map<Object, Object> getNormalizedValueForUpdate(Object obj) { if (obj == null) { return null; } if (obj instanceof Map) { Map<Object, Object> ret = new HashMap<>(); Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { Object normalizedKey = keyType.getNormalizedValueForUpdate(e.getKey()); if (normalizedKey != null) { Object value = e.getValue(); if (value != null) { Object normalizedValue = valueType.getNormalizedValueForUpdate(e.getValue()); if (normalizedValue != null) { ret.put(normalizedKey, normalizedValue); } else { return null; // invalid value } } else { ret.put(normalizedKey, value); } } else { return null; // invalid key } } return ret; } return null; }
private Object getNormalizedValueForUpdate(Object value, AtlasAttributeDef attributeDef) { AtlasAttribute attribute = allAttributes.get(attributeDef.getName()); if (attribute != null) { AtlasType attrType = attribute.getAttributeType(); if (value != null) { return attrType.getNormalizedValueForUpdate(value); } } return null; }
private Object getNormalizedValueForUpdate(Object value, AtlasAttributeDef attributeDef) { AtlasAttribute attribute = allAttributes.get(attributeDef.getName()); if (attribute != null) { AtlasType attrType = attribute.getAttributeType(); if (value != null) { return attrType.getNormalizedValueForUpdate(value); } } return null; }
Object normalizedValue = elementType.getNormalizedValueForUpdate(element); Object normalizedValue = elementType.getNormalizedValueForUpdate(element);
Object normalizedValue = elementType.getNormalizedValueForUpdate(element); Object normalizedValue = elementType.getNormalizedValueForUpdate(element);