org.openregistry.core.web
Class RegionConverter

java.lang.Object
  extended by org.springframework.binding.convert.converters.StringToObject
      extended by org.openregistry.core.web.AbstractConverter
          extended by org.openregistry.core.web.RegionConverter
All Implemented Interfaces:
org.springframework.binding.convert.converters.Converter, org.springframework.binding.convert.converters.TwoWayConverter

public final class RegionConverter
extends AbstractConverter

Converts a Region from its code to the actual object, and back.

Since:
0.1
Version:
$Revision$ $Date$

Field Summary
 
Fields inherited from class org.openregistry.core.web.AbstractConverter
logger
 
Constructor Summary
RegionConverter(ReferenceRepository referenceRepository)
           
 
Method Summary
protected  java.lang.String getToStringInternal(java.lang.Object o)
          Returns the object as a String.
protected  java.lang.Object toObject(java.lang.String string, java.lang.Class targetClass)
           
 
Methods inherited from class org.openregistry.core.web.AbstractConverter
getReferenceRepository, toString
 
Methods inherited from class org.springframework.binding.convert.converters.StringToObject
convertSourceToTargetClass, convertTargetToSourceClass, getSourceClass, getTargetClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionConverter

public RegionConverter(ReferenceRepository referenceRepository)
Method Detail

toObject

protected java.lang.Object toObject(java.lang.String string,
                                    java.lang.Class targetClass)
                             throws java.lang.Exception
Specified by:
toObject in class org.springframework.binding.convert.converters.StringToObject
Throws:
java.lang.Exception

getToStringInternal

protected java.lang.String getToStringInternal(java.lang.Object o)
Description copied from class: AbstractConverter
Returns the object as a String.

Specified by:
getToStringInternal in class AbstractConverter
Parameters:
o - the object. CANNOT be NULL.
Returns:
the string.


Copyright © 2009-2012 JA-SIG, Inc.. All Rights Reserved.