public Transformation createTransformation(final String name, final String description, final Set<Component> components, final LinkedList<String> parameters) throws Exception { final String uuid = UUIDService.getUUID(Transformation.class.getSimpleName()); final Transformation transformation = new Transformation(uuid); transformation.setName(name); transformation.setDescription(description); transformation.setComponents(components); transformation.setParameters(parameters); return createAndCompareObject(transformation, transformation); }
/** * Create a new {@code Transformation} as a copy from a existing transformation 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 transformation the base transformation that will be copied * @param uuid the target transformation's id value * @return a new transformation with the given id and all other attributes copied from the provided transformation. */ public static Transformation withId(final Transformation transformation, final String uuid) { final Transformation newTransformation = new Transformation(uuid); newTransformation.setComponents(transformation.getComponents()); newTransformation.setFunctionDescription(transformation.getFunctionDescription()); newTransformation.setParameters(transformation.getParameters()); newTransformation.setDescription(transformation.getDescription()); newTransformation.setName(transformation.getName()); return newTransformation; } }
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components);