to.etc.domui.converter
Class DomainListConverter

java.lang.Object
  extended by to.etc.domui.converter.DomainListConverter
All Implemented Interfaces:
IConverter<java.lang.Object>, IObjectToStringConverter<java.lang.Object>, IStringToObjectConverter<java.lang.Object>

public final class DomainListConverter
extends java.lang.Object
implements IConverter<java.lang.Object>

Converts strings for properties whose domain is a value list (enum, boolean), using the metadata provided for that property.

Author:
Frits Jalvingh Created on Nov 17, 2009

Constructor Summary
DomainListConverter(PropertyMetaModel<?> pmm)
           
 
Method Summary
 java.lang.String convertObjectToString(java.util.Locale loc, java.lang.Object in)
          Convert the value passed into the label provided for that value.
 java.lang.Object convertStringToObject(java.util.Locale loc, java.lang.String in)
          Convert the label entered into the value for that label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainListConverter

public DomainListConverter(PropertyMetaModel<?> pmm)
Method Detail

convertObjectToString

public java.lang.String convertObjectToString(java.util.Locale loc,
                                              java.lang.Object in)
                                       throws UIException
Convert the value passed into the label provided for that value.

Specified by:
convertObjectToString in interface IObjectToStringConverter<java.lang.Object>
Throws:
UIException
See Also:
IObjectToStringConverter.convertObjectToString(java.util.Locale, java.lang.Object)

convertStringToObject

public java.lang.Object convertStringToObject(java.util.Locale loc,
                                              java.lang.String in)
                                       throws UIException
Convert the label entered into the value for that label. Not normally used because LOV items are usually represented by a combobox.

Specified by:
convertStringToObject in interface IStringToObjectConverter<java.lang.Object>
Throws:
UIException
See Also:
IStringToObjectConverter.convertStringToObject(java.util.Locale, java.lang.String)