01: package com.completex.objective.persistency.examples.ex003.domain;
02:
03: import com.completex.objective.components.persistency.type.TracingArrayListCollectionFactory;
04: import com.completex.objective.components.persistency.type.TracingCollection;
05: import com.completex.objective.persistency.examples.ex003.pos.CustomerOrderPO;
06:
07: import java.util.List;
08: import java.util.Collection;
09:
10: /**
11: * @author Gennady Krizhevsky
12: */
13: public class Order extends CustomerOrderPO {
14:
15: private Collection orderItems = TracingArrayListCollectionFactory
16: .factory().newCollection();
17:
18: public Order() {
19: }
20:
21: public Order(Long orderId) {
22: super (orderId);
23: }
24:
25: public List getOrderItems() {
26: return (List) orderItems;
27: }
28:
29: public void setOrderItems(List orderItems) {
30: this .orderItems = orderItems;
31: }
32:
33: public void setTrace() {
34: if (orderItems instanceof TracingCollection) {
35: ((TracingCollection) orderItems).setTrace();
36: }
37: }
38:
39: public void unsetTrace() {
40: if (orderItems instanceof TracingCollection) {
41: ((TracingCollection) orderItems).unsetTrace();
42: }
43: }
44:
45: }
|