public void postLoad(Object pc) { if (pc instanceof LoadCallback) { ((LoadCallback) pc).jdoPostLoad(); } Iterator iter = listeners.iterator(); while (iter.hasNext()) { LifecycleListenerForClass listener = (LifecycleListenerForClass) iter.next(); if (listener.forClass(pc.getClass()) && listener.getListener() instanceof LoadLifecycleListener) { ((LoadLifecycleListener)listener.getListener()).postLoad(new InstanceLifecycleEvent(pc, InstanceLifecycleEvent.LOAD, null)); } } }
private ZooPC readObjPrivate(ZooPC pObj, ZooClassDef clsDef) { // read first object (FCO) //read fixed size part deserializeFields1( pObj, clsDef ); //read variable size part deserializeFields2( pObj, clsDef ); //read special classes if (pObj instanceof DBCollection) { deserializeSpecial( pObj ); } postProcessCollections(); if (pObj instanceof LoadCallback) { ((LoadCallback)pObj).jdoPostLoad(); } pObj.jdoZooGetContext().notifyEvent(pObj, ZooInstanceEvent.LOAD); return pObj; }
/** * Callback after the fields of the object are loaded. * @param pc The Object */ public void postLoad(Object pc) { if (pc instanceof LoadCallback) { try { ((LoadCallback) pc).jdoPostLoad(); } catch (Exception e) { throw new JDOUserCallbackException(Localiser.msg("025001", "jdoPostLoad"), e); } } for (LifecycleListenerForClass listener : getListenersWorkingCopy()) { if (listener.forClass(pc.getClass()) && listener.getListener() instanceof LoadLifecycleListener) { ((LoadLifecycleListener)listener.getListener()).postLoad(new InstanceLifecycleEvent(pc, InstanceLifecycleEvent.LOAD, null)); } } }