/** * Adds the property with the specified key. This task will be delegated to * the associated {@code ExpressionEngine}, so the passed in key * must match the requirements of this implementation. * * @param key the key of the new property * @param obj the value of the new property */ @Override protected void addPropertyInternal(final String key, final Object obj) { addPropertyToModel(key, getListDelimiterHandler().parse(obj)); }
/** * Actually adds a property to this configuration. This method is called by * {@code addProperty()}. It performs list splitting if necessary and * delegates to {@link #addPropertyDirect(String, Object)} for every single * property value. * * @param key the key of the property to be added * @param value the new property value * @since 2.0 */ protected void addPropertyInternal(final String key, final Object value) { for (final Object obj : getListDelimiterHandler().parse(value)) { addPropertyDirect(key, obj); } }
@Override protected Object performOperation() throws SQLException { final List<Object> results = new ArrayList<>(); try (final ResultSet rs = openResultSet(String.format(SQL_GET_PROPERTY, table, keyColumn), true, key)) { while (rs.next()) { final Object value = extractPropertyValue(rs); // Split value if it contains the list delimiter for (final Object o : getListDelimiterHandler().parse(value)) { results.add(o); } } } if (!results.isEmpty()) { return (results.size() > 1) ? results : results .get(0); } return null; } };
final Iterator<?> itValues = getListDelimiterHandler().parse(newValue).iterator(); final Map<QueryResult<T>, Object> changedValues = new HashMap<>();