/** * {@inheritDoc}<br/> * Clears the relationship to the input attribute paths, output attribute path, input filter and output filter. */ @Override protected void prepareObjectForRemoval(final Mapping object) { // should clear the relationship to the input attribute paths, output attribute path + transformation function object.setInputAttributePaths(null); object.setOutputAttributePath(null); final Component transformation = object.getTransformation(); if (transformation != null) { transformation.setFunction(null); } }
/** * {@inheritDoc} */ @Override public void updateObjectInternal(final Mapping object, final Mapping updateObject) throws DMPPersistenceException { super.updateObjectInternal(object, updateObject); final Set<MappingAttributePathInstance> inputAttributePaths = object.getInputAttributePaths(); final MappingAttributePathInstance outputAttributePath = object.getOutputAttributePath(); final Component transformation = object.getTransformation(); updateObject.setInputAttributePaths(inputAttributePaths); updateObject.setOutputAttributePath(outputAttributePath); updateObject.setTransformation(transformation); }
/** * {@inheritDoc}<br/> * Updates the name, transformation (component), input attribute paths and output attribute path of the mapping. */ @Override protected Mapping prepareObjectForUpdate(final Mapping objectWithUpdates, final Mapping object) { super.prepareObjectForUpdate(objectWithUpdates, object); object.setTransformation(objectWithUpdates.getTransformation()); object.setInputAttributePaths(objectWithUpdates.getInputAttributePaths()); object.setOutputAttributePath(objectWithUpdates.getOutputAttributePath()); return object; }