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 void recordWrite(String upstring, SubmittedValueEntry sve) { recordMap(writemap, upstring, sve); String up2 = PathUtil.getToTailPath(upstring); if (up2 != null) { recordMap(writemap, up2, sve); } mapwrite.put(sve, upstring); }
public SubmittedValueEntry getUpstreamComponent(String writepath) { List writers = elmap.getWriters(writepath); if (writers == null) return null; for (int i = 0; i < writers.size(); ++ i) { SubmittedValueEntry writer = (SubmittedValueEntry) writers.get(i); if (writer.componentid != null) return writer; String readpath = elmap.getReadPath(writer); while (readpath != null) { SubmittedValueEntry sve = getUpstreamComponent(readpath); if (sve != null) return sve; readpath = PathUtil.getToTailPath(readpath); } } return null; }
private void scheduleWrites(String writepath) { // NB, the keeping of this on the stack results from being SURE that we // can never recur to this path as a result of attemptEvaluate of // a parent path (Even though we clearly do this as a result of fearing // recurring to it from further up our *own* stack). List writingbeans = elmap.getWriters(writepath); if (writingbeans == ELDependencyMap.VALID_LIST_MARKER) return; // If we *write* a path, all pending *writes* to higher paths must already // be done. String parentpath = PathUtil.getToTailPath(writepath); if (parentpath != null) { scheduleWrites(parentpath); } if (writingbeans != null) { for (int i = 0; i < writingbeans.size(); ++i) { SubmittedValueEntry sve = (SubmittedValueEntry) writingbeans.get(i); if (!emitted.contains(sve)) { attemptEvaluate(sve); } } elmap.recordPathValid(writepath); } } }
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 (guard == null && guardEL == null) { if (guardmethod != null) { guardEL = PathUtil.getToTailPath(guardmethod); guardmethod = PathUtil.getTailPath(guardmethod); guardEL = PathUtil.getToTailPath(guardproperty); guardproperty = PathUtil.getTailPath(guardproperty);