/*
 *  Copyright (C) 2016  Datamatica (dev@datamatica.pl)
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published
 *  by the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package pl.datamatica.traccar.api.dtos;

/**
 *
 * @author Jan Usarek
 */
public class ImeiNumberDto {

    private long id;
    private String imei;
    private String email;
    private String contactPhone;
    private String deviceModel;

    private String firstName;
    private String lastName;
    private String invoiceNumber;
    private String comment;

    public long getId() {
        return id;
    }

    public String getImei() {
        return imei;
    }

    public String getEmail() {
        return email;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public String getDeviceModel() {
        return deviceModel;
    }

    public void setDeviceModel(String deviceModel) {
        this.deviceModel = deviceModel;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public String getInvoiceNumber() {
        return invoiceNumber;
    }

    public String getComment() {
        return comment;
    }

    public void trimAllStrings() {
        imei = imei.trim();
        email = email.trim();
        contactPhone = contactPhone.trim();
        firstName = firstName.trim();
        lastName = lastName.trim();
        invoiceNumber = invoiceNumber.trim();
        comment = comment.trim();
    }
}

@@ -775,16 +775,62 @@
 .dtos;%0A%0A
+import org.apache.commons.lang3.StringUtils;%0A%0A
 /**%0A *%0A 
@@ -1888,18 +1888,29 @@
 i = 
-imei
+StringUtils
 .trim(
+imei
 );%0A 
@@ -1928,19 +1928,30 @@
 l = 
-ema
+StringUt
 il
+s
 .trim(
+email
 );%0A 
@@ -1972,16 +1972,33 @@
 Phone = 
+StringUtils.trim(
 contactP
@@ -2001,22 +2001,16 @@
 actPhone
-.trim(
 );%0A     
@@ -2024,16 +2024,33 @@
 tName = 
+StringUtils.trim(
 firstNam
@@ -2046,30 +2046,24 @@
 im(firstName
-.trim(
 );%0A        l
@@ -2072,24 +2072,41 @@
 tName = 
+StringUtils.trim(
 lastName
 .trim();
@@ -2097,22 +2097,16 @@
 lastName
-.trim(
 );%0A     
@@ -2124,16 +2124,33 @@
 umber = 
+StringUtils.trim(
 invoiceN
@@ -2154,22 +2154,16 @@
 ceNumber
-.trim(
 );%0A     
@@ -2179,21 +2179,32 @@
 t = 
+StringUtils.trim(
 comment
-.trim(
 );%0A 

Trim all strings in ImeiNumberDto using null safe function