@Override public void detach() { itemModel.detach(); }
@Override public String toString() { if (!detaching) { boolean isAttached = isAttached(); String string = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("path", getPath()).toString(); if (!isAttached) { detach(); } return string; } else { return super.toString(); } }
private void writeObject(ObjectOutputStream output) throws IOException { if (isAttached()) { log.warn("Undetached JcrItemModel "+getPath()); T object = this.getObject(); if (object != null) { TraceMonitor.trace(object); } if (RuntimeConfigurationType.DEPLOYMENT.equals(Application.get().getConfigurationType())) { detach(); } } output.defaultWriteObject(); }
Node node = (Node) getItemModel().getParentModel().getObject(); String relPath = getItemModel().getPath().substring(node.getPath().length() + 1); getItemModel().detach();