public final class XPFEntityUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createLazyLoadExceptionWrappingProxy(T field)
Create a proxy that translates thrown exceptions to
XPFLazyLoadException. |
static Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale,
Map<Locale,Map<String,XPFAttributeValue>> attributeValues)
Returns the attribute value with the passed key (case-insensitive match) and locale.
|
static <V> Optional<V> |
getLocalizedMapValueByKey(Locale key,
Map<Locale,V> map)
Returns the value from a map for a given Locale key using
broadening fallback behavior.
|
static String |
getValueWithoutPrefix(String value,
char separator)
Remove all characters up to (and including) a separator character from a string.
|
static String |
getValueWithPrefix(String value,
char separator,
String prefix,
String prefixValueToIgnore)
Return the value with the specified prefix and separator added, unless prefix equals prefixValueToIgnore, in which case only the value
should be returned.
|
public static Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale, Map<Locale,Map<String,XPFAttributeValue>> attributeValues)
key - the attribute keylocale - the attribute value localeattributeValues - the map of attribute values keyed by locale and then by attribute keypublic static <V> Optional<V> getLocalizedMapValueByKey(Locale key, Map<Locale,V> map)
V - The value type.key - The locale to look for.map - The map to search.public static <T> T createLazyLoadExceptionWrappingProxy(T field)
XPFLazyLoadException.T - The class of the field.field - The field to proxy.public static String getValueWithoutPrefix(String value, char separator)
value - the value to remove the prefix fromseparator - the character that separates the prefix from the rest of the valuepublic static String getValueWithPrefix(String value, char separator, String prefix, String prefixValueToIgnore)
value - the value to always returnseparator - the separator between the prefix and the valueprefix - the prefix to addprefixValueToIgnore - the prefix value that should be ignoredCopyright © 2026. All rights reserved.