1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.gl.businessobject;
17
18 import java.util.Map;
19
20 import org.kuali.ole.sys.OLEPropertyConstants;
21 import org.kuali.ole.sys.businessobject.BusinessObjectStringParserFieldUtils;
22 import org.kuali.rice.krad.bo.BusinessObject;
23
24
25
26
27 public class CollectorDetailFieldUtil extends BusinessObjectStringParserFieldUtils {
28
29
30
31
32
33 @Override
34 public Class<? extends BusinessObject> getBusinessObjectClass() {
35 return CollectorDetail.class;
36 }
37
38
39
40
41
42 @Override
43 public String[] getOrderedProperties() {
44 return new String[] {
45 OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR,
46 OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE,
47 OLEPropertyConstants.ACCOUNT_NUMBER,
48 OLEPropertyConstants.SUB_ACCOUNT_NUMBER,
49 OLEPropertyConstants.FINANCIAL_OBJECT_CODE,
50 OLEPropertyConstants.FINANCIAL_SUB_OBJECT_CODE,
51 OLEPropertyConstants.FINANCIAL_BALANCE_TYPE_CODE,
52 OLEPropertyConstants.FINANCIAL_OBJECT_TYPE_CODE,
53 OLEPropertyConstants.COLLECTOR_DETAIL_SEQUENCE_NUMBER,
54 OLEPropertyConstants.FINANCIAL_DOCUMENT_TYPE_CODE,
55 OLEPropertyConstants.FINANCIAL_SYSTEM_ORIGINATION_CODE,
56 OLEPropertyConstants.DOCUMENT_NUMBER,
57 OLEPropertyConstants.COLLECTOR_DETAIL_AMOUNT,
58 OLEPropertyConstants.COLLECTOR_DETAIL_GL_CREDIT_CODE,
59 OLEPropertyConstants.COLLECTOR_DETAIL_NOTE_TEXT
60 };
61 }
62
63
64
65
66
67 public int getDetailLineTotalLength() {
68 int totalLength = 0;
69 Map<String, Integer> lengthMap = getFieldLengthMap();
70 for (String property : getOrderedProperties()) {
71 totalLength += lengthMap.get(property).intValue();
72 }
73 return totalLength;
74 }
75 }