Ejemplo n.º 1
0
 private transferFiles.model.order.Ordering createOrderingTO() {
   return new transferFiles.model.order.Ordering(
       this.getId(),
       ConvertDate.toJoda(this.getDateOrderCreated()),
       ConvertDate.toJoda(this.getDateClientsCome()),
       this.getAmountOfPeople(),
       this.getDescription(),
       this.getAdvancePayment(),
       this.whoTakenOrder != null ? this.getWhoTakenOrder().toTransferUser() : null,
       this.whoServesOrder != null ? this.getWhoServesOrder().toTransferUser() : null,
       this.getType());
 }
Ejemplo n.º 2
0
 private static Ordering createPersistentOrderingFromTO(
     transferFiles.model.order.Ordering orderingTO) {
   return new Ordering(
       orderingTO.getId(),
       ConvertDate.toJavaFromJoda(orderingTO.getDateOrderCreated()),
       ConvertDate.toJavaFromJoda(orderingTO.getDateClientsCome()),
       orderingTO.getAmountOfPeople(),
       orderingTO.getDescription(),
       orderingTO.getAdvancePayment(),
       orderingTO.getWhoTakenOrder() != null
           ? User.toPersistentUser(orderingTO.getWhoTakenOrder())
           : null,
       orderingTO.getWhoServesOrder() != null
           ? User.toPersistentUser(orderingTO.getWhoServesOrder())
           : null,
       orderingTO.getType());
 }