|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kns.lookup.DataDictionaryLookupResultsSupportStrategy
public class DataDictionaryLookupResultsSupportStrategy
LookupResults support strategy which uses the primary keys and lookupable defined in a business object's data dictionary file to support the multivalue lookup
Constructor Summary | |
---|---|
DataDictionaryLookupResultsSupportStrategy()
|
Method Summary | ||
---|---|---|
protected Map<String,String> |
convertLookupIdToPKFieldMap(String lookupId,
Class<? extends BusinessObject> businessObjectClass)
Converts a lookup id into a PK field map to use to search in a lookupable |
|
protected String |
convertPKFieldMapToLookupId(List<String> pkFieldNames,
BusinessObject businessObject)
Converts a Map of PKFields into a String lookup ID |
|
protected BusinessObjectEntry |
getBusinessObjectEntry(Class<? extends BusinessObject> boClass)
Looks up the DataDictionary BusinessObjectEntry for the given class |
|
DataDictionaryService |
getDataDictionaryService()
|
|
protected Lookupable |
getLookupableForBusinessObject(Class<? extends BusinessObject> businessObjectClass)
Retrieves the Lookupable for the given business object class |
|
String |
getLookupIdForBusinessObject(BusinessObject businessObject)
Builds a lookup id for the given business object |
|
protected List<String> |
getPrimaryKeyFieldsForBusinessObject(Class<? extends BusinessObject> businessObjectClass)
Returns the data dictionary defined primary keys for the given BusinessObject |
|
boolean |
qualifiesForStrategy(Class<? extends BusinessObject> boClass)
Determines if both the primary keys and Lookupable are present in the data dictionary definition; if so, the BO qualifies, but if either are missing, it does not |
|
protected Formatter |
retrieveBestFormatter(String propertyName,
Class<? extends BusinessObject> boClass)
Like when you're digging through your stuff drawer, you know the one in the kitchen with all the batteries and lint in it, this method goes through the stuff drawer of KNS formatters and attempts to return you a good one |
|
|
retrieveSelectedResultBOs(Class<T> boClass,
Set<String> lookupIds)
Uses the Lookupable associated with the given BusinessObject to search for business objects |
|
void |
setDataDictionaryService(DataDictionaryService dataDictionaryService)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataDictionaryLookupResultsSupportStrategy()
Method Detail |
---|
public String getLookupIdForBusinessObject(BusinessObject businessObject)
getLookupIdForBusinessObject
in interface LookupResultsSupportStrategyService
businessObject
- the lookup to generate an id for
LookupResultsSupportStrategyService.getLookupIdForBusinessObject(org.kuali.rice.krad.bo.BusinessObject)
public boolean qualifiesForStrategy(Class<? extends BusinessObject> boClass)
qualifiesForStrategy
in interface LookupResultsSupportStrategyService
boClass
- the class to test the determination on
LookupResultsSupportStrategyService.qualifiesForStrategy(java.lang.Class)
public <T extends BusinessObject> Collection<T> retrieveSelectedResultBOs(Class<T> boClass, Set<String> lookupIds) throws Exception
retrieveSelectedResultBOs
in interface LookupResultsSupportStrategyService
boClass
- the class of the business object to retrieve
Exception
- if anything goes wrong...well, just blow up, okay?LookupResultsSupportStrategyService#retrieveSelectedResultBOs(java.lang.String, java.lang.Class, java.lang.String, org.kuali.rice.krad.lookup.LookupResultsService)
protected Lookupable getLookupableForBusinessObject(Class<? extends BusinessObject> businessObjectClass)
businessObjectClass
- the class to find the Lookupable for
protected List<String> getPrimaryKeyFieldsForBusinessObject(Class<? extends BusinessObject> businessObjectClass)
businessObjectClass
- the business object to get DataDictionary defined primary keys for
protected Map<String,String> convertLookupIdToPKFieldMap(String lookupId, Class<? extends BusinessObject> businessObjectClass)
lookupId
- the id returned by the lookupbusinessObjectClass
- the class of the business object getting the primary key
protected String convertPKFieldMapToLookupId(List<String> pkFieldNames, BusinessObject businessObject)
pkFieldNames
- the name of the PK fields, which should be converted to the given lookupIdbusinessObjectClass
- the class of the business object getting the primary key
protected Formatter retrieveBestFormatter(String propertyName, Class<? extends BusinessObject> boClass)
propertyName
- the name of the property to retrieveboClass
- the class of the BusinessObject the property is on
protected BusinessObjectEntry getBusinessObjectEntry(Class<? extends BusinessObject> boClass)
boClass
- the class of the BusinessObject to find a BusinessObjectEntry for
public DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(DataDictionaryService dataDictionaryService)
dataDictionaryService
- the dataDictionaryService to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |