View Javadoc
1   /*
2    * Copyright 2005-2006 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.coa.businessobject;
17  
18  import org.kuali.ole.sys.OLEConstants;
19  import org.kuali.ole.sys.context.SpringContext;
20  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
21  import org.kuali.rice.kim.api.identity.Person;
22  import org.kuali.rice.krad.bo.KualiCodeBase;
23  
24  /**
25   * 
26   */
27  public class ProjectCode extends KualiCodeBase implements MutableInactivatable {
28  
29      private static final long serialVersionUID = 4529316062843227897L;
30  
31      public static final String CACHE_NAME = OLEConstants.APPLICATION_NAMESPACE_CODE + "/" + "ProjectCode";
32      
33      private String projectDescription;
34      private String projectManagerUniversalId;
35      private String chartOfAccountsCode;
36      private String organizationCode;
37  
38      private Person projectManagerUniversal;
39      private Chart chartOfAccounts;
40      private Organization organization;
41  
42      /**
43       * Default no-arg constructor.
44       */
45      public ProjectCode() {
46      }
47  
48      /**
49       * Gets the projectDescription attribute.
50       * 
51       * @return Returns the projectDescription
52       */
53      public String getProjectDescription() {
54          return projectDescription;
55      }
56  
57      /**
58       * Sets the projectDescription attribute.
59       * 
60       * @param projectDescription The projectDescription to set.
61       */
62      public void setProjectDescription(String projectDescription) {
63          this.projectDescription = projectDescription;
64      }
65  
66      public Person getProjectManagerUniversal() {
67          projectManagerUniversal = SpringContext.getBean(org.kuali.rice.kim.api.identity.PersonService.class).updatePersonIfNecessary(projectManagerUniversalId, projectManagerUniversal);
68          return projectManagerUniversal;
69      }
70  
71      /**
72       * Sets the projectManagerUniversal attribute.
73       * 
74       * @param projectManagerUniversal The projectManagerUniversal to set.
75       */
76      public void setProjectManagerUniversal(Person projectManagerUniversal) {
77          this.projectManagerUniversal = projectManagerUniversal;
78      }
79  
80      /**
81       * Gets the chartOfAccounts attribute.
82       * 
83       * @return Returns the chartOfAccounts
84       */
85      public Chart getChartOfAccounts() {
86          return chartOfAccounts;
87      }
88  
89      /**
90       * Sets the chartOfAccounts attribute.
91       * 
92       * @param chartOfAccounts The chartOfAccounts to set.
93       */
94      public void setChartOfAccounts(Chart chartOfAccounts) {
95          this.chartOfAccounts = chartOfAccounts;
96      }
97  
98      /**
99       * Gets the organization attribute.
100      * 
101      * @return Returns the organization
102      */
103     public Organization getOrganization() {
104         return organization;
105     }
106 
107     /**
108      * Sets the organization attribute.
109      * 
110      * @param organization The organization to set.
111      */
112     public void setOrganization(Organization organization) {
113         this.organization = organization;
114     }
115 
116     /**
117      * @return Returns the chartOfAccountsCode.
118      */
119     public String getChartOfAccountsCode() {
120         return chartOfAccountsCode;
121     }
122 
123     /**
124      * @param chartOfAccountsCode The chartOfAccountsCode to set.
125      */
126     public void setChartOfAccountsCode(String chartOfAccountsCode) {
127         this.chartOfAccountsCode = chartOfAccountsCode;
128     }
129 
130     /**
131      * @return Returns the organizationCode.
132      */
133     public String getOrganizationCode() {
134         return organizationCode;
135     }
136 
137     /**
138      * @param organizationCode The organizationCode to set.
139      */
140     public void setOrganizationCode(String organizationCode) {
141         this.organizationCode = organizationCode;
142     }
143 
144     /**
145      * @return Returns the projectManagerUniversalId.
146      */
147     public String getProjectManagerUniversalId() {
148         return projectManagerUniversalId;
149     }
150 
151     /**
152      * @param projectManagerUniversalId The projectManagerUniversalId to set.
153      */
154     public void setProjectManagerUniversalId(String projectManagerUniversalId) {
155         this.projectManagerUniversalId = projectManagerUniversalId;
156     }
157 
158 }
159