/** * Fire before-attach event. */ void fireBeforeAttach(Object pc, ClassMetaData meta) { _broker.fireLifecycleEvent(pc, null, meta, LifecycleEvent.BEFORE_ATTACH); }
/** * Fire before-attach event. */ void fireBeforeAttach(Object pc, ClassMetaData meta) { _broker.fireLifecycleEvent(pc, null, meta, LifecycleEvent.BEFORE_ATTACH); }
/** * Fire before-attach event. */ void fireBeforeAttach(Object pc, ClassMetaData meta) { _broker.fireLifecycleEvent(pc, null, meta, LifecycleEvent.BEFORE_ATTACH); }
/** * Fire before-attach event. */ void fireBeforeAttach(Object pc, ClassMetaData meta) { _broker.fireLifecycleEvent(pc, null, meta, LifecycleEvent.BEFORE_ATTACH); }
/** * Fire before-attach event. */ void fireBeforeAttach(Object pc, ClassMetaData meta) { _broker.fireLifecycleEvent(pc, null, meta, LifecycleEvent.BEFORE_ATTACH); }
/** * Fire the given lifecycle event to all listeners. */ private boolean fireLifecycleEvent(int type) { return _broker.fireLifecycleEvent(getManagedInstance(), null, _meta, type); }
/** * Invoke postAttach() on any attached instances that implement * PostAttachCallback. This will be done after the entire graph has * been attached. */ private List invokeAfterAttach(List exceps) { Set entries = _attached.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Object attached = entry.getValue(); StateManagerImpl sm = _broker.getStateManagerImpl(attached, true); if (sm.isNew()) continue; try { _broker.fireLifecycleEvent(attached, entry.getKey(), sm.getMetaData(), LifecycleEvent.AFTER_ATTACH); } catch (RuntimeException re) { exceps = add(exceps, re); if (_failFast && re instanceof CallbackException) break; } } return exceps; }
/** * Invoke postAttach() on any attached instances that implement * PostAttachCallback. This will be done after the entire graph has * been attached. */ private List invokeAfterAttach(List exceps) { Set entries = _attached.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Object attached = entry.getValue(); StateManagerImpl sm = _broker.getStateManagerImpl(attached, true); if (sm.isNew()) continue; try { _broker.fireLifecycleEvent(attached, entry.getKey(), sm.getMetaData(), LifecycleEvent.AFTER_ATTACH); } catch (RuntimeException re) { exceps = add(exceps, re); if (_failFast && re instanceof CallbackException) break; } } return exceps; }
/** * Invoke postAttach() on any attached instances that implement * PostAttachCallback. This will be done after the entire graph has * been attached. */ private List invokeAfterAttach(List exceps) { Set entries = _attached.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Object attached = entry.getValue(); StateManagerImpl sm = _broker.getStateManagerImpl(attached, true); if (sm.isNew()) continue; try { _broker.fireLifecycleEvent(attached, entry.getKey(), sm.getMetaData(), LifecycleEvent.AFTER_ATTACH); } catch (RuntimeException re) { exceps = add(exceps, re); if (_failFast && re instanceof CallbackException) break; } } return exceps; }
/** * Invoke postAttach() on any attached instances that implement * PostAttachCallback. This will be done after the entire graph has * been attached. */ private List invokeAfterAttach(List exceps) { Set entries = _attached.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Object attached = entry.getValue(); StateManagerImpl sm = _broker.getStateManagerImpl(attached, true); if (sm.isNew()) continue; try { _broker.fireLifecycleEvent(attached, entry.getKey(), sm.getMetaData(), LifecycleEvent.AFTER_ATTACH); } catch (RuntimeException re) { exceps = add(exceps, re); if (_failFast && re instanceof CallbackException) break; } } return exceps; }
/** * Invoke postAttach() on any attached instances that implement * PostAttachCallback. This will be done after the entire graph has * been attached. */ private List invokeAfterAttach(List exceps) { Set entries = _attached.entrySet(); for (Iterator i = entries.iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); Object attached = entry.getValue(); StateManagerImpl sm = _broker.getStateManagerImpl(attached, true); if (sm.isNew()) continue; try { _broker.fireLifecycleEvent(attached, entry.getKey(), sm.getMetaData(), LifecycleEvent.AFTER_ATTACH); } catch (RuntimeException re) { exceps = add(exceps, re); if (_failFast && re instanceof CallbackException) break; } } return exceps; }
/** * Perform post-load actions if the given fetch group is a post-load group * and is fully loaded. */ private boolean postLoad(String fgName, FetchConfiguration fetch) { FetchGroup fg = _meta.getFetchGroup(fgName); if (fg == null || !fg.isPostLoad()) return false; FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName)) return false; _flags |= FLAG_LOADED; if (postLoadCallback) _broker.fireLifecycleEvent(getManagedInstance(), fetch, _meta, LifecycleEvent.AFTER_LOAD); return true; }
/** * Perform post-load actions if the given fetch group is a post-load group * and is fully loaded. */ private boolean postLoad(String fgName, FetchConfiguration fetch) { FetchGroup fg = _meta.getFetchGroup(fgName); if (fg == null || !fg.isPostLoad()) return false; FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName)) return false; _flags |= FLAG_LOADED; if (postLoadCallback) _broker.fireLifecycleEvent(getManagedInstance(), fetch, _meta, LifecycleEvent.AFTER_LOAD); return true; }
/** * Perform post-load actions if the given fetch group is a post-load group * and is fully loaded. */ private boolean postLoad(String fgName, FetchConfiguration fetch) { FetchGroup fg = _meta.getFetchGroup(fgName); if (fg == null || !fg.isPostLoad()) return false; FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName)) return false; _flags |= FLAG_LOADED; _broker.fireLifecycleEvent(getManagedInstance(), fetch, _meta, LifecycleEvent.AFTER_LOAD); return true; }
/** * Perform post-load actions if the given fetch group is a post-load group * and is fully loaded. */ private boolean postLoad(String fgName, FetchConfiguration fetch) { FetchGroup fg = _meta.getFetchGroup(fgName); if (fg == null || !fg.isPostLoad()) return false; FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName)) return false; _flags |= FLAG_LOADED; if (postLoadCallback) _broker.fireLifecycleEvent(getManagedInstance(), fetch, _meta, LifecycleEvent.AFTER_LOAD); return true; }
/** * Perform post-load actions if the given fetch group is a post-load group * and is fully loaded. */ private boolean postLoad(String fgName, FetchConfiguration fetch) { FetchGroup fg = _meta.getFetchGroup(fgName); if (fg == null || !fg.isPostLoad()) return false; FieldMetaData[] fmds = _meta.getFields(); for (int i = 0; i < fmds.length; i++) if (!_loaded.get(i) && fmds[i].isInFetchGroup(fgName)) return false; _flags |= FLAG_LOADED; if (postLoadCallback) _broker.fireLifecycleEvent(getManagedInstance(), fetch, _meta, LifecycleEvent.AFTER_LOAD); return true; }
/** * Fire the given lifecycle event to all listeners. */ private boolean fireLifecycleEvent(int type) { if (type == LifecycleEvent.AFTER_PERSIST && _broker.getConfiguration().getCallbackOptionsInstance().getPostPersistCallbackImmediate()) { fetchObjectId(); } return _broker.fireLifecycleEvent(getManagedInstance(), null, _meta, type); }
/** * Fire the given lifecycle event to all listeners. */ private boolean fireLifecycleEvent(int type) { if (type == LifecycleEvent.AFTER_PERSIST && _broker.getConfiguration().getCallbackOptionsInstance().getPostPersistCallbackImmediate()) { fetchObjectId(); } return _broker.fireLifecycleEvent(getManagedInstance(), null, _meta, type); }
/** * Fire the given lifecycle event to all listeners. */ private boolean fireLifecycleEvent(int type) { if (type == LifecycleEvent.AFTER_PERSIST && _broker.getConfiguration().getCallbackOptionsInstance().getPostPersistCallbackImmediate()) { fetchObjectId(); } return _broker.fireLifecycleEvent(getManagedInstance(), null, _meta, type); }
/** * Fire the given lifecycle event to all listeners. */ private boolean fireLifecycleEvent(int type) { if (type == LifecycleEvent.AFTER_PERSIST && _broker.getConfiguration().getCallbackOptionsInstance().getPostPersistCallbackImmediate()) { fetchObjectId(); } return _broker.fireLifecycleEvent(getManagedInstance(), null, _meta, type); }