Coverage Report - org.kuali.rice.kns.service.impl.BusinessObjectDictionaryServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
BusinessObjectDictionaryServiceImpl
0%
0/321
0%
0/176
2.631
 
 1  
 /*
 2  
  * Copyright 2005-2007 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.kns.service.impl;
 17  
 
 18  
 import java.beans.IndexedPropertyDescriptor;
 19  
 import java.beans.PropertyDescriptor;
 20  
 import java.lang.reflect.InvocationTargetException;
 21  
 import java.util.ArrayList;
 22  
 import java.util.Collection;
 23  
 import java.util.HashSet;
 24  
 import java.util.Iterator;
 25  
 import java.util.List;
 26  
 import java.util.Set;
 27  
 
 28  
 import org.apache.commons.beanutils.PropertyUtils;
 29  
 import org.apache.commons.lang.StringUtils;
 30  
 import org.apache.log4j.Logger;
 31  
 import org.kuali.rice.kew.exception.WorkflowException;
 32  
 import org.kuali.rice.kns.bo.BusinessObject;
 33  
 import org.kuali.rice.kns.bo.PersistableBusinessObject;
 34  
 import org.kuali.rice.kns.datadictionary.BusinessObjectEntry;
 35  
 import org.kuali.rice.kns.datadictionary.FieldDefinition;
 36  
 import org.kuali.rice.kns.datadictionary.InquiryDefinition;
 37  
 import org.kuali.rice.kns.datadictionary.InquirySectionDefinition;
 38  
 import org.kuali.rice.kns.datadictionary.LookupDefinition;
 39  
 import org.kuali.rice.kns.datadictionary.MaintenanceDocumentEntry;
 40  
 import org.kuali.rice.kns.exception.IntrospectionException;
 41  
 import org.kuali.rice.kns.inquiry.InquiryAuthorizer;
 42  
 import org.kuali.rice.kns.inquiry.InquiryAuthorizerBase;
 43  
 import org.kuali.rice.kns.inquiry.InquiryPresentationController;
 44  
 import org.kuali.rice.kns.inquiry.InquiryPresentationControllerBase;
 45  
 import org.kuali.rice.kns.lookup.valueFinder.ValueFinder;
 46  
 import org.kuali.rice.kns.service.BusinessObjectDictionaryService;
 47  
 import org.kuali.rice.kns.service.DataDictionaryService;
 48  
 import org.kuali.rice.kns.service.KNSServiceLocator;
 49  
 import org.kuali.rice.kns.service.PersistenceStructureService;
 50  
 import org.kuali.rice.kns.util.ObjectUtils;
 51  
 
 52  
 /**
 53  
  * This class is the service implementation for the BusinessObjectDictionary.
 54  
  * This is the default, Kuali delivered implementation which leverages the
 55  
  * DataDictionaryService.
 56  
  */
 57  0
 public class BusinessObjectDictionaryServiceImpl implements
 58  
                 BusinessObjectDictionaryService {
 59  0
         private static Logger LOG = Logger
 60  
                         .getLogger(BusinessObjectDictionaryServiceImpl.class);
 61  
 
 62  
     private DataDictionaryService dataDictionaryService;
 63  
     private PersistenceStructureService persistenceStructureService;
 64  
 
 65  
         public <T extends BusinessObject> InquiryAuthorizer getInquiryAuthorizer(
 66  
                         Class<T> businessObjectClass) {
 67  0
                 Class inquiryAuthorizerClass = getDataDictionaryService()
 68  
                                 .getDataDictionary().getBusinessObjectEntry(
 69  
                                                 businessObjectClass.getName()).getInquiryDefinition()
 70  
                                 .getAuthorizerClass();
 71  0
                 if (inquiryAuthorizerClass == null) {
 72  0
                         inquiryAuthorizerClass = InquiryAuthorizerBase.class;
 73  
                 }
 74  
                 try {
 75  0
                         return (InquiryAuthorizer) inquiryAuthorizerClass.newInstance();
 76  0
                 } catch (Exception e) {
 77  0
                         throw new RuntimeException(
 78  
                                         "Unable to instantiate InquiryAuthorizer class: "
 79  
                                                         + inquiryAuthorizerClass, e);
 80  
                 }
 81  
         }
 82  
 
 83  
         public <T extends BusinessObject> InquiryPresentationController getInquiryPresentationController(
 84  
                         Class<T> businessObjectClass) {
 85  0
                 Class inquiryPresentationControllerClass = getDataDictionaryService()
 86  
                                 .getDataDictionary().getBusinessObjectEntry(
 87  
                                                 businessObjectClass.getName()).getInquiryDefinition()
 88  
                                 .getPresentationControllerClass();
 89  0
                 if (inquiryPresentationControllerClass == null) {
 90  0
                         inquiryPresentationControllerClass = InquiryPresentationControllerBase.class;
 91  
                 }
 92  
                 try {
 93  0
                         return (InquiryPresentationController) inquiryPresentationControllerClass
 94  
                                         .newInstance();
 95  0
                 } catch (Exception e) {
 96  0
                         throw new RuntimeException(
 97  
                                         "Unable to instantiate InquiryPresentationController class: "
 98  
                                                         + inquiryPresentationControllerClass, e);
 99  
                 }
 100  
         }
 101  
 
 102  
     /**
 103  
      * Uses the DataDictionaryService.
 104  
      *
 105  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getBusinessObjectEntries()
 106  
      */
 107  
     public List getBusinessObjectClassnames() {
 108  0
                 return getDataDictionaryService().getDataDictionary()
 109  
                                 .getBusinessObjectClassNames();
 110  
     }
 111  
 
 112  
     /**
 113  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isLookupable(java.lang.Class)
 114  
      */
 115  
     public Boolean isLookupable(Class businessObjectClass) {
 116  0
         Boolean isLookupable = Boolean.FALSE;
 117  
 
 118  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 119  0
         if (entry != null) {
 120  0
             isLookupable = Boolean.valueOf(entry.hasLookupDefinition());
 121  
         }
 122  
 
 123  0
         return isLookupable;
 124  
     }
 125  
 
 126  
     /**
 127  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isInquirable(java.lang.Class)
 128  
      */
 129  
     public Boolean isInquirable(Class businessObjectClass) {
 130  0
         Boolean isInquirable = Boolean.FALSE;
 131  
 
 132  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 133  0
         if (entry != null) {
 134  0
             isInquirable = Boolean.valueOf(entry.hasInquiryDefinition());
 135  
         }
 136  
 
 137  0
         return isInquirable;
 138  
     }
 139  
 
 140  
     /**
 141  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isMaintainable(java.lang.Class)
 142  
      */
 143  
     public Boolean isMaintainable(Class businessObjectClass) {
 144  0
         Boolean isMaintainable = Boolean.FALSE;
 145  
 
 146  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 147  0
         if (entry != null) {
 148  0
                         isMaintainable = Boolean
 149  
                                         .valueOf(getMaintenanceDocumentEntry(businessObjectClass) != null);
 150  
         }
 151  
 
 152  0
         return isMaintainable;
 153  
     }
 154  
     
 155  
 
 156  
     /**
 157  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isExportable(java.lang.Class)
 158  
          */
 159  
         public Boolean isExportable(Class businessObjectClass) {
 160  0
                 Boolean isExportable = Boolean.FALSE;
 161  
                 
 162  0
                 BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 163  0
         if (entry != null) {
 164  0
             isExportable = entry.getExporterClass() != null;
 165  
         }
 166  
 
 167  0
         return isExportable;
 168  
         }
 169  
 
 170  
         /**
 171  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupFieldNames(java.lang.Class)
 172  
      */
 173  
     public List getLookupFieldNames(Class businessObjectClass) {
 174  0
         List results = null;
 175  
 
 176  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 177  0
         if (lookupDefinition != null) {
 178  0
             results = lookupDefinition.getLookupFieldNames();
 179  
         }
 180  
 
 181  0
         return results;
 182  
     }
 183  
 
 184  
 
 185  
     /**
 186  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupTitle(java.lang.Class)
 187  
      */
 188  
     public String getLookupTitle(Class businessObjectClass) {
 189  0
         String lookupTitle = "";
 190  
 
 191  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 192  0
         if (lookupDefinition != null) {
 193  0
             lookupTitle = lookupDefinition.getTitle();
 194  
         }
 195  
 
 196  0
         return lookupTitle;
 197  
     }
 198  
 
 199  
     /**
 200  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupMenuBar(java.lang.Class)
 201  
      */
 202  
     public String getLookupMenuBar(Class businessObjectClass) {
 203  0
         String menubar = "";
 204  
 
 205  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 206  0
         if (lookupDefinition != null) {
 207  0
             if (lookupDefinition.hasMenubar()) {
 208  0
                 menubar = lookupDefinition.getMenubar();
 209  
             }
 210  
         }
 211  
 
 212  0
         return menubar;
 213  
     }
 214  
 
 215  
 
 216  
     /**
 217  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getExtraButtonSource(java.lang.Class)
 218  
      */
 219  
     public String getExtraButtonSource(Class businessObjectClass) {
 220  0
         String buttonSource = "";
 221  
 
 222  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 223  0
         if (lookupDefinition != null) {
 224  0
             if (lookupDefinition.hasExtraButtonSource()) {
 225  0
                 buttonSource = lookupDefinition.getExtraButtonSource();
 226  
             }
 227  
         }
 228  
 
 229  0
         return buttonSource;
 230  
     }
 231  
 
 232  
     /**
 233  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getExtraButtonParams(java.lang.Class)
 234  
      */
 235  
     public String getExtraButtonParams(Class businessObjectClass) {
 236  0
         String buttonParams = "";
 237  
 
 238  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 239  0
         if (lookupDefinition != null) {
 240  0
             if (lookupDefinition.hasExtraButtonParams()) {
 241  0
                 buttonParams = lookupDefinition.getExtraButtonParams();
 242  
             }
 243  
         }
 244  
 
 245  0
         return buttonParams;
 246  
     }
 247  
 
 248  
     
 249  
     /**
 250  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getSearchIconOverride(java.lang.Class)
 251  
      */
 252  
     public String getSearchIconOverride(Class businessObjectClass) {
 253  0
         String iconUrl = "";
 254  
 
 255  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 256  0
         if (lookupDefinition != null) {
 257  0
             if (lookupDefinition.hasSearchIconOverride()) {
 258  0
                 iconUrl = lookupDefinition.getSearchIconOverride();
 259  
             }
 260  
         }
 261  
 
 262  0
         return iconUrl;
 263  
     }
 264  
 
 265  
     
 266  
     /**
 267  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupDefaultSortFieldName(java.lang.Class)
 268  
      */
 269  
     public List getLookupDefaultSortFieldNames(Class businessObjectClass) {
 270  0
         List defaultSort = null;
 271  
 
 272  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 273  0
         if (lookupDefinition != null) {
 274  0
             if (lookupDefinition.hasDefaultSort()) {
 275  0
                                 defaultSort = lookupDefinition.getDefaultSort()
 276  
                                                 .getAttributeNames();
 277  
             }
 278  
         }
 279  0
         if (defaultSort == null) {
 280  0
             defaultSort = new ArrayList();
 281  
         }
 282  
 
 283  0
         return defaultSort;
 284  
     }
 285  
 
 286  
     /**
 287  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupResultFieldNames(java.lang.Class)
 288  
      */
 289  
     public List<String> getLookupResultFieldNames(Class businessObjectClass) {
 290  0
         List<String> results = null;
 291  
 
 292  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 293  0
         if (lookupDefinition != null) {
 294  0
             results = lookupDefinition.getResultFieldNames();
 295  
         }
 296  
 
 297  0
         return results;
 298  
     }
 299  
 
 300  
 
 301  
     /**
 302  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupResultFieldMaxLength(java.lang.Class,
 303  
          *      java.lang.String)
 304  
      */
 305  
         public Integer getLookupResultFieldMaxLength(Class businessObjectClass,
 306  
                         String resultFieldName) {
 307  0
                 Integer resultFieldMaxLength = null;
 308  
 
 309  0
                 LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 310  0
                 if (lookupDefinition != null) {
 311  0
                         FieldDefinition field = lookupDefinition.getResultField(resultFieldName);
 312  0
                         if (field != null) {
 313  0
                                 resultFieldMaxLength = field.getMaxLength();
 314  
                         }
 315  
                 }
 316  
 
 317  0
                 return resultFieldMaxLength;
 318  
     }
 319  
 
 320  
     /**
 321  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupResultSetLimit(java.lang.Class)
 322  
      */
 323  
     public Integer getLookupResultSetLimit(Class businessObjectClass) {
 324  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 325  0
         if ( lookupDefinition != null ) {
 326  0
                         return lookupDefinition.getResultSetLimit(); // TODO: stupid, change
 327  
                                                                                                                         // to return int
 328  
         } else {
 329  0
             return null;
 330  
         }
 331  
     }
 332  
 
 333  
         /**
 334  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupNumberOfColumns(java.lang.Class)
 335  
          */
 336  
         public Integer getLookupNumberOfColumns(Class businessObjectClass) {
 337  
                 // default to 1
 338  0
                 int numberOfColumns = 1;
 339  
 
 340  0
                 LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 341  0
                 if (lookupDefinition != null) {
 342  0
                         if (lookupDefinition.getNumOfColumns() > 1) {
 343  0
                                 numberOfColumns = lookupDefinition.getNumOfColumns();
 344  
                         }
 345  
                 }
 346  
 
 347  0
                 return numberOfColumns;
 348  
         }
 349  
 
 350  
         /**
 351  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupAttributeRequired(java.lang.Class,
 352  
          *      java.lang.String)
 353  
      */
 354  
         public Boolean getLookupAttributeRequired(Class businessObjectClass,
 355  
                         String attributeName) {
 356  0
         Boolean isRequired = null;
 357  
 
 358  0
                 FieldDefinition definition = getLookupFieldDefinition(
 359  
                                 businessObjectClass, attributeName);
 360  0
         if (definition != null) {
 361  0
             isRequired = Boolean.valueOf(definition.isRequired());
 362  
         }
 363  
 
 364  0
         return isRequired;
 365  
     }
 366  
 
 367  
         /**
 368  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupAttributeReadOnly(java.lang.Class,
 369  
          *      java.lang.String)
 370  
          */
 371  
         public Boolean getLookupAttributeReadOnly(Class businessObjectClass, String attributeName) {
 372  0
                 Boolean readOnly = null;
 373  
 
 374  0
                 FieldDefinition definition = getLookupFieldDefinition(businessObjectClass, attributeName);
 375  0
                 if (definition != null) {
 376  0
                         readOnly = Boolean.valueOf(definition.isReadOnly());
 377  
                 }
 378  
 
 379  0
                 return readOnly;
 380  
         }
 381  
 
 382  
         /**
 383  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquiryFieldNames(java.lang.Class,
 384  
          *      java.lang.String)
 385  
      */
 386  
         public List getInquiryFieldNames(Class businessObjectClass,
 387  
                         String sectionTitle) {
 388  0
         List results = null;
 389  
 
 390  0
                 InquirySectionDefinition inquirySection = getInquiryDefinition(
 391  
                                 businessObjectClass).getInquirySection(sectionTitle);
 392  0
         if (inquirySection != null) {
 393  0
             results = inquirySection.getInquiryFieldNames();
 394  
         }
 395  
 
 396  0
         return results;
 397  
     }
 398  
 
 399  
     /**
 400  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquirySections(java.lang.Class)
 401  
      */
 402  
     public List<InquirySectionDefinition> getInquirySections(Class businessObjectClass) {
 403  0
         List<InquirySectionDefinition> results = null;
 404  
 
 405  0
                 results = getInquiryDefinition(businessObjectClass)
 406  
                                 .getInquirySections();
 407  
 
 408  0
         return results;
 409  
     }
 410  
 
 411  
     /**
 412  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquiryTitle(java.lang.Class)
 413  
      */
 414  
     public String getInquiryTitle(Class businessObjectClass) {
 415  0
         String title = "";
 416  
 
 417  0
         InquiryDefinition inquiryDefinition = getInquiryDefinition(businessObjectClass);
 418  0
         if (inquiryDefinition != null) {
 419  0
             title = inquiryDefinition.getTitle();
 420  
         }
 421  
 
 422  0
         return title;
 423  
     }
 424  
 
 425  
     /**
 426  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquirableClass(java.lang.Class)
 427  
      */
 428  
     public Class getInquirableClass(Class businessObjectClass) {
 429  0
         Class clazz = null;
 430  
 
 431  0
         InquiryDefinition inquiryDefinition = getInquiryDefinition(businessObjectClass);
 432  0
         if (inquiryDefinition != null) {
 433  0
             clazz = inquiryDefinition.getInquirableClass();
 434  
         }
 435  
 
 436  0
         return clazz;
 437  
     }
 438  
 
 439  
     /**
 440  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getMaintainableTitle(java.lang.Class)
 441  
      */
 442  
     public String getMaintainableLabel(Class businessObjectClass) {
 443  0
         String label = "";
 444  
 
 445  
         try {
 446  0
             MaintenanceDocumentEntry entry = getMaintenanceDocumentEntry(businessObjectClass);
 447  0
             if (entry != null) {
 448  0
                 label = KNSServiceLocator.getWorkflowInfoService().getDocType(entry.getDocumentTypeName()).getDocTypeLabel();
 449  
             }
 450  
 
 451  0
         } catch (WorkflowException e) {
 452  0
             throw new RuntimeException("Caught Exception trying to get the document type", e);
 453  0
         }
 454  
 
 455  0
         return label;
 456  
     }
 457  
 
 458  
     /**
 459  
      *
 460  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupableID(java.lang.Class)
 461  
      */
 462  
     public String getLookupableID(Class businessObjectClass) {
 463  0
         String lookupableID = null;
 464  
 
 465  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 466  0
         if (lookupDefinition != null) {
 467  0
             lookupableID = lookupDefinition.getLookupableID();
 468  
         }
 469  
 
 470  0
         return lookupableID;
 471  
     }
 472  
 
 473  
 
 474  
     /**
 475  
          * Recurses down the updatable references and collections of a BO,
 476  
          * uppercasing those attributes which are marked as needing to be uppercased
 477  
          * in the data dictionary. Updatability of a reference or collection is
 478  
          * defined by the PersistenceStructureService
 479  
      *
 480  
          * @param bo
 481  
          *            the BO to uppercase
 482  
      *
 483  
      * @see PersistenceStructureService#isCollectionUpdatable(Class, String)
 484  
      * @see PersistenceStructureService#isReferenceUpdatable(Class, String)
 485  
      * @see DataDictionaryService#getAttributeForceUppercase(Class, String)
 486  
      */
 487  
     public void performForceUppercase(BusinessObject bo) {
 488  0
             performForceUppercaseCycleSafe(bo, new HashSet<BusinessObject>());
 489  0
     }
 490  
     
 491  
     /**
 492  
      * Handles recursion for performForceUppercase in a cycle-safe manner,
 493  
      * keeping track of visited BusinessObjects to prevent infinite recursion.
 494  
      */
 495  
     protected void performForceUppercaseCycleSafe(BusinessObject bo, Set<BusinessObject> visited) {
 496  0
             if (visited.contains(bo)) {
 497  0
                     return;
 498  
             } else {
 499  0
                     visited.add(bo);
 500  
             }
 501  0
                 PropertyDescriptor descriptors[] = PropertyUtils
 502  
                                 .getPropertyDescriptors(bo);
 503  0
         for (int i = 0; i < descriptors.length; ++i) {
 504  
             try {
 505  0
                 if (descriptors[i] instanceof IndexedPropertyDescriptor) {
 506  
                                         // Skip this case because PropertyUtils.getProperty(bo,
 507  
                                         // descriptors[i].getName()) will throw a
 508  
                     // NoSuchMethodException on those. These
 509  
                                         // fields are usually convenience methods in the BO and in
 510  
                                         // the below code we anyway wouldn't know which index
 511  
                     // .toUpperCase().
 512  
                                 } else {
 513  0
                                         Object nestedObject = ObjectUtils.getPropertyValue(bo,
 514  
                                                         descriptors[i].getName());
 515  0
                                         if (ObjectUtils.isNotNull(nestedObject)
 516  
                                                         && nestedObject instanceof BusinessObject) {
 517  0
                                                 if (persistenceStructureService
 518  
                                                                 .isPersistable(nestedObject.getClass())) {
 519  
                                 try {
 520  0
                                                                 if (persistenceStructureService.hasReference(bo
 521  
                                                                                 .getClass(), descriptors[i].getName())) {
 522  0
                                                                         if (persistenceStructureService
 523  
                                                                                         .isReferenceUpdatable(
 524  
                                                                                                         bo.getClass(),
 525  
                                                                                                         descriptors[i].getName())) {
 526  0
                                                                                 if (persistenceStructureService
 527  
                                                                                                 .getForeignKeyFieldsPopulationState(
 528  
                                                                                                                 (PersistableBusinessObject) bo,
 529  
                                                                                                                 descriptors[i]
 530  
                                                                                                                                 .getName())
 531  
                                                                                                 .isAllFieldsPopulated()) {
 532  
                                                                                         // check FKs to prevent probs caused
 533  
                                                                                         // by referential integrity problems
 534  0
                                             performForceUppercaseCycleSafe((BusinessObject) nestedObject, visited);
 535  
                                     }
 536  
                                     }
 537  
                                 }
 538  0
                                 } catch (org.kuali.rice.kns.exception.ReferenceAttributeNotAnOjbReferenceException ranaore) {
 539  0
                                                                 LOG.debug("Propery " + descriptors[i].getName()
 540  
                                                                                 + " is not a foreign key reference.");
 541  0
                                 }
 542  
                             }
 543  0
                     } else if (nestedObject instanceof String) {
 544  0
                                                 if (dataDictionaryService.isAttributeDefined(
 545  
                                                                 bo.getClass(), descriptors[i].getName())
 546  
                                                                 .booleanValue()
 547  
                                                                 && dataDictionaryService
 548  
                                                                                 .getAttributeForceUppercase(
 549  
                                                                                                 bo.getClass(),
 550  
                                                                                                 descriptors[i].getName())
 551  
                                                                                 .booleanValue()) {
 552  0
                             String curValue = (String) nestedObject;
 553  0
                                                         PropertyUtils.setProperty(bo, descriptors[i]
 554  
                                                                         .getName(), curValue.toUpperCase());
 555  0
                         }
 556  
                                         } else {
 557  0
                                                 if (ObjectUtils.isNotNull(nestedObject)
 558  
                                                                 && nestedObject instanceof Collection) {
 559  0
                                                         if (persistenceStructureService.hasCollection(bo
 560  
                                                                         .getClass(), descriptors[i].getName())) {
 561  0
                                                                 if (persistenceStructureService
 562  
                                                                                 .isCollectionUpdatable(bo.getClass(),
 563  
                                                                                                 descriptors[i].getName())) {
 564  0
                                                                         Iterator iter = ((Collection) nestedObject)
 565  
                                                                                         .iterator();
 566  0
                             while (iter.hasNext()) {
 567  0
                                 Object collElem = iter.next();
 568  0
                                 if (collElem instanceof BusinessObject) {
 569  0
                                                                                         if (persistenceStructureService
 570  
                                                                                                         .isPersistable(collElem
 571  
                                                                                                                         .getClass())) {
 572  0
                                                 performForceUppercaseCycleSafe((BusinessObject) collElem, visited);
 573  
                                             }
 574  
                                         }
 575  0
                                     }
 576  
                                 }
 577  
                             }
 578  
                         }
 579  
                     }
 580  
                 }
 581  0
                         } catch (IllegalAccessException e) {
 582  0
                                 throw new IntrospectionException(
 583  
                                                 "unable to performForceUppercase", e);
 584  0
                         } catch (InvocationTargetException e) {
 585  0
                                 throw new IntrospectionException(
 586  
                                                 "unable to performForceUppercase", e);
 587  0
                         } catch (NoSuchMethodException e) {
 588  
                 // if the getter/setter does not exist, just skip over
 589  
                                 // throw new
 590  
                                 // IntrospectionException("unable to performForceUppercase", e);
 591  0
             }
 592  
         }
 593  0
     }
 594  
 
 595  
     /**
 596  
      * Sets the instance of the data dictionary service.
 597  
      *
 598  
      * @param dataDictionaryService
 599  
      */
 600  
         public void setDataDictionaryService(
 601  
                         DataDictionaryService dataDictionaryService) {
 602  0
         this.dataDictionaryService = dataDictionaryService;
 603  0
     }
 604  
 
 605  
     /**
 606  
      * This method retrieves the instance of the data dictionary service.
 607  
      *
 608  
      * @return An instance of the DataDictionaryService.
 609  
      */
 610  
     public DataDictionaryService getDataDictionaryService() {
 611  0
         return this.dataDictionaryService;
 612  
     }
 613  
 
 614  
     /**
 615  
      * @param businessObjectClass
 616  
          * @return BusinessObjectEntry for the given businessObjectClass, or null if
 617  
          *         there is none
 618  
          * @throws IllegalArgumentException
 619  
          *             if the given Class is null or is not a BusinessObject class
 620  
      */
 621  
     private BusinessObjectEntry getBusinessObjectEntry(Class businessObjectClass) {
 622  0
         validateBusinessObjectClass(businessObjectClass);
 623  
 
 624  0
                 BusinessObjectEntry entry = getDataDictionaryService()
 625  
                                 .getDataDictionary().getBusinessObjectEntry(
 626  
                                                 businessObjectClass.getName());
 627  0
         return entry;
 628  
     }
 629  
 
 630  
     /**
 631  
      * @param businessObjectClass
 632  
          * @return MaintenanceDocumentEntry for the given businessObjectClass, or
 633  
          *         null if there is none
 634  
          * @throws IllegalArgumentException
 635  
          *             if the given Class is null or is not a BusinessObject class
 636  
      */
 637  
         private MaintenanceDocumentEntry getMaintenanceDocumentEntry(
 638  
                         Class businessObjectClass) {
 639  0
         validateBusinessObjectClass(businessObjectClass);
 640  
 
 641  0
                 MaintenanceDocumentEntry entry = getDataDictionaryService()
 642  
                                 .getDataDictionary()
 643  
                                 .getMaintenanceDocumentEntryForBusinessObjectClass(
 644  
                                                 businessObjectClass);
 645  0
         return entry;
 646  
     }
 647  
 
 648  
     /**
 649  
      * @param businessObjectClass
 650  
          * @return LookupDefinition for the given businessObjectClass, or null if
 651  
          *         there is none
 652  
          * @throws IllegalArgumentException
 653  
          *             if the given Class is null or is not a BusinessObject class
 654  
      */
 655  
     private LookupDefinition getLookupDefinition(Class businessObjectClass) {
 656  0
         LookupDefinition lookupDefinition = null;
 657  
 
 658  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 659  0
         if (entry != null) {
 660  0
             if (entry.hasLookupDefinition()) {
 661  0
                 lookupDefinition = entry.getLookupDefinition();
 662  
             }
 663  
         }
 664  
 
 665  0
         return lookupDefinition;
 666  
     }
 667  
 
 668  
     /**
 669  
      * @param businessObjectClass
 670  
      * @param attributeName
 671  
          * @return FieldDefinition for the given businessObjectClass and lookup
 672  
          *         field name, or null if there is none
 673  
          * @throws IllegalArgumentException
 674  
          *             if the given Class is null or is not a BusinessObject class
 675  
      */
 676  
         private FieldDefinition getLookupFieldDefinition(Class businessObjectClass,
 677  
                         String lookupFieldName) {
 678  0
         if (StringUtils.isBlank(lookupFieldName)) {
 679  0
                         throw new IllegalArgumentException(
 680  
                                         "invalid (blank) lookupFieldName");
 681  
         }
 682  
 
 683  0
         FieldDefinition fieldDefinition = null;
 684  
 
 685  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 686  0
         if (lookupDefinition != null) {
 687  0
             fieldDefinition = lookupDefinition.getLookupField(lookupFieldName);
 688  
         }
 689  
 
 690  0
         return fieldDefinition;
 691  
     }
 692  
 
 693  
     /**
 694  
      * @param businessObjectClass
 695  
      * @param attributeName
 696  
          * @return FieldDefinition for the given businessObjectClass and lookup
 697  
          *         result field name, or null if there is none
 698  
          * @throws IllegalArgumentException
 699  
          *             if the given Class is null or is not a BusinessObject class
 700  
      */
 701  
         private FieldDefinition getLookupResultFieldDefinition(
 702  
                         Class businessObjectClass, String lookupFieldName) {
 703  0
         if (StringUtils.isBlank(lookupFieldName)) {
 704  0
                         throw new IllegalArgumentException(
 705  
                                         "invalid (blank) lookupFieldName");
 706  
         }
 707  
 
 708  0
         FieldDefinition fieldDefinition = null;
 709  
 
 710  0
         LookupDefinition lookupDefinition = getLookupDefinition(businessObjectClass);
 711  0
         if (lookupDefinition != null) {
 712  0
             fieldDefinition = lookupDefinition.getResultField(lookupFieldName);
 713  
         }
 714  
 
 715  0
         return fieldDefinition;
 716  
     }
 717  
 
 718  
     /**
 719  
      * @param businessObjectClass
 720  
          * @return InquiryDefinition for the given businessObjectClass, or null if
 721  
          *         there is none
 722  
          * @throws IllegalArgumentException
 723  
          *             if the given Class is null or is not a BusinessObject class
 724  
      */
 725  
     private InquiryDefinition getInquiryDefinition(Class businessObjectClass) {
 726  0
         InquiryDefinition inquiryDefinition = null;
 727  
 
 728  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 729  0
         if (entry != null) {
 730  0
             if (entry.hasInquiryDefinition()) {
 731  0
                 inquiryDefinition = entry.getInquiryDefinition();
 732  
             }
 733  
         }
 734  
 
 735  0
         return inquiryDefinition;
 736  
     }
 737  
 
 738  
 
 739  
     /**
 740  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getTitleAttribute(java.lang.Class)
 741  
      */
 742  
     public String getTitleAttribute(Class businessObjectClass) {
 743  0
         String titleAttribute = null;
 744  
 
 745  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 746  0
         if (entry != null) {
 747  0
             titleAttribute = entry.getTitleAttribute();
 748  
         }
 749  
 
 750  0
         return titleAttribute;
 751  
     }
 752  
 
 753  
     /**
 754  
      * @param businessObjectClass
 755  
      * @param attributeName
 756  
          * @return FieldDefinition for the given businessObjectClass and field name,
 757  
          *         or null if there is none
 758  
          * @throws IllegalArgumentException
 759  
          *             if the given Class is null or is not a BusinessObject class
 760  
      */
 761  
         private FieldDefinition getInquiryFieldDefinition(
 762  
                         Class businessObjectClass, String fieldName) {
 763  0
         if (StringUtils.isBlank(fieldName)) {
 764  0
             throw new IllegalArgumentException("invalid (blank) fieldName");
 765  
         }
 766  
 
 767  0
         FieldDefinition fieldDefinition = null;
 768  
 
 769  0
         InquiryDefinition inquiryDefinition = getInquiryDefinition(businessObjectClass);
 770  0
         if (inquiryDefinition != null) {
 771  0
             fieldDefinition = inquiryDefinition.getFieldDefinition(fieldName);
 772  
         }
 773  
 
 774  0
         return fieldDefinition;
 775  
     }
 776  
 
 777  
     /**
 778  
      * @param businessObjectClass
 779  
          * @throws IllegalArgumentException
 780  
          *             if the given Class is null or is not a BusinessObject class
 781  
      */
 782  
     private void validateBusinessObjectClass(Class businessObjectClass) {
 783  0
         if (businessObjectClass == null) {
 784  0
                         throw new IllegalArgumentException(
 785  
                                         "invalid (null) businessObjectClass");
 786  
         }
 787  0
         if (!BusinessObject.class.isAssignableFrom(businessObjectClass)) {
 788  0
                         throw new IllegalArgumentException("class '"
 789  
                                         + businessObjectClass.getName()
 790  
                                         + "' is not a descendent of BusinessObject");
 791  
         }
 792  0
     }
 793  
 
 794  
     /**
 795  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#forceLookupResultFieldInquiry(java.lang.Class,
 796  
          *      java.lang.String)
 797  
      */
 798  
         public Boolean forceLookupResultFieldInquiry(Class businessObjectClass,
 799  
                         String attributeName) {
 800  0
         Boolean forceLookup = null;
 801  0
         if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 802  0
                         forceLookup = Boolean.valueOf(getLookupResultFieldDefinition(
 803  
                                         businessObjectClass, attributeName).isForceInquiry());
 804  
         }
 805  
 
 806  0
         return forceLookup;
 807  
     }
 808  
 
 809  
     /**
 810  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#noLookupResultFieldInquiry(java.lang.Class,
 811  
          *      java.lang.String)
 812  
      */
 813  
         public Boolean noLookupResultFieldInquiry(Class businessObjectClass,
 814  
                         String attributeName) {
 815  0
         Boolean noLookup = null;
 816  0
         if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 817  0
                         noLookup = Boolean.valueOf(getLookupResultFieldDefinition(
 818  
                                         businessObjectClass, attributeName).isNoInquiry());
 819  
         }
 820  
 
 821  0
         return noLookup;
 822  
     }
 823  
 
 824  
     /**
 825  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#forceLookupFieldLookup(java.lang.Class,
 826  
          *      java.lang.String)
 827  
      */
 828  
         public Boolean forceLookupFieldLookup(Class businessObjectClass,
 829  
                         String attributeName) {
 830  0
         Boolean forceLookup = null;
 831  0
         if (getLookupFieldDefinition(businessObjectClass, attributeName) != null) {
 832  0
                         forceLookup = Boolean.valueOf(getLookupFieldDefinition(
 833  
                                         businessObjectClass, attributeName).isForceLookup());
 834  
         }
 835  
 
 836  0
         return forceLookup;
 837  
     }
 838  
 
 839  
         public Boolean forceInquiryFieldLookup(Class businessObjectClass,
 840  
                         String attributeName) {
 841  0
         Boolean forceInquiry = null;
 842  0
         if (getLookupFieldDefinition(businessObjectClass, attributeName) != null) {
 843  0
                         forceInquiry = Boolean.valueOf(getLookupFieldDefinition(
 844  
                                         businessObjectClass, attributeName).isForceInquiry());
 845  
         }
 846  
 
 847  0
         return forceInquiry;
 848  
     }
 849  
 
 850  
     /**
 851  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#noLookupFieldLookup(java.lang.Class,
 852  
          *      java.lang.String)
 853  
      */
 854  
         public Boolean noLookupFieldLookup(Class businessObjectClass,
 855  
                         String attributeName) {
 856  0
         Boolean noLookup = null;
 857  0
         if (getLookupFieldDefinition(businessObjectClass, attributeName) != null) {
 858  0
                         noLookup = Boolean.valueOf(getLookupFieldDefinition(
 859  
                                         businessObjectClass, attributeName).isNoLookup());
 860  
         }
 861  
 
 862  0
         return noLookup;
 863  
     }
 864  
 
 865  
     /**
 866  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#noLookupFieldLookup(java.lang.Class,
 867  
          *      java.lang.String)
 868  
      */
 869  
         public Boolean noDirectInquiryFieldLookup(Class businessObjectClass,
 870  
                         String attributeName) {
 871  0
         Boolean noDirectInquiry = null;
 872  0
         if (getLookupFieldDefinition(businessObjectClass, attributeName) != null) {
 873  0
                         noDirectInquiry = Boolean.valueOf(getLookupFieldDefinition(
 874  
                                         businessObjectClass, attributeName).isNoDirectInquiry());
 875  
         }
 876  
 
 877  0
         return noDirectInquiry;
 878  
     }
 879  
 
 880  
     /**
 881  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupResultFieldUseShortLabel(java.lang.Class,
 882  
          *      java.lang.String)
 883  
          */
 884  
         public Boolean getLookupResultFieldUseShortLabel(Class businessObjectClass,
 885  
                         String attributeName) {
 886  0
         Boolean useShortLabel = null;
 887  0
         if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 888  0
                         useShortLabel = Boolean.valueOf(getLookupResultFieldDefinition(
 889  
                                         businessObjectClass, attributeName).isUseShortLabel());
 890  
         }
 891  
 
 892  0
         return useShortLabel;
 893  
         }
 894  
 
 895  
         /**
 896  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupResultFieldTotal(java.lang.Class,
 897  
          *      java.lang.String)
 898  
          */
 899  
         public Boolean getLookupResultFieldTotal(Class businessObjectClass, String attributeName) {
 900  0
                 Boolean total = false;
 901  
 
 902  0
                 if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 903  0
                         total = Boolean.valueOf(getLookupResultFieldDefinition(
 904  
                                         businessObjectClass, attributeName).isTotal());
 905  
                 }
 906  
 
 907  0
                 return total;
 908  
         }
 909  
 
 910  
         /**
 911  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#forceInquiryFieldInquiry(java.lang.Class,
 912  
          *      java.lang.String)
 913  
      */
 914  
         public Boolean forceInquiryFieldInquiry(Class businessObjectClass,
 915  
                         String attributeName) {
 916  0
         Boolean forceInquiry = null;
 917  0
         if (getInquiryFieldDefinition(businessObjectClass, attributeName) != null) {
 918  0
                         forceInquiry = Boolean.valueOf(getInquiryFieldDefinition(
 919  
                                         businessObjectClass, attributeName).isForceInquiry());
 920  
         }
 921  
 
 922  0
         return forceInquiry;
 923  
     }
 924  
 
 925  
     /**
 926  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#noInquiryFieldInquiry(java.lang.Class,
 927  
          *      java.lang.String)
 928  
      */
 929  
         public Boolean noInquiryFieldInquiry(Class businessObjectClass,
 930  
                         String attributeName) {
 931  0
         Boolean noInquiry = null;
 932  0
         if (getInquiryFieldDefinition(businessObjectClass, attributeName) != null) {
 933  0
                         noInquiry = Boolean.valueOf(getInquiryFieldDefinition(
 934  
                                         businessObjectClass, attributeName).isNoInquiry());
 935  
         }
 936  
 
 937  0
         return noInquiry;
 938  
     }
 939  
 
 940  
     /**
 941  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupFieldDefaultValue(java.lang.Class,
 942  
          *      java.lang.String)
 943  
      */
 944  
         public String getLookupFieldDefaultValue(Class businessObjectClass,
 945  
                         String attributeName) {
 946  0
                 return getLookupFieldDefinition(businessObjectClass, attributeName)
 947  
                                 .getDefaultValue();
 948  
     }
 949  
 
 950  
     /**
 951  
      * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupFieldDefaultValueFinderClass(java.lang.Class,
 952  
      *      java.lang.String)
 953  
      */
 954  
         public Class<? extends ValueFinder> getLookupFieldDefaultValueFinderClass(
 955  
                         Class businessObjectClass, String attributeName) {
 956  0
                 return getLookupFieldDefinition(businessObjectClass, attributeName)
 957  
                                 .getDefaultValueFinderClass();
 958  
     }
 959  
 
 960  
         /** {@inheritDoc} */
 961  
         public String getLookupFieldQuickfinderParameterString(Class businessObjectClass, String attributeName) {
 962  0
                 return getLookupFieldDefinition(businessObjectClass, attributeName).getQuickfinderParameterString();
 963  
         }
 964  
 
 965  
         /** {@inheritDoc} */
 966  
         public Class<? extends ValueFinder> getLookupFieldQuickfinderParameterStringBuilderClass(Class businessObjectClass, String attributeName) {
 967  0
                 return getLookupFieldDefinition(businessObjectClass, attributeName).getQuickfinderParameterStringBuilderClass();
 968  
         }
 969  
 
 970  
         public void setPersistenceStructureService(
 971  
                         PersistenceStructureService persistenceStructureService) {
 972  0
         this.persistenceStructureService = persistenceStructureService;
 973  0
     }
 974  
 
 975  
     public Boolean areNotesSupported(Class businessObjectClass) {
 976  0
         Boolean hasNotesSupport = Boolean.FALSE;
 977  
 
 978  0
         BusinessObjectEntry entry = getBusinessObjectEntry(businessObjectClass);
 979  0
         if (entry != null) {
 980  0
             hasNotesSupport = entry.isBoNotesEnabled();
 981  
         }
 982  
 
 983  0
         return hasNotesSupport;
 984  
     }
 985  
 
 986  
         /**
 987  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isLookupFieldTreatWildcardsAndOperatorsAsLiteral(java.lang.Class, java.lang.String)
 988  
          */
 989  
         public boolean isLookupFieldTreatWildcardsAndOperatorsAsLiteral(Class businessObjectClass, String attributeName) {
 990  0
                 FieldDefinition lookupFieldDefinition = getLookupFieldDefinition(businessObjectClass, attributeName);
 991  0
                 return lookupFieldDefinition != null && lookupFieldDefinition.isTreatWildcardsAndOperatorsAsLiteral();
 992  
         }
 993  
         
 994  
         /**
 995  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquiryFieldAdditionalDisplayAttributeName(java.lang.Class,
 996  
          *      java.lang.String)
 997  
          */
 998  
         public String getInquiryFieldAdditionalDisplayAttributeName(Class businessObjectClass, String attributeName) {
 999  0
                 String additionalDisplayAttributeName = null;
 1000  
 
 1001  0
                 if (getInquiryFieldDefinition(businessObjectClass, attributeName) != null) {
 1002  0
                         additionalDisplayAttributeName = getInquiryFieldDefinition(businessObjectClass, attributeName)
 1003  
                                         .getAdditionalDisplayAttributeName();
 1004  
                 }
 1005  
 
 1006  0
                 return additionalDisplayAttributeName;
 1007  
         }
 1008  
 
 1009  
         /**
 1010  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getInquiryFieldAlternateDisplayAttributeName(java.lang.Class,
 1011  
          *      java.lang.String)
 1012  
          */
 1013  
         public String getInquiryFieldAlternateDisplayAttributeName(Class businessObjectClass, String attributeName) {
 1014  0
                 String alternateDisplayAttributeName = null;
 1015  
 
 1016  0
                 if (getInquiryFieldDefinition(businessObjectClass, attributeName) != null) {
 1017  0
                         alternateDisplayAttributeName = getInquiryFieldDefinition(businessObjectClass, attributeName)
 1018  
                                         .getAlternateDisplayAttributeName();
 1019  
                 }
 1020  
 
 1021  0
                 return alternateDisplayAttributeName;
 1022  
         }
 1023  
 
 1024  
         /**
 1025  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupFieldAdditionalDisplayAttributeName(java.lang.Class,
 1026  
          *      java.lang.String)
 1027  
          */
 1028  
         public String getLookupFieldAdditionalDisplayAttributeName(Class businessObjectClass, String attributeName) {
 1029  0
                 String additionalDisplayAttributeName = null;
 1030  
 
 1031  0
                 if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 1032  0
                         additionalDisplayAttributeName = getLookupResultFieldDefinition(businessObjectClass, attributeName)
 1033  
                                         .getAdditionalDisplayAttributeName();
 1034  
                 }
 1035  
 
 1036  0
                 return additionalDisplayAttributeName;
 1037  
         }
 1038  
 
 1039  
         /**
 1040  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getLookupFieldAlternateDisplayAttributeName(java.lang.Class,
 1041  
          *      java.lang.String)
 1042  
          */
 1043  
         public String getLookupFieldAlternateDisplayAttributeName(Class businessObjectClass, String attributeName) {
 1044  0
                 String alternateDisplayAttributeName = null;
 1045  
 
 1046  0
                 if (getLookupResultFieldDefinition(businessObjectClass, attributeName) != null) {
 1047  0
                         alternateDisplayAttributeName = getLookupResultFieldDefinition(businessObjectClass, attributeName)
 1048  
                                         .getAlternateDisplayAttributeName();
 1049  
                 }
 1050  
 
 1051  0
                 return alternateDisplayAttributeName;
 1052  
         }
 1053  
         
 1054  
         /**
 1055  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#tranlateCodesInLookup(java.lang.Class)
 1056  
          */
 1057  
         public Boolean tranlateCodesInLookup(Class businessObjectClass) {
 1058  0
                 boolean translateCodes = false;
 1059  
 
 1060  0
                 if (getLookupDefinition(businessObjectClass) != null) {
 1061  0
                         translateCodes = getLookupDefinition(businessObjectClass).isTranslateCodes();
 1062  
                 }
 1063  
 
 1064  0
                 return translateCodes;
 1065  
         }
 1066  
 
 1067  
         /**
 1068  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#tranlateCodesInInquiry(java.lang.Class)
 1069  
          */
 1070  
         public Boolean tranlateCodesInInquiry(Class businessObjectClass) {
 1071  0
                 boolean translateCodes = false;
 1072  
 
 1073  0
                 if (getInquiryDefinition(businessObjectClass) != null) {
 1074  0
                         translateCodes = getInquiryDefinition(businessObjectClass).isTranslateCodes();
 1075  
                 }
 1076  
 
 1077  0
                 return translateCodes;
 1078  
         }
 1079  
 
 1080  
         /**
 1081  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#isLookupFieldTriggerOnChange(java.lang.Class,
 1082  
          *      java.lang.String)
 1083  
          */
 1084  
         public boolean isLookupFieldTriggerOnChange(Class businessObjectClass, String attributeName) {
 1085  0
                 boolean triggerOnChange = false;
 1086  0
                 if (getLookupFieldDefinition(businessObjectClass, attributeName) != null) {
 1087  0
                         triggerOnChange = getLookupFieldDefinition(businessObjectClass, attributeName).isTriggerOnChange();
 1088  
                 }
 1089  
 
 1090  0
                 return triggerOnChange;
 1091  
         }
 1092  
 
 1093  
         /**
 1094  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#disableSearchButtonsInLookup(java.lang.Class)
 1095  
          */
 1096  
         public boolean disableSearchButtonsInLookup(Class businessObjectClass) {
 1097  0
                 boolean disableSearchButtons = false;
 1098  
 
 1099  0
                 if (getLookupDefinition(businessObjectClass) != null) {
 1100  0
                         disableSearchButtons = getLookupDefinition(businessObjectClass).isDisableSearchButtons();
 1101  
                 }
 1102  
 
 1103  0
                 return disableSearchButtons;
 1104  
         }
 1105  
 
 1106  
         /**
 1107  
          * @see org.kuali.rice.kns.service.BusinessObjectDictionaryService#getGroupByAttributesForEffectiveDating(java.lang.Class)
 1108  
          */
 1109  
         public List<String> getGroupByAttributesForEffectiveDating(Class businessObjectClass) {
 1110  0
                 List<String> groupByList = null;
 1111  
 
 1112  0
                 if (getBusinessObjectEntry(businessObjectClass) != null) {
 1113  0
                         groupByList = getBusinessObjectEntry(businessObjectClass).getGroupByAttributesForEffectiveDating();
 1114  
                 }
 1115  
 
 1116  0
                 return groupByList;
 1117  
         }
 1118  
         
 1119  
 }