1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package net.sf.oness.order.model.bo;
17
18 import java.util.Collection;
19 import java.util.Iterator;
20
21 /***
22 * @hibernate.class table="deliverydocketitem"
23 *
24 * @author Carlos Sanchez
25 * @version $Revision: 1.6 $
26 */
27 public class DeliveryDocketItem extends Item {
28
29 private Collection deliveryDockets, orderItems;
30
31 /***
32 * @param deliveryDockets
33 * The deliveryDockets to set.
34 */
35 public void setDeliveryDockets(Collection deliveryDockets) {
36 this.deliveryDockets = deliveryDockets;
37 }
38
39 /***
40 * @hibernate.bag table="deliverydocket_deliverydocketitem" lazy="true" order-by="deliverydocket_id desc"
41 * @hibernate.collection-key column="deliverydocketitem_id"
42 * @hibernate.collection-many-to-many column="deliverydocket_id" class="net.sf.oness.order.model.bo.DeliveryDocket"
43 *
44 * @return Returns the deliveryDockets.
45 */
46 public Collection getDeliveryDockets() {
47 return deliveryDockets;
48 }
49
50 /***
51 * @return Returns the the latest version of the delivery docket.
52 */
53 public DeliveryDocket getDeliveryDocket() {
54 Iterator iter = getDeliveryDockets().iterator();
55 return iter.hasNext() ? (DeliveryDocket) iter.next() : null;
56 }
57
58 /***
59 * @param orderItems
60 * The orderItems to set.
61 */
62 public void setOrderItems(Collection orderItems) {
63 this.orderItems = orderItems;
64 }
65
66 /***
67 * @hibernate.bag table="orderitem_deliverydocketitem" lazy="true" order-by="orderitem_id desc"
68 * @hibernate.collection-key column="deliverydocketitem_id"
69 * @hibernate.collection-many-to-many column="orderitem_id" class="net.sf.oness.order.model.bo.OrderItem"
70 *
71 * @return Returns the orderItems.
72 */
73 public Collection getOrderItems() {
74 return orderItems;
75 }
76
77 }