diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderSyncInfo.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderSyncInfo.java new file mode 100644 index 000000000..f6ef418fd --- /dev/null +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderSyncInfo.java @@ -0,0 +1,85 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2013 St. Antoniusziekenhuis + * + * 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 . + */ + +package org.libreplan.business.orders.entities; + +import java.util.Date; + +import org.apache.commons.lang.Validate; +import org.libreplan.business.common.BaseEntity; + +/** + * OrderSyncInfo entity + * + * @author Miciele Ghiorghis + */ +public class OrderSyncInfo extends BaseEntity { + + private Date lastSyncDate; + private String label; + private String code; + private Order order; + + public static OrderSyncInfo create(Order order) { + Validate.notNull(order); + return create(new OrderSyncInfo(order)); + } + + protected OrderSyncInfo() { + + } + + private OrderSyncInfo(Order order) { + this.lastSyncDate = new Date(); + this.order = order; + } + + public Date getLastSyncDate() { + return lastSyncDate; + } + + public void setLastSyncDate(Date lastSyncDate) { + this.lastSyncDate = lastSyncDate; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Order getOrder() { + return order; + } + + public void setOrder(Order order) { + this.order = order; + } + +}