com.elasticpath.web.ajax.dwrconverter
Class EpHibernateExceptionConverter

java.lang.Object
  extended by uk.ltd.getahead.dwr.compat.BaseV10Converter
      extended by uk.ltd.getahead.dwr.convert.BeanConverter
          extended by com.elasticpath.web.ajax.dwrconverter.EpBeanConverter
              extended by com.elasticpath.web.ajax.dwrconverter.EpHibernateExceptionConverter
All Implemented Interfaces:
uk.ltd.getahead.dwr.Converter

public class EpHibernateExceptionConverter
extends EpBeanConverter

Converter for that Category class. The bi-directional relationship between category child(s) and parent(s) was causing DWR trouble. Instead of 'setParent' 'setParentOneWay' should be called.


Constructor Summary
EpHibernateExceptionConverter()
          Creates a new EpCategoryConverter object.
 
Method Summary
 java.lang.String convertOutbound(java.lang.Object data, java.lang.String varname, uk.ltd.getahead.dwr.OutboundContext outctx)
          Convert the java object to js side.
 
Methods inherited from class com.elasticpath.web.ajax.dwrconverter.EpBeanConverter
convertInbound
 
Methods inherited from class uk.ltd.getahead.dwr.convert.BeanConverter
getConverterManager, getInstanceType, isAvailable, setConverterManager, setExclude, setImplementation, setInclude, setInstanceType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ltd.getahead.dwr.Converter
setConverterManager
 

Constructor Detail

EpHibernateExceptionConverter

public EpHibernateExceptionConverter()
                              throws java.lang.ClassNotFoundException
Creates a new EpCategoryConverter object.

Throws:
java.lang.ClassNotFoundException - If Hibernate can not be configured
Method Detail

convertOutbound

public java.lang.String convertOutbound(java.lang.Object data,
                                        java.lang.String varname,
                                        uk.ltd.getahead.dwr.OutboundContext outctx)
                                 throws uk.ltd.getahead.dwr.ConversionException
Convert the java object to js side.

Specified by:
convertOutbound in interface uk.ltd.getahead.dwr.Converter
Overrides:
convertOutbound in class EpBeanConverter
Parameters:
data - - The object to be converted.
varname - - The variable name on the js side.
outctx - - The outbound context.
Returns:
the string for representation of the object
Throws:
uk.ltd.getahead.dwr.ConversionException - if fails to do the conversion