Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/****/package in.shop2020.warehouse.domain;import in.shop2020.warehouse.ScanType;import java.util.Date;/*** @author mandeep**/public class Scan {private long id;private long inventoryItemId;private long quantity;private Long orderId; // The order that was fulfilled with thin scan!private long warehouseId;private ScanType type;private Date scannedAt;public static Scan create(in.shop2020.warehouse.Scan thriftScan) {Scan scan = new Scan();scan.id = thriftScan.getId();scan.inventoryItemId = thriftScan.getInventoryItemId();scan.quantity = thriftScan.getQuantity();scan.warehouseId = thriftScan.getWarehouseId();scan.type = thriftScan.getType();scan.scannedAt = new Date(thriftScan.getScannedAt());if (thriftScan.isSetOrderId()) {scan.orderId = thriftScan.getOrderId();}return scan;}public in.shop2020.warehouse.Scan convert() {in.shop2020.warehouse.Scan scan = new in.shop2020.warehouse.Scan();scan.setId(id);scan.setInventoryItemId(inventoryItemId);scan.setQuantity(quantity);scan.setWarehouseId(warehouseId);scan.setType(type);scan.setScannedAt(scannedAt.getTime());if (orderId != null) {scan.setOrderId(orderId);}return scan;}public long getId() {return id;}public void setId(long id) {this.id = id;}public long getInventoryItemId() {return inventoryItemId;}public void setInventoryItemId(long inventoryItemId) {this.inventoryItemId = inventoryItemId;}public long getQuantity() {return quantity;}public void setQuantity(long quantity) {this.quantity = quantity;}public Long getOrderId() {return orderId;}public void setOrderId(Long orderId) {this.orderId = orderId;}public long getWarehouseId() {return warehouseId;}public void setWarehouseId(long warehouseId) {this.warehouseId = warehouseId;}public ScanType getType() {return type;}public void setType(ScanType type) {this.type = type;}public Date getScannedAt() {return scannedAt;}public void setScannedAt(Date scannedAt) {this.scannedAt = scannedAt;}}