use of io.lumeer.api.model.AttributeFilterEquation in project engine by Lumeer.
the class AttributeFilterEquationCodec method convertFromDocument.
public static AttributeFilterEquation convertFromDocument(final Document document) {
AttributeFilter filter = AttributeFilterCodec.convertFromDocument(document.get(FILTER, Document.class));
String operator = document.getString(OPERATOR);
List<AttributeFilterEquation> equations;
List equationsList = document.get(EQUATIONS, List.class);
if (equationsList != null) {
equations = new ArrayList<Document>(equationsList).stream().map(AttributeFilterEquationCodec::convertFromDocument).collect(Collectors.toList());
} else {
equations = Collections.emptyList();
}
return new AttributeFilterEquation(equations, filter, operator);
}
use of io.lumeer.api.model.AttributeFilterEquation in project engine by Lumeer.
the class AttributeLockExceptionGroupCodec method convertFromDocument.
public static AttributeLockExceptionGroup convertFromDocument(final Document document) {
AttributeFilterEquation equation = AttributeFilterEquationCodec.convertFromDocument(document.get(EQUATION, Document.class));
List<String> typeValue = document.getList(TYPE_VALUE, String.class);
String type = document.getString(TYPE);
return new AttributeLockExceptionGroup(equation, typeValue, type);
}
Aggregations