/** * {@inheritDoc} */ @Override public void updateObjectInternal(final Transformation object, final Transformation updateObject) throws DMPPersistenceException { super.updateObjectInternal(object, updateObject); final Set<Component> components = object.getComponents(); updateObject.setComponents(components); }
/** * {@inheritDoc}<br/> * Updates the name, description, parameters, machine processable function description and components of the transformation. */ @Override protected Transformation prepareObjectForUpdate(final Transformation objectWithUpdates, final Transformation object) { super.prepareObjectForUpdate(objectWithUpdates, object); object.setComponents(objectWithUpdates.getComponents()); return object; }
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.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter); transformation2.setName(transformation2Name); transformation2.setDescription(transformation2Description); transformation2.setComponents(components2); transformation2.addParameter(transformation2Parameter); transformation2.addParameter(transformation2Parameter2);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter); transformation2.setName(transformation2Name); transformation2.setDescription(transformation2Description); transformation2.setComponents(components2); transformation2.addParameter(transformation2Parameter); transformation2.addParameter(transformation2Parameter2);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter); transformation2.setName(transformation2Name); transformation2.setDescription(transformation2Description); transformation2.setComponents(components2); transformation2.addParameter(transformation2Parameter); transformation2.addParameter(transformation2Parameter2);
transformation.setComponents(components); transformation.addParameter(transformationParameter); transformation2.setComponents(components2); transformation2.addParameter(transformation2Parameter); transformation2.addParameter(transformation2Parameter2);
transformation.setComponents(components); transformation.addParameter(transformationParameter); transformation2.setComponents(components2); transformation2.addParameter(transformation2Parameter); transformation2.addParameter(transformation2Parameter2);
transformation.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter);
transformation.setName(transformationName); transformation.setDescription(transformationDescription); transformation.setComponents(components); transformation.addParameter(transformationParameter);