component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping);
/** * Create a new {@code Component} as a copy from a existing component with a specific id. <br> * <b>Use with care!</b> * <p> * This factory is to be used by {@link org.dswarm.persistence.model.job.utils.TransformationDeserializer} to avoid reflection * based access to a private/protected field, since the Json deserializer needs a way to set the id that was provided by the * JSON. * </p> * <p> * The id is otherwise assigned by the database/Hibernate layer. You should never need this outside of * {@code TransformationDeserializer}. * </p> * * @param component the base component that will be copied * @param uuid the target component's id value * @return a new component with the given id and all other attributes copied from the provided component. */ public static Component withId(final Component component, final String uuid) { final Component newComponent = new Component(uuid); newComponent.setFunction(component.getFunction()); newComponent.setInputComponents(component.getInputComponents()); newComponent.setOutputComponents(component.getOutputComponents()); newComponent.setParameterMappings(component.getParameterMappings()); newComponent.setDescription(component.getDescription()); newComponent.setName(component.getName()); return newComponent; } }
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping); transformationComponent.setName("prepare first name"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings); transformationComponent2.setName("prepare family name"); transformationComponent2.setFunction(transformation); transformationComponent2.setParameterMappings(transformationComponentParameterMappings2); component4.setName(component4Name); component4.setFunction(function4); component4.setParameterMappings(parameterMapping4); transformationComponent3.setName(transformation2.getName() + " (component)"); transformationComponent3.setFunction(transformation2); transformationComponent3.setParameterMappings(transformationComponent3ParameterMappings);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping); transformationComponent.setName("prepare first name"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings); transformationComponent2.setName("prepare family name"); transformationComponent2.setFunction(transformation); transformationComponent2.setParameterMappings(transformationComponentParameterMappings2); component4.setName(component4Name); component4.setFunction(function4); component4.setParameterMappings(parameterMapping4); transformationComponent3.setName(transformation2.getName() + " (component)"); transformationComponent3.setFunction(transformation2); transformationComponent3.setParameterMappings(transformationComponent3ParameterMappings);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping); transformationComponent.setName("prepare first name"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings); transformationComponent2.setName("prepare family name"); transformationComponent2.setFunction(transformation); transformationComponent2.setParameterMappings(transformationComponentParameterMappings2); component4.setName(component4Name); component4.setFunction(function4); component4.setParameterMappings(parameterMapping4); transformationComponent3.setName(transformation2.getName() + " (component)"); transformationComponent3.setFunction(transformation2); transformationComponent3.setParameterMappings(transformationComponent3ParameterMappings);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping); transformationComponent.setName("prepare first name"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings); transformationComponent2.setName("prepare family name"); transformationComponent2.setFunction(transformation); transformationComponent2.setParameterMappings(transformationComponentParameterMappings2); component4.setName(component4Name); component4.setFunction(function4); component4.setParameterMappings(parameterMapping4); transformationComponent3.setName(transformation2.getName() + " (component)"); transformationComponent3.setFunction(transformation2); transformationComponent3.setParameterMappings(transformationComponent3ParameterMappings);
component1.setName(component1Name); component1.setFunction(function1); component1.setParameterMappings(parameterMapping1); component2.setName(component2Name); component2.setFunction(function2); component2.setParameterMappings(parameterMapping2); component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMapping); transformationComponent.setName("prepare first name"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings); transformationComponent2.setName("prepare family name"); transformationComponent2.setFunction(transformation); transformationComponent2.setParameterMappings(transformationComponentParameterMappings2); component4.setName(component4Name); component4.setFunction(function4); component4.setParameterMappings(parameterMapping4); transformationComponent3.setName(transformation2.getName() + " (component)"); transformationComponent3.setFunction(transformation2); transformationComponent3.setParameterMappings(transformationComponent3ParameterMappings);
public Component createComponent(final String name, final Map<String, String> parameterMappings, final Function function, final Set<Component> inputComponents, final Set<Component> outputComponents) throws Exception { // component needs to be a persistent object from the beginning final Component component = createObject().getObject(); component.setName(name); component.setFunction(function); component.setParameterMappings(parameterMappings); if (inputComponents != null) { component.setInputComponents(inputComponents); } if (outputComponents != null) { component.setOutputComponents(outputComponents); } // update method needs to be utilised here, because component was already created final Component updatedComponent = updateAndCompareObject(component, component); Assert.assertNotNull("the updated component shouldn't be null", updatedComponent); Assert.assertNotNull("the component name shouldn't be null", updatedComponent.getUuid()); return updatedComponent; }
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMappings); transformationComponent.setName(transformation.getName() + " (component)"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings);
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMappings); transformationComponent.setName(transformation.getName() + " (component)"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings);
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMappings); transformationComponent.setName(transformation.getName() + " (component)"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings);
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMappings); transformationComponent.setName(transformation.getName() + " (component)"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings);
component.setName(componentName); component.setFunction(function); component.setParameterMappings(parameterMappings); transformationComponent.setName(transformation.getName() + " (component)"); transformationComponent.setFunction(transformation); transformationComponent.setParameterMappings(transformationComponentParameterMappings);