View Javadoc
1   /*
2    * Copyright 2007-2009 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.gl.batch;
17  
18  import org.kuali.ole.sys.OLEPropertyConstants;
19  import org.kuali.ole.sys.businessobject.BusinessObjectStringParserFieldUtils;
20  import org.kuali.rice.krad.bo.BusinessObject;
21  
22  /**
23   * This class has utility methods for parsing CollectorBatch from Strings for trailer record
24   */
25  public class CollectorBatchTrailerRecordFieldUtil extends BusinessObjectStringParserFieldUtils {
26  
27      /**
28       * Returns the class to parse into - CollectorBatch
29       * @see org.kuali.ole.sys.businessobject.BusinessObjectStringParserFieldUtils#getBusinessObjectClass()
30       */
31      @Override
32      public Class<? extends BusinessObject> getBusinessObjectClass() {
33          return CollectorBatch.class;
34      }
35  
36      /**
37       * Returns the fields to be parsed from a String, in order, to form a CollectorBatch
38       * @see org.kuali.ole.sys.businessobject.BusinessObjectStringParserFieldUtils#getOrderedProperties()
39       */
40      @Override
41      public String[] getOrderedProperties() {
42          return new String[] {
43                  OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR,
44                  OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE,
45                  OLEPropertyConstants.ORGANIZATION_CODE,
46                  OLEPropertyConstants.TRANSMISSION_DATE,
47                  OLEPropertyConstants.COLLECTOR_BATCH_RECORD_TYPE,
48                  OLEPropertyConstants.TRAILER_RECORD_FIRST_EMPTY_FIELD,
49                  OLEPropertyConstants.TOTAL_RECORDS,
50                  OLEPropertyConstants.TRAILER_RECORD_SECOND_EMPTY_FIELD,
51                  OLEPropertyConstants.TOTAL_AMOUNT
52          };
53      }
54  }