private static TransformOperation prepareTransformOperation(String transformationScope, String mappingPropertyInternalName) { return new TransformOperation(transformationScope, mappingPropertyInternalName); } }
public TransformOperation(TransformOperation other) { super(other); this.mappingPropertyInternalName = other.getMappingPropertyInternalName(); this.sourceStaticProperty = other.getSourceStaticProperty(); this.transformationScope = other.getTransformationScope(); this.targetValue = other.getTargetValue(); }
private EventProperty modifyEventProperty(EventProperty eventProperty, TransformOperation to, List<StaticProperty> staticProperties) { if (to.getTargetValue() != null) { return modifyEventProperty(eventProperty, TransformOperationType.valueOf(to.getTransformationScope()), to .getTargetValue()); } else { Optional<StaticProperty> sp = findStaticProperty(staticProperties, to.getSourceStaticProperty()); if (sp.isPresent()) { return modifyEventProperty(eventProperty, sp.get(), TransformOperationType.valueOf(to.getTransformationScope ())); } } return new Cloner().property(eventProperty); }
EventSchema inSchema = stream.getEventSchema(); strategy.getTransformOperations().forEach(to -> { Optional<MappingPropertyUnary> mappingPropertyOpt = findMappingProperty(to.getMappingPropertyInternalName(), dataProcessorInvocation.getStaticProperties());
private static TransformOperation staticTransformOperation(TransformOperationType transformationScope, String mappingPropertyInternalName, String targetValue) { TransformOperation to = prepareTransformOperation(transformationScope.name() , mappingPropertyInternalName); to.setTargetValue(targetValue); return to; }
private static TransformOperation dynamicTransformOperation(TransformOperationType transformationScope, String mappingPropertyInternalName, String sourceStaticPropertyInternalName) { TransformOperation to = prepareTransformOperation(transformationScope.name() , mappingPropertyInternalName); to.setSourceStaticProperty(sourceStaticPropertyInternalName); return to; }
private EventProperty modifyEventProperty(EventProperty eventProperty, TransformOperation to, List<StaticProperty> staticProperties) { if (to.getTargetValue() != null) { return modifyEventProperty(eventProperty, TransformOperationType.valueOf(to.getTransformationScope()), to .getTargetValue()); } else { Optional<StaticProperty> sp = findStaticProperty(staticProperties, to.getSourceStaticProperty()); if (sp.isPresent()) { return modifyEventProperty(eventProperty, sp.get(), TransformOperationType.valueOf(to.getTransformationScope ())); } } return new Cloner().property(eventProperty); }
EventSchema inSchema = stream.getEventSchema(); strategy.getTransformOperations().forEach(to -> { Optional<MappingPropertyUnary> mappingPropertyOpt = findMappingProperty(to.getMappingPropertyInternalName(), dataProcessorInvocation.getStaticProperties());
public List<TransformOperation> transformOperations(List<TransformOperation> transformOperations) { return transformOperations.stream().map(o -> new TransformOperation(o)).collect(Collectors.toList()); }