public Set<RecordId> convertAvroRecordIds(List<String> avroRecordIds, LRepository repository) { Set<RecordId> recordIds = new HashSet<RecordId>(); for (String avroRecordId : avroRecordIds) { recordIds.add(repository.getIdGenerator().fromString(avroRecordId)); } return recordIds; } }
@Override public RecordVariantFilter fromJson(JsonNode node, Namespaces namespaces, LRepository repository, RecordFilterJsonConverter<RecordFilter> converter) throws JsonFormatException, RepositoryException, InterruptedException { String recordId = JsonUtil.getString(node, "recordId", null); if (recordId == null) { throw new IllegalStateException("expected non null recordId in json input"); } final ObjectNode variantPropertiesNode = JsonUtil.getObject(node, "variantProperties", null); if (variantPropertiesNode == null) { throw new IllegalStateException("expected non null variantProperties in json input"); } final HashMap<String, String> variantProperties = new HashMap<String, String>(); final Iterator<Map.Entry<String, JsonNode>> fields = variantPropertiesNode.getFields(); while (fields.hasNext()) { final Map.Entry<String, JsonNode> next = fields.next(); variantProperties.put(next.getKey(), next.getValue().getTextValue()); } return new RecordVariantFilter(repository.getIdGenerator().fromString(recordId), variantProperties); } }
@Override public RecordIdPrefixFilter fromJson(JsonNode node, Namespaces namespaces, LRepository repository, RecordFilterJsonConverter<RecordFilter> converter) throws JsonFormatException, RepositoryException, InterruptedException { RecordIdPrefixFilter filter = new RecordIdPrefixFilter(); String recordId = JsonUtil.getString(node, "recordId", null); if (recordId != null) { filter.setRecordId(repository.getIdGenerator().fromString(recordId)); } return filter; } }
recordId = idGenerator.fromString(masterIdString);
RecordId recordId = idGenerator.fromString(recordIdString);
record.setId(repository.getIdGenerator().fromString(id));
scan.setStartRecordId(repository.getIdGenerator().fromString(startRecordId)); scan.setStopRecordId(repository.getIdGenerator().fromString(stopRecordId));