@Override public String toString() { return getClass().getSimpleName() + " {initialized=" + wasInitialized() + ", dirty=" + isDirty() + "}" + (collection != null ? ": " + collection.toString() : ""); }
@Override public String toString() { return getClass().getSimpleName() + " {initialized=" + wasInitialized() + ", dirty=" + isDirty() + "}" + (collection != null ? ": " + collection.toString() : ""); }
protected boolean checkInitializedRead() { if (wasInitialized()) return true; loader.load(this, null); return false; }
@Override public String toString() { return getClass().getName() + " {initialized=" + wasInitialized() + ", dirty=" + isDirty() + "}" + (collection != null ? ": " + collection.toString() : ""); }
protected boolean checkInitializedRead() { if (wasInitialized()) return true; loader.load(this, null); return false; }
protected boolean checkInitializedRead() { if (wasInitialized()) return true; loader.load(this, null); return false; }
protected void checkInitializedWrite() { if (!wasInitialized()) throw new LazyInitializationException(getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(this))); }
protected void checkInitializedWrite() { if (!wasInitialized()) throw new LazyInitializationException(getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(this))); }
protected void checkInitializedWrite() { if (!wasInitialized()) throw new LazyInitializationException(getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(this))); }
public void withInitialized(InitializationCallback<C> callback) { if (wasInitialized()) callback.call(this); else loader.load(this, callback); } }
public void withInitialized(InitializationCallback callback) { if (wasInitialized()) callback.call(this); else loader.load(this, callback); } }
public void withInitialized(InitializationCallback<C> callback) { if (wasInitialized()) callback.call(this); else loader.load(this, callback); } }
public PersistentCollection clone(boolean uninitialize) { try { @SuppressWarnings("unchecked") AbstractPersistentCollection<C> collection = TypeUtil.newInstance(getClass(), AbstractPersistentCollection.class); if (wasInitialized() && !uninitialize) collection.init(getCollection(), getDetachedState(), isDirty()); return collection; } catch (Exception e) { throw new RuntimeException("Could not clone collection " + this.getClass().getName(), e); } }
public PersistentCollection<C> clone(boolean uninitialize) { try { @SuppressWarnings("unchecked") AbstractPersistentCollection<C> collection = TypeUtil.newInstance(getClass(), AbstractPersistentCollection.class); if (wasInitialized() && !uninitialize) collection.init(getCollection(), getDetachedState(), isDirty()); return collection; } catch (Exception e) { throw new RuntimeException("Could not clone collection " + this.getClass().getName(), e); } }
public PersistentCollection<C> clone(boolean uninitialize) { try { @SuppressWarnings("unchecked") AbstractPersistentCollection<C> collection = TypeUtil.newInstance(getClass(), AbstractPersistentCollection.class); if (wasInitialized() && !uninitialize) collection.init(getCollection(), getDetachedState(), isDirty()); return collection; } catch (Exception e) { throw new RuntimeException("Could not clone collection " + this.getClass().getName(), e); } }