/** * Utility method to determine if the node with the specified key still exists within the transient & persisted state. * * @param key the key of the node; may not be null * @return true if the node exists, or false if it does not */ protected boolean nodeExists( NodeKey key ) { return cache.getNode(key) != null; }
@Override public CachedNode getNode( NodeKey key ) { return delegate.getNode(key); }
/** * Utility method to determine if the node with the specified key still exists within the transient & persisted state. * * @param key the key of the node; may not be null * @return true if the node exists, or false if it does not */ protected boolean nodeExists( NodeKey key ) { return cache.getNode(key) != null; }
@Override public CachedNode getNode( NodeKey key ) { return delegate.getNode(key); }
@Override public CachedNode getNode( ChildReference reference ) { return delegate.getNode(reference); }
@Override public CachedNode getNode( ChildReference reference ) { return delegate.getNode(reference); }
public CachedNode nodeTypesNode() { return system.getNode(nodeTypesKey()); }
public CachedNode locksNode() { return system.getNode(locksKey()); }
public CachedNode versionStorageNode() { return system.getNode(versionStorageKey()); }
public CachedNode systemNode() { return system.getNode(systemKey()); }
public CachedNode nodeTypesNode() { return system.getNode(nodeTypesKey()); }
public CachedNode versionStorageNode() { return system.getNode(versionStorageKey()); }
private CachedNode getSystemNode( SessionCache systemSession ) { CachedNode systemRoot = systemSession.getNode(systemSession.getRootKey()); ChildReference systemNodeRef = systemRoot.getChildReferences(systemSession).getChild(JcrLexicon.SYSTEM); assert systemNodeRef != null; return systemSession.getNode(systemNodeRef.getKey()); }
private CachedNode getSystemNode( SessionCache systemSession ) { CachedNode systemRoot = systemSession.getNode(systemSession.getRootKey()); ChildReference systemNodeRef = systemRoot.getChildReferences(systemSession).getChild(JcrLexicon.SYSTEM); assert systemNodeRef != null; return systemSession.getNode(systemNodeRef.getKey()); }
public NodeKey systemKey() { if (systemKey == null) { // This is idempotent, so no need to lock CachedNode rootNode = system.getNode(system.getRootKey()); ChildReference systemRef = rootNode.getChildReferences(system).getChild(JcrLexicon.SYSTEM); systemKey = systemRef.getKey(); } return systemKey; }
protected boolean unregisterNamespace( String namespaceUri ) { MutableCachedNode namespaces = mutableNamespacesNode(); NodeKey key = keyForNamespaceUri(namespaceUri); CachedNode nsNode = system.getNode(key); if (nsNode != null) { namespaces.removeChild(system, key); system.destroy(key); return true; } return false; }
protected boolean unregisterNamespace( String namespaceUri ) { MutableCachedNode namespaces = mutableNamespacesNode(); NodeKey key = keyForNamespaceUri(namespaceUri); CachedNode nsNode = system.getNode(key); if (nsNode != null) { namespaces.removeChild(system, key); system.destroy(key); return true; } return false; }
public Collection<Namespace> readAllNamespaces() { CachedNode namespaces = namespacesNode(); List<Namespace> results = new ArrayList<Namespace>(); // Add in the empty namespace ... results.add(new BasicNamespace("", "")); // Now read in the persisted namespaces ... for (ChildReference ref : namespaces.getChildReferences(system)) { CachedNode namespace = system.getNode(ref); String prefix = prefixFor(ref.getSegment()); String uri = strings.create(first(namespace, ModeShapeLexicon.URI)); results.add(new BasicNamespace(prefix, uri)); } return results; }
public NodeKey systemKey() { if (systemKey == null) { // This is idempotent, so no need to lock CachedNode rootNode = system.getNode(system.getRootKey()); ChildReference systemRef = rootNode.getChildReferences(system).getChild(JcrLexicon.SYSTEM); systemKey = systemRef.getKey(); } return systemKey; }
public Collection<Namespace> readAllNamespaces() { CachedNode namespaces = namespacesNode(); List<Namespace> results = new ArrayList<Namespace>(); // Add in the empty namespace ... results.add(new BasicNamespace("", "")); // Now read in the persisted namespaces ... for (ChildReference ref : namespaces.getChildReferences(system)) { CachedNode namespace = system.getNode(ref); String prefix = prefixFor(ref.getSegment()); String uri = strings.create(first(namespace, ModeShapeLexicon.URI)); results.add(new BasicNamespace(prefix, uri)); } return results; }