Tim-connector: OrderSyncInfo entity
This commit is contained in:
parent
07c2ccaec9
commit
f1762336ee
1 changed files with 85 additions and 0 deletions
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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 <m.ghiorghis@antoniusziekenhuis.nl>
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue