/** * Creates a new {@code LazyDynaMap} object for the given property value. * * @param value the property value * @return the newly created {@code LazyDynaMap} */ private LazyDynaMap createDynaBeanForMapProperty(final Object value) { @SuppressWarnings("unchecked") final // map properties are always stored as Map<String, Object> Map<String, Object> valueMap = (Map<String, Object>) value; return new LazyDynaMap(valueMap); }
/** * Creates a new {@code LazyDynaMap} object for the given property value. * * @param value the property value * @return the newly created {@code LazyDynaMap} */ private LazyDynaMap createDynaBeanForMapProperty(final Object value) { @SuppressWarnings("unchecked") final // map properties are always stored as Map<String, Object> Map<String, Object> valueMap = (Map<String, Object>) value; return new LazyDynaMap(valueMap); }
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map<String, Object> newMap = null; try { @SuppressWarnings("unchecked") final // The new map is used as properties map Map<String, Object> temp = getMap().getClass().newInstance(); newMap = temp; } catch(final Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties final LazyDynaMap lazyMap = new LazyDynaMap(newMap); final DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (DynaProperty propertie : properties) { lazyMap.add(propertie); } } return lazyMap; }
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map<String, Object> newMap = null; try { @SuppressWarnings("unchecked") final // The new map is used as properties map Map<String, Object> temp = getMap().getClass().newInstance(); newMap = temp; } catch(final Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties final LazyDynaMap lazyMap = new LazyDynaMap(newMap); final DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (DynaProperty propertie : properties) { lazyMap.add(propertie); } } return lazyMap; }
public DynaBeanACRParameter() { policyProperties = new LazyDynaMap(); }
/** * Creates a new {@code LazyDynaMap} object for the given property value. * * @param value the property value * @return the newly created {@code LazyDynaMap} */ private LazyDynaMap createDynaBeanForMapProperty(final Object value) { @SuppressWarnings("unchecked") final // map properties are always stored as Map<String, Object> Map<String, Object> valueMap = (Map<String, Object>) value; return new LazyDynaMap(valueMap); }
public DynaBeanACRParameter() { policyProperties = new LazyDynaMap(); }
setDecoratedDynaObjectList(rsdc.getRows()); Iterator<DynaBean> it=decoratedDynaObjectList.iterator(); while(it.hasNext()){ BasicDynaBean dynaBean = (BasicDynaBean) it.next(); Map<String,Object> modifiableMap=new DynaBeanPropertyMapDecorator(dynaBean, false); DynaBean mutableDynaBean=new LazyDynaMap(modifiableMap); modifiableDynaObjectList.add(mutableDynaBean); }
dynaBean = new LazyDynaMap((Map)object); this.elementDynaClass = dynaBean.getDynaClass(); } else if (DynaBean.class.isAssignableFrom(elementType)) {
dynaBean = new LazyDynaMap((Map)object); this.elementDynaClass = dynaBean.getDynaClass(); } else if (DynaBean.class.isAssignableFrom(elementType)) {
dynaBean = new LazyDynaMap((Map)object); this.elementDynaClass = dynaBean.getDynaClass(); } else if (DynaBean.class.isAssignableFrom(elementType)) {
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map newMap = null; try { newMap = (Map)getMap().getClass().newInstance(); } catch(Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties LazyDynaMap lazyMap = new LazyDynaMap(newMap); DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (int i = 0; i < properties.length; i++) { lazyMap.add(properties[i]); } } return lazyMap; }
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map newMap = null; try { newMap = (Map)getMap().getClass().newInstance(); } catch(Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties LazyDynaMap lazyMap = new LazyDynaMap(newMap); DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (int i = 0; i < properties.length; i++) { lazyMap.add(properties[i]); } } return lazyMap; }
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map newMap = null; try { newMap = (Map)getMap().getClass().newInstance(); } catch(Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties LazyDynaMap lazyMap = new LazyDynaMap(newMap); DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (int i = 0; i < properties.length; i++) { lazyMap.add(properties[i]); } } return lazyMap; }
dynaBean = new LazyDynaMap((Map)element); } else if (DynaBean.class.isAssignableFrom(element.getClass())) { dynaBean = (DynaBean)element;
dynaBean = new LazyDynaMap((Map)element); } else if (DynaBean.class.isAssignableFrom(element.getClass())) { dynaBean = (DynaBean)element;
/** * Instantiate and return a new DynaBean instance, associated * with this DynaClass. * @return A new <code>DynaBean</code> instance */ public DynaBean newInstance() { // Create a new instance of the Map Map<String, Object> newMap = null; try { @SuppressWarnings("unchecked") final // The new map is used as properties map Map<String, Object> temp = getMap().getClass().newInstance(); newMap = temp; } catch(final Exception ex) { newMap = newMap(); } // Crate new LazyDynaMap and initialize properties final LazyDynaMap lazyMap = new LazyDynaMap(newMap); final DynaProperty[] properties = this.getDynaProperties(); if (properties != null) { for (DynaProperty propertie : properties) { lazyMap.add(propertie); } } return lazyMap; }
dynaBean = new LazyDynaMap((Map)element); } else if (DynaBean.class.isAssignableFrom(element.getClass())) { dynaBean = (DynaBean)element;
public Object convert(Class type, Object value) { try { LazyDynaMap dynaMap = new LazyDynaMap((Map<String, Object>) value); WrapDynaBean bean = (WrapDynaBean) WrapDynaClass.createDynaClass(type).newInstance(); beanUtils.copyProperties(bean, dynaMap); beanUtils.copyProperty(bean, "", value); return bean.getInstance(); } catch (Exception e) { throw new UnhandledException(e); } } }