001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.data.metadata.impl; 017 018import org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship; 019 020/** 021* {@inheritDoc} 022*/ 023public class DataObjectAttributeRelationshipImpl implements DataObjectAttributeRelationship { 024 private static final long serialVersionUID = 838360378126210069L; 025 026 protected String parentAttributeName; 027 protected String childAttributeName; 028 029 public DataObjectAttributeRelationshipImpl() { 030 } 031 032 /** 033 * Gets results where the actual rows are requested. 034 * 035 * @param queryClass the type of the results to return. 036 * @param criteria the criteria to use to get the results. 037 * @param ojbCriteria the implementation-specific criteria. 038 * @param flag the indicator to whether the row count is requested in the results. 039 * @return results where the actual rows are requested. 040 */ 041 public DataObjectAttributeRelationshipImpl(String parentAttributeName, String childAttributeName) { 042 super(); 043 this.parentAttributeName = parentAttributeName; 044 this.childAttributeName = childAttributeName; 045 } 046 047 /** 048 * {@inheritDoc} 049 */ 050 @Override 051 public String getParentAttributeName() { 052 return parentAttributeName; 053 } 054 055 /** 056 * Sets the parent attribute name. 057 * 058 * @param parentAttributeName parent attribute name 059 */ 060 public void setParentAttributeName(String parentAttributeName) { 061 this.parentAttributeName = parentAttributeName; 062 } 063 064 /** 065 * {@inheritDoc} 066 */ 067 @Override 068 public String getChildAttributeName() { 069 return childAttributeName; 070 } 071 072 /** 073 * Sets the child attribute name. 074 * 075 * @param childAttributeName child attribute name 076 */ 077 public void setChildAttributeName(String childAttributeName) { 078 this.childAttributeName = childAttributeName; 079 } 080 081 /** 082 * {@inheritDoc} 083 */ 084 @Override 085 public String toString() { 086 StringBuilder builder = new StringBuilder(); 087 builder.append("[parentAttributeName=").append(parentAttributeName).append(", childAttributeName=") 088 .append(childAttributeName).append("]"); 089 return builder.toString(); 090 } 091}