public MapEventBeanPropertyWriter getWriter(String propertyName) { if (writablePropertyDescriptors == null) { initializeWriters(); } Pair<EventPropertyDescriptor, MapEventBeanPropertyWriter> pair = propertyWriters.get(propertyName); if (pair != null) { return pair.getSecond(); } Property property = PropertyParser.parse(propertyName, false); if (property instanceof MappedProperty) { MappedProperty mapProp = (MappedProperty) property; return new MapEventBeanPropertyWriterMapProp( mapProp.getPropertyNameAtomic(), mapProp.getKey()); } if (property instanceof IndexedProperty) { IndexedProperty indexedProp = (IndexedProperty) property; return new MapEventBeanPropertyWriterIndexedProp( indexedProp.getPropertyNameAtomic(), indexedProp.getIndex()); } return null; }
public EventPropertyDescriptor getWritableProperty(String propertyName) { if (writablePropertyDescriptors == null) { initializeWriters(); } Pair<EventPropertyDescriptor, ? extends EventPropertyWriter> pair = propertyWriters.get(propertyName); if (pair != null) { return pair.getFirst(); } Property property = PropertyParser.parse(propertyName, false); if (property instanceof MappedProperty) { EventPropertyWriter writer = getWriter(propertyName); if (writer == null) { return null; } MappedProperty mapProp = (MappedProperty) property; return new EventPropertyDescriptor( mapProp.getPropertyNameAtomic(), Object.class, null, false, true, false, true, false); } if (property instanceof IndexedProperty) { EventPropertyWriter writer = getWriter(propertyName); if (writer == null) { return null; } IndexedProperty indexedProp = (IndexedProperty) property; return new EventPropertyDescriptor( indexedProp.getPropertyNameAtomic(), Object.class, null, true, false, true, false, false); } return null; }