public class AtomicValueTranslator extends SingleValueTranslator
| Constructor and Description |
|---|
AtomicValueTranslator(AttributeDescriptor attributeDescriptor,
Class javaClass) |
AtomicValueTranslator(Class javaClass) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertToJalo(String valueExpr,
Item forItem)
Converts a non-null and non-empty string into a jalo attribute value.
|
protected String |
convertToString(Object value)
Converts a non-null jalo attribute value into its string representation.
|
protected AttributeDescriptor |
getAttributeDescriptor()
Returns the assigned AttributeDescriptor.
|
protected DateFormat |
getDateFormat()
Returns the DateFormat or a default one.
|
protected String |
getDateFormatString(AbstractDescriptor columnDescriptor) |
DateFormat |
getDefaultDateFormat()
Returns a default DateFormat with the default formating and the default locale.
|
NumberFormat |
getDefaultNumberFormat()
Returns a default NumberFormat instance constructed with configured locale or
Locale.German as
default. |
protected NumberFormat |
getNumberFormat()
Returns the NumberFormat or a default one.
|
protected String |
getNumberFormatString(AbstractDescriptor columnDescriptor) |
protected boolean |
holdsUnresolvableItems(Object object) |
void |
init(StandardColumnDescriptor columnDescriptor)
Called once per header creation to allow configuring this translator using column modifiers etc.
|
protected boolean |
isSupportedClass(Class myClass) |
void |
setDateFormat(DateFormat format)
Sets the date format used for date translation.
|
void |
setDateFormat(String format) |
void |
setLocale(Locale locale)
Sets the locale used for default formats to another one (default is session locale).
|
void |
setNumberFormat(NumberFormat format)
Sets the number format used for number translation.
|
void |
setNumberFormat(String format) |
void |
validate(StandardColumnDescriptor columnDescriptor)
Validates the value translator once per header creation.
|
exportValue, getEmptyValue, importValue, isEmptyclearStatus, createTranslator, createTranslator, createTranslator, debug, error, getColumnDescriptor, getFlexibleSearch, info, isDebugEnabled, isInfoEnabled, setEmpty, setError, warn, wasEmpty, wasUnresolvedpublic AtomicValueTranslator(Class javaClass)
public AtomicValueTranslator(AttributeDescriptor attributeDescriptor, Class javaClass)
public void setLocale(Locale locale)
locale - locale to use for value translation with default formatspublic void setDateFormat(DateFormat format)
getDefaultDateFormat()).format - date format to use for date translationpublic void setDateFormat(String format)
public void setNumberFormat(NumberFormat format)
getDefaultNumberFormat()).format - number format to use for number translationpublic void setNumberFormat(String format)
protected AttributeDescriptor getAttributeDescriptor()
null!!protected String getDateFormatString(AbstractDescriptor columnDescriptor)
protected String getNumberFormatString(AbstractDescriptor columnDescriptor)
protected DateFormat getDateFormat()
protected NumberFormat getNumberFormat()
public NumberFormat getDefaultNumberFormat()
Locale.German as
default.public DateFormat getDefaultDateFormat()
public void init(StandardColumnDescriptor columnDescriptor)
AbstractValueTranslatorinit in class AbstractValueTranslatorcolumnDescriptor - descriptor where the value to translate belongs topublic void validate(StandardColumnDescriptor columnDescriptor) throws HeaderValidationException
AbstractValueTranslatorvalidate in class AbstractValueTranslatorcolumnDescriptor - descriptor where the value to translate belongs toHeaderValidationException - validation has thrown errorsprotected boolean isSupportedClass(Class myClass)
protected String convertToString(Object value)
SingleValueTranslatorconvertToString in class SingleValueTranslatorvalue - value to translateprotected Object convertToJalo(String valueExpr, Item forItem)
SingleValueTranslatorconvertToJalo in class SingleValueTranslatorvalueExpr - string to translateforItem - item instance the translated value will be set to as attributeprotected boolean holdsUnresolvableItems(Object object)
Copyright © 2017 SAP SE. All Rights Reserved.