org.compass.core.converter.basic
Class EnumConverter

java.lang.Object
  extended by org.compass.core.converter.basic.AbstractBasicConverter
      extended by org.compass.core.converter.basic.EnumConverter
All Implemented Interfaces:
Converter, ResourcePropertyConverter

public class EnumConverter
extends AbstractBasicConverter

Author:
kimchy

Constructor Summary
EnumConverter()
           
 
Method Summary
 Object fromString(String str, ResourcePropertyMapping resourcePropertyMapping)
          Converts from a String and into it's Object representation.
 String toString(Object o, ResourcePropertyMapping resourcePropertyMapping)
          Default implementation of toString, simply calls the Object toString.
 
Methods inherited from class org.compass.core.converter.basic.AbstractBasicConverter
getNullValue, handleNulls, isNullValue, marshall, unmarshall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumConverter

public EnumConverter()
Method Detail

fromString

public Object fromString(String str,
                         ResourcePropertyMapping resourcePropertyMapping)
                  throws ConversionException
Description copied from interface: ResourcePropertyConverter
Converts from a String and into it's Object representation.

Parameters:
str - The string to convert from
resourcePropertyMapping - The resource property mapping
Returns:
Theh object converterd from the String
Throws:
ConversionException

toString

public String toString(Object o,
                       ResourcePropertyMapping resourcePropertyMapping)
Description copied from class: AbstractBasicConverter
Default implementation of toString, simply calls the Object toString.

Specified by:
toString in interface ResourcePropertyConverter
Overrides:
toString in class AbstractBasicConverter
Parameters:
o - The Object to convert from
resourcePropertyMapping - The resource proeprty mapping
Returns:
The String converted from the Object


Copyright (c) 2004-2006 The Compass Project.