1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.test.document;
17
18 import javax.persistence.Column;
19 import javax.persistence.Entity;
20 import javax.persistence.Table;
21
22 import org.kuali.rice.kew.dto.DocumentRouteLevelChangeDTO;
23 import org.kuali.rice.krad.document.TransactionalDocumentBase;
24 import org.kuali.rice.krad.workflow.SearchAttributeIndexRequestTest;
25
26
27
28
29
30
31
32 @Entity
33 @Table(name="TST_SEARCH_ATTR_INDX_TST_DOC_T")
34 public class SearchAttributeIndexTestDocument extends TransactionalDocumentBase {
35 static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(SearchAttributeIndexRequestTest.class);
36 private static final long serialVersionUID = -2290510385815271758L;
37 @Column(name="RTE_LVL_CNT")
38 private int routeLevelCount = 0;
39 @Column(name="CNSTNT_STR")
40 private String constantString;
41 @Column(name="RTD_STR")
42 private String routedString;
43 @Column(name="HLD_RTD_STR")
44 private String heldRoutedString;
45 @Column(name="RD_ACCS_CNT")
46 private int readAccessCount = 0;
47
48
49
50
51
52
53 public void initialize(String constantString, String routedString) {
54 this.constantString = constantString;
55 this.heldRoutedString = routedString;
56 }
57
58
59
60
61 public int getRouteLevelCount() {
62 readAccessCount += 1;
63 return routeLevelCount;
64 }
65
66
67
68
69 public String getConstantString() {
70 return constantString;
71 }
72
73
74
75
76 public String getRoutedString() {
77 return routedString;
78 }
79
80
81
82
83 public int getReadAccessCount() {
84 return this.readAccessCount;
85 }
86
87
88
89
90
91
92 @Override
93 public void doRouteLevelChange(DocumentRouteLevelChangeDTO levelChangeEvent) {
94 super.doRouteLevelChange(levelChangeEvent);
95 routeLevelCount += 1;
96 if (routedString == null) {
97 routedString = heldRoutedString;
98 }
99 LOG.info("Performing route level change on SearchAttributeIndexTestDocument; routeLevelCount is "+routeLevelCount);
100 }
101
102 }