1 16 package org.directwebremoting.hibernate; 17 18 import java.beans.PropertyDescriptor ; 19 20 import net.sf.hibernate.LazyInitializationException; 21 22 import org.directwebremoting.extend.MarshallException; 23 import org.directwebremoting.extend.Property; 24 import org.directwebremoting.impl.PropertyDescriptorProperty; 25 26 32 public class H2PropertyDescriptorProperty extends PropertyDescriptorProperty 33 { 34 38 public H2PropertyDescriptorProperty(PropertyDescriptor descriptor) 39 { 40 super(descriptor); 41 } 42 43 46 public Object getValue(Object bean) throws MarshallException 47 { 48 try 49 { 50 return super.getValue(bean); 51 } 52 catch (LazyInitializationException ex) 53 { 54 return null; 55 } 56 catch (Exception ex) 57 { 58 throw new MarshallException(bean.getClass(), ex); 59 } 60 } 61 } 62 | Popular Tags |