View Javadoc
1   /**
2    * Copyright 2005-2014 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.rice.krad.data.metadata.impl;
17  
18  import org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship;
19  
20  /**
21  * {@inheritDoc}
22  */
23  public class DataObjectAttributeRelationshipImpl implements DataObjectAttributeRelationship {
24  	private static final long serialVersionUID = 838360378126210069L;
25  
26  	protected String parentAttributeName;
27  	protected String childAttributeName;
28  
29  	public DataObjectAttributeRelationshipImpl() {
30  	}
31  
32      /**
33      * Gets results where the actual rows are requested.
34      *
35      * @param queryClass the type of the results to return.
36      * @param criteria the criteria to use to get the results.
37      * @param ojbCriteria the implementation-specific criteria.
38      * @param flag the indicator to whether the row count is requested in the results.
39      * @return results where the actual rows are requested.
40      */
41  	public DataObjectAttributeRelationshipImpl(String parentAttributeName, String childAttributeName) {
42  		super();
43  		this.parentAttributeName = parentAttributeName;
44  		this.childAttributeName = childAttributeName;
45  	}
46  
47      /**
48      * {@inheritDoc}
49      */
50  	@Override
51  	public String getParentAttributeName() {
52  		return parentAttributeName;
53  	}
54  
55      /**
56      * Sets the parent attribute name.
57      *
58      * @param parentAttributeName parent attribute name
59      */
60  	public void setParentAttributeName(String parentAttributeName) {
61  		this.parentAttributeName = parentAttributeName;
62  	}
63  
64      /**
65      * {@inheritDoc}
66      */
67  	@Override
68  	public String getChildAttributeName() {
69  		return childAttributeName;
70  	}
71  
72      /**
73      * Sets the child attribute name.
74      *
75      * @param childAttributeName child attribute name
76      */
77      public void setChildAttributeName(String childAttributeName) {
78  		this.childAttributeName = childAttributeName;
79  	}
80  
81      /**
82      * {@inheritDoc}
83      */
84  	@Override
85  	public String toString() {
86  		StringBuilder builder = new StringBuilder();
87  		builder.append("[parentAttributeName=").append(parentAttributeName).append(", childAttributeName=")
88  				.append(childAttributeName).append("]");
89  		return builder.toString();
90  	}
91  }