Package com.espertech.esper.event.bean

Examples of com.espertech.esper.event.bean.BeanEventPropertyWriter


                writers = new HashMap<String, BeanEventPropertyWriter>();
                writersMap.put(beanClass, writers);
                FastClass fastClass = FastClass.create(Thread.currentThread().getContextClassLoader(), beanClass);
                for (WriteablePropertyDescriptor prop : props) {
                    FastMethod writerMethod = fastClass.getMethod(prop.getWriteMethod());
                    writers.put(prop.getPropertyName(), new BeanEventPropertyWriter(beanClass, writerMethod));
                }
                // populate writers
            }

            beanToSend = beanClass.newInstance();

            for (Map.Entry<String, Object> entry : mapToSend.entrySet()) {
                BeanEventPropertyWriter writer = writers.get(entry.getKey());
                if (writer != null) {
                    writer.writeValue(entry.getValue(), beanToSend);
                }
            }
        }
        catch (Exception e) {
            throw new EPException("Cannot populate bean instance", e);
View Full Code Here


                writers = new HashMap<String, BeanEventPropertyWriter>();
                writersMap.put(beanClass, writers);
                FastClass fastClass = FastClass.create(beanClass);
                for (WriteablePropertyDescriptor prop : props) {
                    FastMethod writerMethod = fastClass.getMethod(prop.getWriteMethod());
                    writers.put(prop.getPropertyName(), new BeanEventPropertyWriter(beanClass, writerMethod));
                }
                // populate writers
            }

            beanToSend = beanClass.newInstance();

            for (Map.Entry<String, Object> entry : mapToSend.entrySet()) {
                BeanEventPropertyWriter writer = writers.get(entry.getKey());
                if (writer != null) {
                    writer.writeValue(entry.getValue(), beanToSend);
                }
            }
        }
        catch (Exception e) {
            throw new EPException("Cannot populate bean instance", e);
View Full Code Here

TOP

Related Classes of com.espertech.esper.event.bean.BeanEventPropertyWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.