public void saveAll() { if (sebl.saveEL != null) { String penultimate = PathUtil.getToTailPath(sebl.saveEL); String savemethod = PathUtil.getTailPath(sebl.saveEL); Object saver = sebl.bma.getBeanValue(penultimate, beanlocator, null); for (Iterator it = delivered.keySet().iterator(); it.hasNext();) { String key = (String) it.next(); Object value = delivered.get(key); sebl.reflectivecache.invokeMethod(saver, savemethod, new Object[] { value }); } } }
public DataAlterationRequest reshapeDAR(DataAlterationRequest toshape) { if (toshape.type.equals(DataAlterationRequest.ADD)) { String cutback = PathUtil.getToTailPath(toshape.path); // cutback may be null! so examine methods of cutback2. This MUST // be a concrete object!! String cutback2 = PathUtil.getToTailPath(cutback); String membername = PathUtil.getTailPath(cutback); Object lastentity = bma.getBeanValue(cutback2, rbl, addressibleBeanModel); MethodAnalyser ma = mappingcontext.getAnalyser(lastentity.getClass()); AccessMethod sam = ma.getAccessMethod(membername); String entityname = eni.getEntityName(sam.getDeclaredType()); if (entityname == null) { String message = "ID Defunnelling reshaper could not infer entity name for entity of type " + sam.getDeclaredType() + " - make sure to supply an EntityNameInferrer for this type"; Logger.log.warn(message); throw new IllegalArgumentException(message); } Object newentity = null; if (toshape.data != null) { // data has already been conformed in type to "oldvalue" and so is at least scalar String newentitypath = PathUtil.buildPath(entityname, (String)toshape.data); newentity = bma.getBeanValue(newentitypath, rbl, addressibleBeanModel); } DataAlterationRequest togo = new DataAlterationRequest(cutback, newentity); return togo; } else { return toshape; } }
if (guardmethod != null) { guardEL = PathUtil.getToTailPath(guardmethod); guardmethod = PathUtil.getTailPath(guardmethod); guardproperty = PathUtil.getTailPath(guardproperty);