orderMngmntWebapp\src\orderMngr\domain\order\Order.java
 
/* * Copyright (c) 2006-2012 Rogério Liesenfeld * This file is subject to the terms of the MIT license (see LICENSE.txt). */
/*...*/
5 
package orderMngr.domain.order;
 
 
import java.util.*; import javax.persistence.*;
import ...
 
 
/** * A business order to buy products. */
/*...*/
13 
@Entity
14 
public class Order
15 
{
16 
   @Id
17 
   private int number;
 
19 
   private String customerId;
 
2117
   @OneToMany
  1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33
  2. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 70, 85
  3. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 31, 58
  4. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 48
  5. orderMngr.domain.order.OrderRepositoryTest#createOrder: 28
  6. orderMngr.domain.order.OrderRepositoryTest#removeOrder: 60
  7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 67
  8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 33
22 
   private List<OrderItem> items = new LinkedList<OrderItem>();
 
240
   public Order() {}
     
    26 
       public Order(int number, String customerId)
    2717
       {
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33
    2. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 70, 85
    3. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 31, 58
    4. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 48
    5. orderMngr.domain.order.OrderRepositoryTest#createOrder: 28
    6. orderMngr.domain.order.OrderRepositoryTest#removeOrder: 60
    7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 67
    8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 33
    2817
          this.number = number;
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33
    2. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 70, 85
    3. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 31, 58
    4. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 48
    5. orderMngr.domain.order.OrderRepositoryTest#createOrder: 28
    6. orderMngr.domain.order.OrderRepositoryTest#removeOrder: 60
    7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 67
    8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 33
    2917
          this.customerId = customerId;
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33
    2. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 70, 85
    3. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 31, 58
    4. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 48
    5. orderMngr.domain.order.OrderRepositoryTest#createOrder: 28
    6. orderMngr.domain.order.OrderRepositoryTest#removeOrder: 60
    7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 67
    8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 33
    3017
       }
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33
    2. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 70, 85
    3. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 31, 58
    4. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 48
    5. orderMngr.domain.order.OrderRepositoryTest#createOrder: 28
    6. orderMngr.domain.order.OrderRepositoryTest#removeOrder: 60
    7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 67
    8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 33
     
    3228
       public int getNumber() { return number; }
    1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 72, 85, 87
    2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 36, 45, 58x2, 61
    3. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 50, 52
    4. orderMngr.domain.order.OrderRepositoryTest#createOrder: 32
    3311
       public String getCustomerId() { return customerId; }
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 37
    2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 36
    3. orderMngr.domain.order.OrderRepositoryTest#updateOrder: 50, 52
    4. orderMngr.domain.order.OrderRepositoryTest#createOrder: 32, 34
    5. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#updateOrder: 81
    6. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 61x2
    7. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 182
    8. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 169
    3412
       public List<OrderItem> getItems() { return items; }
    1. orderMngr.domain.order.OrderFactoryTest#createOrder: 33, 38
    2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 33, 58, 62, 63
    3. orderMngr.domain.order.OrderRepositoryTest#createOrder: 30, 32
    4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#createOrder: 35, 61
     
    36 
       @Override
    37 
       public boolean equals(Object o)
    38 
       {
    5 Path coverage: 1/4 A: 0 B: 0 C: 0 D: 5
    395
          if (this == o) return true;
    1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 85, 87
    2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 61
    3. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 184
    4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 171
      405
            if (o == null || getClass() != o.getClass()) return false;
      1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 85, 87
      2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 61
      3. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 184
      4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 171
      1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 85, 87
      2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 61
      3. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 184
      4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 171
         
        425
              Order order = (Order) o;
        1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 85, 87
        2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 61
        3. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 184
        4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 171
         
        445
              return number == order.getNumber();
        1. orderMngr.domain.order.OrderFindersTest#findOrderByCustomer: 85, 87
        2. orderMngr.domain.order.OrderFindersTest#findOrderByNumber: 61
        3. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByCustomer: 184
        4. orderMngr.domain.order.OrderRepository_MockupsAPI_Test#findOrderByNumber: 171
        45 
           }
         
        47 
           @Override
        48 
           public int hashCode()
        49 
           {
        500
              return number;
          51 
             }
          52 
          }