public DecoratedInterpretedPropertyValue(InterpretedPropertyValue interpretedPropertyValue, Record record) { try { rawValue = interpretedPropertyValue.getRawValue(record); } catch (InterpreterEngineException iee) { throw new RuntimeException(iee); } }
/** * Method that applies a record to an expression language * @param record * @return * @throws InterpreterEngineException */ protected Object getRawValue(Record record) throws InterpreterEngineException { ScriptContext context = new SimpleScriptContext(); record.getFieldsEntrySet().forEach(entry -> context.setAttribute(entry.getKey(), entry.getValue().getRawValue(), ScriptContext.ENGINE_SCOPE)); return getRawValue(context); }