public abstract class CodeDescriptionFormatterBase extends Object implements CodeDescriptionFormatter
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DESCRIPTION |
static int |
INIT_BUFFER_SIZE
The output string will probably be larger than the default StringBuffer size of 10, so lets avoid 1 memory allocation and
copy
|
Constructor and Description |
---|
CodeDescriptionFormatterBase() |
Modifier and Type | Method and Description |
---|---|
protected String |
getDefaultDescription() |
protected abstract String |
getDescriptionOfBO(org.kuali.rice.krad.bo.PersistableBusinessObject bo)
Returns the description of a BO
|
String |
getFormattedStringWithDescriptions(Set values,
String startConjunction,
String endConjunction)
Given a set of codes, this class will form a format a string that includes their description Example: Codes A, B, C may be
formatted to "A, descA; B, descB; and C; descC"
|
protected abstract Map<String,org.kuali.rice.krad.bo.PersistableBusinessObject> |
getValuesToBusinessObjectsMap(Set values)
Returns a Map such that the values in the values set will map to the appropriate BO There may be mappings for values that are
not in the parameter set Use this method sparingly, as it will likely cause an access to the DB It may be desirable to use
the values to limit the breadth of the search, and it is up to the implementation to decide whether to use it to do so.
|
public static final String DEFAULT_DESCRIPTION
public static final int INIT_BUFFER_SIZE
public CodeDescriptionFormatterBase()
public String getFormattedStringWithDescriptions(Set values, String startConjunction, String endConjunction)
CodeDescriptionFormatter
getFormattedStringWithDescriptions
in interface CodeDescriptionFormatter
startConjunction
- a conjunction or phrase to be used for the beginning of the series (e.g. "either", "neither", "any 3
of" etc.)endConjunction
- a conjunction to be used for the beginning of the series (e.g. "and", "or", "and/or")org.kuali.ole.sys.document.webCodeDescriptionFormatter#getFormattedStringWithDescriptions(java.util.Set,
java.lang.String, java.lang.String)
protected abstract Map<String,org.kuali.rice.krad.bo.PersistableBusinessObject> getValuesToBusinessObjectsMap(Set values)
values
- a set of values to limit the retrieval from (optional feature), may be nullprotected abstract String getDescriptionOfBO(org.kuali.rice.krad.bo.PersistableBusinessObject bo)
bo
- protected String getDefaultDescription()
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.