/*
 * Copyright (C) 2017 LibreCCM Foundation.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301  USA
 */
package com.arsdigita.cms.ui.lifecycle;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
 */
class ItemPhaseTableRow implements Serializable {

    private static final long serialVersionUID = -8947185134493863779L;

    private long phaseId;
    private String name;
    private String description;
    private Date startDate;
    private Date endDate;

    public long getPhaseId() {
        return phaseId;
    }

    public void setPhaseId(final long phaseId) {
        this.phaseId = phaseId;
    }

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(final String description) {
        this.description = description;
    }

    public Date getStartDate() {
        if (startDate == null) {
            return null;
        } else {
            return new Date(startDate.getTime());
        }
    }

    public void setStartDate(final Date startDate) {
        if (startDate == null) {
            this.startDate = startDate;
        } else {
            this.startDate = new Date(startDate.getTime());
        }
    }

    public Date getEndDate() {
        if (endDate == null) {
            return null;
        } else {
            return new Date(endDate.getTime());
        }
    }

    public void setEndDate(final Date endDate) {
        if (endDate == null) {
            this.endDate = endDate;
        } else {
            this.endDate = new Date(endDate.getTime());
        }
    }

}
