1 10 11 package org.mule.providers.gs.filters; 12 13 import java.lang.reflect.InvocationTargetException ; 14 15 import net.jini.core.entry.Entry; 16 17 import org.apache.commons.beanutils.BeanUtils; 18 import org.mule.providers.gs.GigaSpacesEntryConverter; 19 import org.mule.util.ClassUtils; 20 21 24 public class GigaSpacesTemplateFilter extends JavaSpaceTemplateFilter 25 { 26 private GigaSpacesEntryConverter converter = new GigaSpacesEntryConverter(); 27 28 public Entry getEntry() 29 throws IllegalAccessException , NoSuchMethodException , InvocationTargetException , 30 InstantiationException , ClassNotFoundException 31 { 32 if (entry == null) 33 { 34 if (expectedType == null) 35 { 36 return null; } 38 Object entryType = ClassUtils.instanciateClass(expectedType, ClassUtils.NO_ARGS); 39 if (fields.size() > 0) 40 { 41 BeanUtils.populate(entryType, fields); 42 } 43 entry = converter.toEntry(entryType, null); 44 } 45 return entry; 46 } 47 48 } 49 | Popular Tags |