public final class XPFEntityUtil extends Object
| Modifier | Constructor and Description | 
|---|---|
private  | 
XPFEntityUtil()  | 
| 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. 
 | 
private static Optional<XPFAttributeValue> | 
retrieveValueFromLocalizedPropertiesMap(String key,
                                       Locale locale,
                                       Map<Locale,Map<String,XPFAttributeValue>> attributeValues)  | 
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 keyprivate static Optional<XPFAttributeValue> retrieveValueFromLocalizedPropertiesMap(String key, Locale locale, Map<Locale,Map<String,XPFAttributeValue>> attributeValues)
public 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.Copyright © 2022. All rights reserved.