}
} catch (org.graylog2.database.NotFoundException e) {
throw new javax.ws.rs.NotFoundException(e);
}
final StreamRuleType streamRuleType = StreamRuleType.fromInteger(cr.type);
if(null == streamRuleType) {
throw new BadRequestException("Unknown stream rule type " + cr.type);
}
streamRule.setField(cr.field);