Class AtomicValueTranslator

    • Constructor Detail

      • AtomicValueTranslator

        public AtomicValueTranslator​(java.lang.Class javaClass)
      • AtomicValueTranslator

        public AtomicValueTranslator​(AttributeDescriptor attributeDescriptor,
                                     java.lang.Class javaClass)
    • Method Detail

      • setLocale

        public void setLocale​(java.util.Locale locale)
        Sets the locale used for default formats to another one (default is session locale).
        Parameters:
        locale - locale to use for value translation with default formats
      • setDateFormat

        public void setDateFormat​(java.text.DateFormat format)
        Sets the date format used for date translation. If set to null the default format will be used (see getDefaultDateFormat()).
        Parameters:
        format - date format to use for date translation
      • setDateFormat

        public void setDateFormat​(java.lang.String format)
      • setNumberFormat

        public void setNumberFormat​(java.text.NumberFormat format)
        Sets the number format used for number translation. If set to null the default format will be used (see getDefaultNumberFormat()).
        Parameters:
        format - number format to use for number translation
      • setNumberFormat

        public void setNumberFormat​(java.lang.String format)
      • getAttributeDescriptor

        protected AttributeDescriptor getAttributeDescriptor()
        Returns the assigned AttributeDescriptor.
        Returns:
        the assigned attributeDescriptor, which could be null!!
      • getDateFormatString

        protected java.lang.String getDateFormatString​(AbstractDescriptor columnDescriptor)
      • getNumberFormatString

        protected java.lang.String getNumberFormatString​(AbstractDescriptor columnDescriptor)
      • getDateFormat

        protected java.text.DateFormat getDateFormat()
        Returns the DateFormat or a default one.
        Returns:
        DateFormat
      • getNumberFormat

        protected java.text.NumberFormat getNumberFormat()
        Returns the NumberFormat or a default one.
        Returns:
        NumberFormat
      • getDefaultNumberFormat

        public java.text.NumberFormat getDefaultNumberFormat()
        Returns a default NumberFormat instance constructed with configured locale or Locale.German as default.
        Returns:
        NumberFormat
      • getDefaultDateFormat

        public java.text.DateFormat getDefaultDateFormat()
        Returns a default DateFormat with the default formating and the default locale.
        Returns:
        DateFormat
      • isSupportedClass

        protected boolean isSupportedClass​(java.lang.Class myClass)
      • convertToString

        protected java.lang.String convertToString​(java.lang.Object value)
        Description copied from class: SingleValueTranslator
        Converts a non-null jalo attribute value into its string representation.
        Specified by:
        convertToString in class SingleValueTranslator
        Parameters:
        value - value to translate
        Returns:
        translated value
      • convertToJalo

        protected java.lang.Object convertToJalo​(java.lang.String valueExpr,
                                                 Item forItem)
        Description copied from class: SingleValueTranslator
        Converts a non-null and non-empty string into a jalo attribute value.
        Specified by:
        convertToJalo in class SingleValueTranslator
        Parameters:
        valueExpr - string to translate
        forItem - item instance the translated value will be set to as attribute
        Returns:
        Object translated value
      • holdsUnresolvableItems

        protected boolean holdsUnresolvableItems​(java.lang.Object object)