- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback!
Small helpers and utils for repository actions.
Project
com.corzia.comflow.utils
List of methods
getConstantFromValue
Get the name/description of a value in a constant for a column.
Argument | Column c, String value, String localeId |
Returns | String with the constant name/description for the value argument |
Example of usage
String description = RepositoryUtilExtra.getConstantFromValue(column, "12", "SE_sv");
Code
public static String getConstantFromValue(Column c, String value, String localeId) {
String[] consts = c.getColumnConstants();
for (int j = 0; j < consts.length; j++) {
String constId = c.getColumnConstantId(consts[j]);
if (consts[j].equals(value)) {
return RepositoryUtil.getConstant(c.getMetadataId(), constId, localeId);
}
}
return null;
}
Was this article helpful?