View Javadoc
1   /*
2    * Copyright 2008 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.sys.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
21  import org.kuali.rice.krad.datadictionary.AttributeDefinition;
22  
23  public class BusinessObjectProperty extends TransientBusinessObjectBase {
24      private String namespaceCode;
25      private String componentClass;
26      private String propertyName;
27      private String propertyLabel;
28  
29      private BusinessObjectComponent businessObjectComponent;
30      
31      public BusinessObjectProperty() {
32      }
33      
34      public BusinessObjectProperty(BusinessObjectComponent businessObjectComponent, AttributeDefinition attributeDefinition) {
35          setBusinessObjectComponent(businessObjectComponent);
36          setNamespaceCode(businessObjectComponent.getNamespaceCode());
37          setComponentClass(businessObjectComponent.getComponentClass());
38          setPropertyName(attributeDefinition.getName());
39          setPropertyLabel(attributeDefinition.getLabel());
40      }
41  
42      public String getNamespaceCode() {
43          return namespaceCode;
44      }
45  
46      public void setNamespaceCode(String namespaceCode) {
47          this.namespaceCode = namespaceCode;
48      }
49  
50      public String getComponentClass() {
51          return componentClass;
52      }
53  
54      public void setComponentClass(String componentClass) {
55          this.componentClass = componentClass;
56      }
57  
58      public String getPropertyName() {
59          return propertyName;
60      }
61  
62      public void setPropertyName(String propertyName) {
63          this.propertyName = propertyName;
64      }
65  
66      public String getPropertyLabel() {
67          return propertyLabel;
68      }
69  
70      public void setPropertyLabel(String propertyLabel) {
71          this.propertyLabel = propertyLabel;
72      }
73  
74      public BusinessObjectComponent getBusinessObjectComponent() {
75          return businessObjectComponent;
76      }
77  
78      public void setBusinessObjectComponent(BusinessObjectComponent businessObjectComponent) {
79          this.businessObjectComponent = businessObjectComponent;
80      }
81  
82      
83      protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
84          LinkedHashMap<String, String> toString = new LinkedHashMap<String, String>();
85          toString.put("namespaceCode", getNamespaceCode());
86          toString.put("componentClass", getComponentClass());
87          toString.put("propertyName", getPropertyName());
88          return toString;
89      }
90  }