@Override public Object getValueInRow( RowAccessor row ) { CachedNode node = row.getNode(indexInRow); if (node == null) return null; if (nodeTypes.isReferenceable(node.getPrimaryType(cache), node.getMixinTypes(cache))) { // The node is a 'mix:referenceable' node, so return the UUID ... NodeKey key = node.getKey(); return key.getIdentifier(); } return null; } };
@Override public Object getValueInRow( RowAccessor row ) { CachedNode node = row.getNode(indexInRow); if (node == null) return null; if (nodeTypes.isReferenceable(node.getPrimaryType(cache), node.getMixinTypes(cache))) { // The node is a 'mix:referenceable' node, so return the UUID ... NodeKey key = node.getKey(); return key.getIdentifier(); } return null; } };
boolean isReferenceable() throws RepositoryException { SessionCache cache = sessionCache(); NodeTypes nodeTypes = session().nodeTypes(); try { CachedNode node = node(); return nodeTypes.isReferenceable(node.getPrimaryType(cache), node.getMixinTypes(cache)); } catch (ItemNotFoundException e) { // The node has been removed, so do nothing } return false; }
boolean isReferenceable() throws RepositoryException { SessionCache cache = sessionCache(); NodeTypes nodeTypes = session().nodeTypes(); try { CachedNode node = node(); return nodeTypes.isReferenceable(node.getPrimaryType(cache), node.getMixinTypes(cache)); } catch (ItemNotFoundException e) { // The node has been removed, so do nothing } return false; }