@@ -0,0 +1,2461 @@
+package com.ushahidi.android.presentation.model.mapper;%0A%0Aimport com.ushahidi.android.domain.entity.Form;%0Aimport com.ushahidi.android.presentation.model.FormModel;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport javax.inject.Inject;%0A%0A/**%0A * Transforms data between domain layer and presentation layer%0A *%0A * @author Ushahidi Team %3Cteam@ushahidi.com%3E%0A */%0Apublic class FormModelDataMapper %7B%0A%0A    /**%0A     * Default constructor%0A     */%0A    @Inject%0A    public FormModelDataMapper() %7B%0A        // Do nothing%0A    %7D%0A%0A    /**%0A     * Maps %7B@link Form%7D to %7B@link FormModel%7D%0A     *%0A     * @param form The form  to be mapped%0A     * @return The mapped form model%0A     */%0A    public FormModel map(Form form) %7B%0A        FormModel formModel = null;%0A        if (form != null) %7B%0A            formModel = new FormModel();%0A            formModel._id = form._id;%0A            formModel.setCreated(form.getCreated());%0A            formModel.setUpdated(form.getUpdated());%0A            formModel.setDescription(form.getDescription());%0A            formModel.setName(form.getName());%0A            formModel.setDeploymentId(form.getDeploymentId());%0A            formModel.setDisabled(form.isDisabled());%0A        %7D%0A        return formModel;%0A    %7D%0A%0A    /**%0A     * Maps %7B@link FormModel%7D to %7B@link Form%7D%0A     *%0A     * @param formModel The form to be mapped%0A     * @return The mapped form%0A     */%0A    public Form map(FormModel formModel) %7B%0A        Form form = null;%0A        if (formModel != null) %7B%0A            form = new Form();%0A            form._id = formModel._id;%0A            form.setCreated(formModel.getCreated());%0A            form.setUpdated(formModel.getUpdated());%0A            form.setDeploymentId(formModel.getDeploymentId());%0A            form.setName(formModel.getName());%0A            form.setDescription(formModel.getDescription());%0A            form.setDisabled(formModel.isDisabled());%0A        %7D%0A        return form;%0A    %7D%0A%0A    /**%0A     * Maps a list of %7B@link Form%7D to a list of %7B@link FormModel%7D%0A     *%0A     * @param formList The form entity list%0A     * @return The mapped form entity list%0A     */%0A    public List%3CFormModel%3E map(List%3CForm%3E formList) %7B%0A        List%3CFormModel%3E formModelList = null;%0A        if (formList != null) %7B%0A            formModelList = new ArrayList%3C%3E();%0A            for (Form form : formList) %7B%0A                FormModel formModel = map(form);%0A                formModelList.add(formModel);%0A            %7D%0A        %7D%0A        return formModelList;%0A    %7D%0A%7D%0A

Add form model data mapper