@Override public boolean completeEquals(final Object obj) { return Function.class.isInstance(obj) && super.completeEquals(obj) && Objects.equal(((Function) obj).getFunctionType(), getFunctionType()) && Objects.equal(((Function) obj).getParameters(), getParameters()) && Objects.equal(((Function) obj).getFunctionDescription(), getFunctionDescription()); } }
/** * {@inheritDoc} */ @Override public void updateObjectInternal(final FUNCTIONIMPL object, final FUNCTIONIMPL updateObject) throws DMPPersistenceException { final LinkedList<String> parameters = object.getParameters(); updateObject.setParameters(parameters); updateObject.setFunctionDescription(object.getFunctionDescription()); super.updateObjectInternal(object, updateObject); }
if (expectedObject.getFunctionDescription() == null) { Assert.assertNull("the actual " + pojoClassName + " description JSON should be null", actualObject.getFunctionDescription()); Assert.assertNotNull("the actual " + pojoClassName + " description JSON shouldn't be null", actualObject.getFunctionDescription()); actualFunctionDescriptionJSONString = objectMapper.writeValueAsString(actualObject.getFunctionDescription()); } catch (final JsonProcessingException e) { expectedFunctionDescriptionJSONString = objectMapper.writeValueAsString(expectedObject.getFunctionDescription()); } catch (final JsonProcessingException e) {
/** * {@inheritDoc}<br/> * Updates the name, description, parameters and machine processable function description of the function. */ @Override protected POJOCLASS prepareObjectForUpdate(final POJOCLASS objectWithUpdates, final POJOCLASS object) { super.prepareObjectForUpdate(objectWithUpdates, object); object.setFunctionDescription(objectWithUpdates.getFunctionDescription()); object.setParameters(objectWithUpdates.getParameters()); return object; } }
Assert.assertNotNull("the function description shouldn't be null", function.getDescription()); Assert.assertEquals("the function descriptions are not equal", functionDescription, function.getDescription()); Assert.assertNotNull("the function description JSON shouldn't be null", function.getFunctionDescription()); final String functionDescriptionJSONString = objectMapper.writeValueAsString(function.getFunctionDescription());