public class KRADLegacyDataAdapterImpl extends Object implements LegacyDataAdapter
CLASS_NOT_PERSISTABLE_OJB_EXCEPTION_CLASS, OPTIMISTIC_LOCK_OJB_EXCEPTION_CLASS| Constructor and Description |
|---|
KRADLegacyDataAdapterImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allForeignKeyValuesPopulatedForReference(Object bo,
String referenceName) |
boolean |
allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass,
Map<String,String> formProps)
Returns whether all primary key values are specified in the lookup map and do not contain any wildcards
|
boolean |
areNotesSupported(Class<?> dataObjectClass) |
protected boolean |
classHasSupportedFeatures(Class relationshipClass,
boolean supportsLookup,
boolean supportsInquiry) |
Object |
createNewObjectFromClass(Class clazz) |
org.kuali.rice.core.api.uif.RemotableQuickFinder.Builder |
createQuickFinder(Class<?> containingClass,
String attributeName) |
protected org.kuali.rice.core.api.uif.RemotableQuickFinder.Builder |
createQuickFinderNew(Class<?> containingClass,
String attributeName)
New implementation of createQuickFinder which uses the new dataObjectService.getMetadataRepository().
|
void |
delete(Object dataObject) |
void |
deleteMatching(Class<?> type,
Map<String,?> fieldValues) |
Class<?> |
determineCollectionObjectType(Class<?> containingType,
String collectionPropertyName) |
boolean |
equalsByPrimaryKeys(Object do1,
Object do2) |
protected <T> Collection<T> |
filterCurrentDataObjects(Class<T> dataObjectClass,
Collection<T> unfiltered,
Map<String,String> formProps) |
<T> Collection<T> |
findAll(Class<T> clazz) |
<T extends Document> |
findByDocumentHeaderId(Class<T> documentClass,
String id) |
<T extends Document> |
findByDocumentHeaderIds(Class<T> documentClass,
List<String> ids) |
<T> T |
findByPrimaryKey(Class<T> clazz,
Map<String,?> primaryKeys) |
<T> T |
findBySinglePrimaryKey(Class<T> clazz,
Object primaryKey) |
<T> Collection<T> |
findCollectionBySearchHelper(Class<T> dataObjectClass,
Map<String,String> formProperties,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit) |
<T> Collection<T> |
findCollectionBySearchHelper(Class<T> dataObjectClass,
Map<String,String> formProperties,
List<String> wildcardAsLiteralPropertyNames,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit) |
<T> Collection<T> |
findMatching(Class<T> clazz,
Map<String,?> fieldValues) |
<T> Collection<T> |
findMatchingOrderBy(Class<T> clazz,
Map<String,?> fieldValues,
String sortField,
boolean sortAscending) |
protected List<org.kuali.rice.krad.data.metadata.DataObjectRelationship> |
findNonUpdateableRelationships(Object persistableObject) |
<T> T |
findObjectBySearch(Class<T> type,
Map<String,String> formProps) |
protected DataObjectEntry |
getDataObjectEntry(Class<?> dataObjectClass) |
String |
getDataObjectIdentifierString(Object dataObject) |
DataObjectRelationship |
getDataObjectRelationship(Object dataObject,
Class<?> dataObjectClass,
String attributeName,
String attributePrefix,
boolean keysOnly,
boolean supportsLookup,
boolean supportsInquiry) |
RelationshipDefinition |
getDictionaryRelationship(Class<?> c,
String attributeName)
gets the relationship that the attribute represents on the class
|
Object |
getExtension(Class<?> businessObjectClass) |
Class<?> |
getExtensionAttributeClass(Class<?> boClass,
String attributePropertyName) |
ForeignKeyFieldsPopulationState |
getForeignKeyFieldsPopulationState(Object dataObject,
String referenceName) |
Map<String,String> |
getForeignKeysForReference(Class<?> clazz,
String attributeName) |
Class<?> |
getInquiryObjectClassIfNotTitle(Object dataObject,
String propertyName) |
Map<String,String> |
getInquiryParameters(Object dataObject,
List<String> keys,
String propertyName) |
Object |
getNestedValue(Object bo,
String fieldName) |
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject) |
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject,
boolean sortFieldNames)
Grabs primary key fields and sorts them if sort field names is true
|
Map<String,?> |
getPrimaryKeyFieldValuesDOMDS(Object dataObject) |
Class<?> |
getPropertyType(Object object,
String propertyName) |
Object |
getReferenceIfExists(Object bo,
String referenceName) |
protected DataObjectRelationship |
getRelationshipMetadata(Class<?> dataObjectClass,
String attributeName,
String attributePrefix) |
String |
getTitleAttribute(Class<?> dataObjectClass) |
ViewDictionaryService |
getViewDictionaryService() |
boolean |
hasCollection(Class<?> boClass,
String collectionName) |
boolean |
hasLocalInquiry(Class<?> dataObjectClass) |
boolean |
hasLocalLookup(Class<?> dataObjectClass) |
boolean |
hasPrimaryKeyFieldValues(Object dataObject) |
boolean |
hasReference(Class<?> boClass,
String referenceName) |
boolean |
isCollectionUpdatable(Class<?> type,
String collectionName) |
boolean |
isExtensionAttribute(Class<?> boClass,
String attributePropertyName,
Class<?> propertyType) |
boolean |
isLockable(Object object) |
boolean |
isNull(Object object) |
boolean |
isPersistable(Class<?> dataObjectClass) |
boolean |
isProxied(Object object) |
boolean |
isReferenceUpdatable(Class<?> type,
String referenceName) |
<T> T |
linkAndSave(T dataObject) |
Map<String,Class> |
listCollectionObjectTypes(Class<?> type) |
List<String> |
listPrimaryKeyFieldNames(Class<?> type) |
protected List<String> |
listPrimaryKeyFieldNamesConsultingAllServices(Class<?> type)
LookupServiceImpl calls BusinessObjectMetaDataService to listPrimaryKeyFieldNames.
|
Map<String,Class> |
listReferenceObjectFields(Class<?> type) |
protected Boolean |
lookupCriteriaCurrentSpecifier(Map<String,String> formProps) |
void |
materializeAllSubObjects(Object object) |
Class |
materializeClassForProxiedObject(Object object) |
protected <T> Collection<T> |
performDataObjectServiceLookup(Class<T> dataObjectClass,
Map<String,String> formProperties,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit)
Our new DataObjectService-based lookup implementation
|
protected <T> Collection<T> |
performDataObjectServiceLookup(Class<T> dataObjectClass,
Map<String,String> formProperties,
List<String> wildcardAsLiteralPropertyNames,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit)
Our newer DataObjectService-based lookup implementation
|
protected DataObjectRelationship |
populateRelationshipFromDictionaryReference(Class<?> dataObjectClass,
RelationshipDefinition ddReference,
String attributePrefix,
boolean keysOnly) |
void |
refreshAllNonUpdatingReferences(Object persistableObject) |
void |
refreshReferenceObject(Object businessObject,
String referenceObjectName) |
Object |
resolveProxy(Object o) |
<T> T |
retrieve(T dataObject) |
void |
retrieveNonKeyFields(Object persistableObject) |
void |
retrieveReferenceObject(Object persistableObject,
String referenceObjectName) |
<T> T |
save(T dataObject) |
<T> T |
saveDocument(T document) |
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService) |
void |
setDataObjectService(org.kuali.rice.krad.data.DataObjectService dataObjectService) |
void |
setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService) |
void |
setKualiModuleService(KualiModuleService kualiModuleService) |
void |
setLookupCriteriaGenerator(LookupCriteriaGenerator lookupCriteriaGenerator) |
void |
setObjectProperty(Object bo,
String propertyName,
Class propertyType,
Object propertyValue) |
void |
setObjectPropertyDeep(Object bo,
String propertyName,
Class type,
Object propertyValue) |
void |
setViewDictionaryService(ViewDictionaryService viewDictionaryService) |
protected DataObjectRelationship |
transformToDeprecatedDataObjectRelationship(Class<?> dataObjectClass,
String attributeName,
String attributePrefix,
Class<?> relatedObjectClass,
org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship relationship) |
void |
verifyVersionNumber(Object dataObject) |
public KRADLegacyDataAdapterImpl()
public <T> T save(T dataObject)
save in interface LegacyDataAppAdapterpublic <T> T linkAndSave(T dataObject)
linkAndSave in interface LegacyDataAppAdapterpublic <T> T saveDocument(T document)
saveDocument in interface LegacyDataAppAdapterpublic <T> T findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
findByPrimaryKey in interface LegacyDataAppAdapterpublic <T> T findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
findBySinglePrimaryKey in interface LegacyDataAppAdapterpublic void delete(Object dataObject)
delete in interface LegacyDataAppAdapterpublic void deleteMatching(Class<?> type, Map<String,?> fieldValues)
deleteMatching in interface LegacyDataAppAdapterpublic <T> T retrieve(T dataObject)
retrieve in interface LegacyDataAppAdapterpublic <T> Collection<T> findAll(Class<T> clazz)
findAll in interface LegacyDataAppAdapterpublic <T> Collection<T> findMatching(Class<T> clazz, Map<String,?> fieldValues)
findMatching in interface LegacyDataAppAdapterpublic <T> Collection<T> findMatchingOrderBy(Class<T> clazz, Map<String,?> fieldValues, String sortField, boolean sortAscending)
findMatchingOrderBy in interface LegacyDataAppAdapterpublic Map<String,?> getPrimaryKeyFieldValues(Object dataObject)
getPrimaryKeyFieldValues in interface LegacyDataAppAdapterpublic void retrieveNonKeyFields(Object persistableObject)
retrieveNonKeyFields in interface LegacyDataAppAdapterpublic void retrieveReferenceObject(Object persistableObject, String referenceObjectName)
retrieveReferenceObject in interface LegacyDataAppAdapterpublic void refreshAllNonUpdatingReferences(Object persistableObject)
refreshAllNonUpdatingReferences in interface LegacyDataAppAdapterprotected List<org.kuali.rice.krad.data.metadata.DataObjectRelationship> findNonUpdateableRelationships(Object persistableObject)
public boolean isProxied(Object object)
isProxied in interface LegacyDataAppAdapterpublic Object resolveProxy(Object o)
resolveProxy in interface LegacyDataAppAdapterpublic <T> Collection<T> findCollectionBySearchHelper(Class<T> dataObjectClass, Map<String,String> formProperties, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
findCollectionBySearchHelper in interface LegacyDataAppAdapterpublic <T> Collection<T> findCollectionBySearchHelper(Class<T> dataObjectClass, Map<String,String> formProperties, List<String> wildcardAsLiteralPropertyNames, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
findCollectionBySearchHelper in interface LegacyDataAppAdapterprotected <T> Collection<T> performDataObjectServiceLookup(Class<T> dataObjectClass, Map<String,String> formProperties, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
T - the data object typedataObjectClass - the dataobject classformProperties - the incoming lookup form propertiesunbounded - whether the search is unboundedsearchResultsLimit - the searchResultsLimit; null implies use of default KNS value if set for the classprotected <T> Collection<T> performDataObjectServiceLookup(Class<T> dataObjectClass, Map<String,String> formProperties, List<String> wildcardAsLiteralPropertyNames, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
T - the data object typedataObjectClass - the dataobject classformProperties - the incoming lookup form propertieswildcardAsLiteralPropertyNames - list of the lookup properties with wildcard characters disabledunbounded - whether the search is unboundedsearchResultsLimit - the searchResultsLimit; null implies use of default KNS value if set for the classprotected <T> Collection<T> filterCurrentDataObjects(Class<T> dataObjectClass, Collection<T> unfiltered, Map<String,String> formProps)
protected Boolean lookupCriteriaCurrentSpecifier(Map<String,String> formProps)
public <T> T findObjectBySearch(Class<T> type, Map<String,String> formProps)
findObjectBySearch in interface LegacyDataAppAdapterpublic boolean allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass, Map<String,String> formProps)
allPrimaryKeyValuesPresentAndNotWildcard in interface LegacyDataAppAdapterboClass - the bo class to lookupformProps - the incoming form/lookup propertiespublic List<String> listPrimaryKeyFieldNames(Class<?> type)
listPrimaryKeyFieldNames in interface LegacyDataAppAdapterprotected List<String> listPrimaryKeyFieldNamesConsultingAllServices(Class<?> type)
type - the data object classpublic Class<?> determineCollectionObjectType(Class<?> containingType, String collectionPropertyName)
determineCollectionObjectType in interface LegacyDataAppAdapterpublic boolean hasReference(Class<?> boClass, String referenceName)
hasReference in interface LegacyDataAppAdapterpublic boolean hasCollection(Class<?> boClass, String collectionName)
hasCollection in interface LegacyDataAppAdapterpublic boolean isExtensionAttribute(Class<?> boClass, String attributePropertyName, Class<?> propertyType)
isExtensionAttribute in interface LegacyDataAppAdapterpublic Class<?> getExtensionAttributeClass(Class<?> boClass, String attributePropertyName)
getExtensionAttributeClass in interface LegacyDataAppAdapterpublic Map<String,?> getPrimaryKeyFieldValuesDOMDS(Object dataObject)
getPrimaryKeyFieldValuesDOMDS in interface LegacyDataAppAdapterpublic boolean equalsByPrimaryKeys(Object do1, Object do2)
equalsByPrimaryKeys in interface LegacyDataAppAdapterpublic void materializeAllSubObjects(Object object)
materializeAllSubObjects in interface LegacyDataAppAdapterpublic Class<?> getPropertyType(Object object, String propertyName)
getPropertyType in interface LegacyDataAppAdapterpublic Object getExtension(Class<?> businessObjectClass) throws InstantiationException, IllegalAccessException
getExtension in interface LegacyDataAppAdapterInstantiationExceptionIllegalAccessExceptionpublic void refreshReferenceObject(Object businessObject, String referenceObjectName)
refreshReferenceObject in interface LegacyDataAppAdapterpublic boolean isLockable(Object object)
isLockable in interface LegacyDataAppAdapterpublic void verifyVersionNumber(Object dataObject)
verifyVersionNumber in interface LegacyDataAppAdapterpublic org.kuali.rice.core.api.uif.RemotableQuickFinder.Builder createQuickFinder(Class<?> containingClass, String attributeName)
createQuickFinder in interface LegacyDataAppAdapterprotected org.kuali.rice.core.api.uif.RemotableQuickFinder.Builder createQuickFinderNew(Class<?> containingClass, String attributeName)
public boolean isReferenceUpdatable(Class<?> type, String referenceName)
isReferenceUpdatable in interface LegacyDataAppAdapterpublic Map<String,Class> listReferenceObjectFields(Class<?> type)
listReferenceObjectFields in interface LegacyDataAppAdapterpublic boolean isCollectionUpdatable(Class<?> type, String collectionName)
isCollectionUpdatable in interface LegacyDataAppAdapterpublic Map<String,Class> listCollectionObjectTypes(Class<?> type)
listCollectionObjectTypes in interface LegacyDataAppAdapterpublic Object getReferenceIfExists(Object bo, String referenceName)
getReferenceIfExists in interface LegacyDataAppAdapterpublic boolean allForeignKeyValuesPopulatedForReference(Object bo, String referenceName)
allForeignKeyValuesPopulatedForReference in interface LegacyDataAppAdapterpublic RelationshipDefinition getDictionaryRelationship(Class<?> c, String attributeName)
getDictionaryRelationship in interface LegacyDataAdapterc - - the class to which the attribute belongsattributeName - - property name for the attributepublic String getTitleAttribute(Class<?> dataObjectClass)
getTitleAttribute in interface LegacyDataAppAdapterLegacyDataAdapterprotected DataObjectEntry getDataObjectEntry(Class<?> dataObjectClass)
dataObjectClass - IllegalArgumentException - if the given Class is nullpublic boolean areNotesSupported(Class<?> dataObjectClass)
areNotesSupported in interface LegacyDataAppAdapterLegacyDataAppAdapter.areNotesSupported(java.lang.Class)public Map<String,?> getPrimaryKeyFieldValues(Object dataObject, boolean sortFieldNames)
dataObject - sortFieldNames - public String getDataObjectIdentifierString(Object dataObject)
getDataObjectIdentifierString in interface LegacyDataAppAdapterDataObjectMetaDataService.getDataObjectIdentifierString(java.lang.Object)public Class<?> getInquiryObjectClassIfNotTitle(Object dataObject, String propertyName)
getInquiryObjectClassIfNotTitle in interface LegacyDataAppAdapterpublic Map<String,String> getInquiryParameters(Object dataObject, List<String> keys, String propertyName)
getInquiryParameters in interface LegacyDataAppAdapterpublic boolean hasLocalLookup(Class<?> dataObjectClass)
hasLocalLookup in interface LegacyDataAppAdapterpublic boolean hasLocalInquiry(Class<?> dataObjectClass)
hasLocalInquiry in interface LegacyDataAppAdapterpublic DataObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry)
getDataObjectRelationship in interface LegacyDataAppAdapterprotected DataObjectRelationship transformToDeprecatedDataObjectRelationship(Class<?> dataObjectClass, String attributeName, String attributePrefix, Class<?> relatedObjectClass, org.kuali.rice.krad.data.metadata.DataObjectAttributeRelationship relationship)
protected DataObjectRelationship populateRelationshipFromDictionaryReference(Class<?> dataObjectClass, RelationshipDefinition ddReference, String attributePrefix, boolean keysOnly)
public boolean isPersistable(Class<?> dataObjectClass)
isPersistable in interface LegacyDataAppAdapterprotected DataObjectRelationship getRelationshipMetadata(Class<?> dataObjectClass, String attributeName, String attributePrefix)
protected boolean classHasSupportedFeatures(Class relationshipClass, boolean supportsLookup, boolean supportsInquiry)
public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(Object dataObject, String referenceName)
getForeignKeyFieldsPopulationState in interface LegacyDataAppAdapterpublic Map<String,String> getForeignKeysForReference(Class<?> clazz, String attributeName)
getForeignKeysForReference in interface LegacyDataAppAdapterpublic void setObjectPropertyDeep(Object bo, String propertyName, Class type, Object propertyValue) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
setObjectPropertyDeep in interface LegacyDataAppAdapterIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionpublic boolean hasPrimaryKeyFieldValues(Object dataObject)
hasPrimaryKeyFieldValues in interface LegacyDataAppAdapterpublic Class materializeClassForProxiedObject(Object object)
materializeClassForProxiedObject in interface LegacyDataAppAdapterpublic Object getNestedValue(Object bo, String fieldName)
getNestedValue in interface LegacyDataAppAdapterpublic Object createNewObjectFromClass(Class clazz)
createNewObjectFromClass in interface LegacyDataAppAdapterpublic boolean isNull(Object object)
isNull in interface LegacyDataAppAdapterpublic void setObjectProperty(Object bo, String propertyName, Class propertyType, Object propertyValue) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
setObjectProperty in interface LegacyDataAppAdapterIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionpublic <T extends Document> T findByDocumentHeaderId(Class<T> documentClass, String id)
findByDocumentHeaderId in interface LegacyDataAdapterpublic <T extends Document> List<T> findByDocumentHeaderIds(Class<T> documentClass, List<String> ids)
findByDocumentHeaderIds in interface LegacyDataAdapterpublic void setDataObjectService(org.kuali.rice.krad.data.DataObjectService dataObjectService)
public void setLookupCriteriaGenerator(LookupCriteriaGenerator lookupCriteriaGenerator)
public void setKualiConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService kualiConfigurationService)
public void setKualiModuleService(KualiModuleService kualiModuleService)
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
public ViewDictionaryService getViewDictionaryService()
public void setViewDictionaryService(ViewDictionaryService viewDictionaryService)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.