@Override public boolean equalsByPrimaryKeys(Object do1, Object do2) { return dataObjectMetaDataService.equalsByPrimaryKeys(do1, do2); }
@Override public Map<String, ?> getPrimaryKeyFieldValuesDOMDS(Object dataObject) { return dataObjectMetaDataService.getPrimaryKeyFieldValues(dataObject); }
@Override public boolean hasLocalInquiry(Class<?> dataObjectClass) { return dataObjectMetaDataService.hasLocalInquiry(dataObjectClass); }
String titleAttribute = dataObjectMetaDataService.getTitleAttribute(containingClass); if (StringUtils.equals(titleAttribute, attributeName)) { lookupClassName = containingClass.getName(); List<String> pkAttributes = dataObjectMetaDataService.listPrimaryKeyFieldNames(containingClass); for (String pkAttribute : pkAttributes) { fieldConversions.put(pkAttribute, pkAttribute);
@Override public org.kuali.rice.krad.bo.DataObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry) { RelationshipDefinition ddReference = getDictionaryRelationship(dataObjectClass, attributeName); return dataObjectMetaDataService.getDataObjectRelationship(dataObject, dataObjectClass, attributeName, attributePrefix, keysOnly, supportsLookup, supportsInquiry); }
@Override public boolean hasLocalLookup(Class<?> dataObjectClass) { return dataObjectMetaDataService.hasLocalLookup(dataObjectClass); }
/** * LookupServiceImpl calls BusinessObjectMetaDataService to listPrimaryKeyFieldNames. * The BusinessObjectMetaDataService goes beyond the PersistenceStructureService to consult * the associated ModuleService in determining the primary key field names. * TODO: Do we need both listPrimaryKeyFieldNames/persistenceStructureService and * listPrimaryKeyFieldNamesConsultingAllServices/businesObjectMetaDataService or * can the latter superset be used for the former? * * @param type the data object class * @return list of primary key field names, consulting persistence structure service, module service and * datadictionary */ protected List<String> listPrimaryKeyFieldNamesConsultingAllServices(Class<?> type) { return dataObjectMetaDataService.listPrimaryKeyFieldNames(type); }
List<DataObjectRelationship> relationships = dataObjectMetaDataService.getDataObjectRelationships( bo.getClass()); for ( DataObjectRelationship rel : relationships ) {
@Override public Class<?> getInquiryObjectClassIfNotTitle(Object dataObject, String propertyName) { Class<?> objectClass = ObjectUtils.materializeClassForProxiedObject(dataObject); org.kuali.rice.krad.bo.DataObjectRelationship relationship = dataObjectMetaDataService.getDataObjectRelationship(dataObject, objectClass, propertyName, "", true, false, true); if (relationship != null) { return relationship.getRelatedClass(); } return null; }
@Override public Map<String, String> getInquiryParameters(Object dataObject, List<String> keys, String propertyName) { Map<String, String> inquiryParameters = new HashMap<String, String>(); Class<?> objectClass = ObjectUtils.materializeClassForProxiedObject(dataObject); org.kuali.rice.krad.bo.DataObjectRelationship relationship = dataObjectMetaDataService.getDataObjectRelationship(dataObject, objectClass, propertyName, "", true, false, true); for (String keyName : keys) { String keyConversion = keyName; if (relationship != null) { keyConversion = relationship.getParentAttributeForChildAttribute(keyName); } else if (PropertyAccessorUtils.isNestedOrIndexedProperty(propertyName)) { String nestedAttributePrefix = KRADUtils.getNestedAttributePrefix(propertyName); keyConversion = nestedAttributePrefix + "." + keyName; } inquiryParameters.put(keyConversion, keyName); } return inquiryParameters; }
Map<String, ?> newPkFields = getDataObjectMetaDataService().getPrimaryKeyFieldValues(newBo);
DataObjectRelationship boRel = getDataObjectMetaDataService().getDataObjectRelationship(bo, bo.getClass(), referenceName, "", true, false, false); final Map<String,String> fkMap = boRel != null ? boRel.getParentToChildReferences() : Collections.<String, String>emptyMap();