// Path: smssync/src/main/java/org/addhen/smssync/domain/entity/FilterEntity.java
// public class FilterEntity extends Entity {
// 
//     private String phoneNumber;
// 
//     private Status status;
// 
//     public Long getId() {
//         return _id;
//     }
// 
//     public void setId(Long id) {
//         _id = id;
//     }
// 
//     public String getPhoneNumber() {
//         return phoneNumber;
//     }
// 
//     public void setPhoneNumber(String phoneNumber) {
//         this.phoneNumber = phoneNumber;
//     }
// 
//     public Status getStatus() {
//         return status;
//     }
// 
//     public void setStatus(Status status) {
//         this.status = status;
//     }
// 
//     /**
//      * The status of the filtered phone number.
//      */
//     public enum Status {
//         WHITELIST, BLACKLIST
//     }
// }


import com.addhen.android.raiburari.presentation.di.qualifier.ActivityScope;
import org.addhen.smssync.domain.entity.FilterEntity;
import org.addhen.smssync.presentation.model.FilterModel;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
    public FilterModel map(FilterEntity filterEntity) {
        FilterModel filter = null;

        if (filterEntity != null) {
            filter = new FilterModel();
            filter._id = filterEntity._id;
            filter.setPhoneNumber(filterEntity.getPhoneNumber());
            filter.setStatus(FilterModel.Status.valueOf(filterEntity.getStatus().name()));
        }
        return filter;
    }

    /**
     * Maps a list {@link FilterModel} into a list of {@link FilterEntity}.
     *
     * @param filterList List to be mapped.
     * @return {@link FilterModel}
     */
    public List<FilterModel> map(List<FilterEntity> filterList) {
        List<FilterModel> filterModelList = new ArrayList<>();
        FilterModel filterModel;
        for (FilterEntity filter : filterList) {
            filterModel = map(filter);
            if (filterModel != null) {
                filterModelList.add(filterModel);
            }
        }
        return filterModelList;
    }

// Path: smssync/src/main/java/org/addhen/smssync/domain/entity/FilterEntity.java
// public class FilterEntity extends Entity {
// 
//     private String phoneNumber;
// 
//     private Status status;
// 
//     public Long getId() {
//         return _id;
//     }
// 
//     public void setId(Long id) {
//         _id = id;
//     }
// 
//     public String getPhoneNumber() {
//         return phoneNumber;
//     }
// 
//     public void setPhoneNumber(String phoneNumber) {
//         this.phoneNumber = phoneNumber;
//     }
// 
//     public Status getStatus() {
//         return status;
//     }
// 
//     public void setStatus(Status status) {
//         this.status = status;
//     }
// 
//     /**
//      * The status of the filtered phone number.
//      */
//     public enum Status {
//         WHITELIST, BLACKLIST
//     }
// }


// Path: smssync/src/main/java/org/addhen/smssync/presentation/model/mapper/FilterModelDataMapper.java
import com.addhen.android.raiburari.presentation.di.qualifier.ActivityScope;
import org.addhen.smssync.domain.entity.FilterEntity;
import org.addhen.smssync.presentation.model.FilterModel;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;

    public FilterModel map(FilterEntity filterEntity) {
        FilterModel filter = null;

        if (filterEntity != null) {
            filter = new FilterModel();
            filter._id = filterEntity._id;
            filter.setPhoneNumber(filterEntity.getPhoneNumber());
            filter.setStatus(FilterModel.Status.valueOf(filterEntity.getStatus().name()));
        }
        return filter;
    }

    /**
     * Maps a list {@link FilterModel} into a list of {@link FilterEntity}.
     *
     * @param filterList List to be mapped.
     * @return {@link FilterModel}
     */
    public List<FilterModel> map(List<FilterEntity> filterList) {
        List<FilterModel> filterModelList = new ArrayList<>();
        FilterModel filterModel;
        for (FilterEntity filter : filterList) {
            filterModel = map(filter);
            if (filterModel != null) {
                filterModelList.add(filterModel);
            }
        }
        return filterModelList;
    }

    public FilterModel.Status map(FilterEntity.Status status) {