to.setInternal(from.isInternal());
@Mapping(from = SchedulingPolicyUnit.class, to = PolicyUnit.class) public static PolicyUnit map(SchedulingPolicyUnit model, PolicyUnit template) { PolicyUnit entity = template != null ? template : new PolicyUnit(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setName(model.getName()); } if (model.isSetDescription()) { entity.setDescription(model.getDescription()); } if (model.isSetType()) { entity.setPolicyUnitType(map(model.getType(), null)); } if (model.isSetEnabled()) { entity.setEnabled(model.isEnabled()); } if (model.isSetInternal()) { entity.setInternal(model.isInternal()); } if (model.isSetProperties()) { entity.setParameterRegExMap(CustomPropertiesParser.toMap(model.getProperties())); } return entity; }