/** * {@inheritDoc} */ public String toString() { return id.toString(); } }
/** * {@inheritDoc} */ public String toString() { return id.toString(); } }
public String toString() { StringBuffer sb = new StringBuffer(id.toString()); sb.append("("); if (doc != -1) { sb.append(doc); } else { sb.append("?"); } sb.append(")"); return sb.toString(); } }
public String toString() { StringBuffer sb = new StringBuffer(id.toString()); sb.append("("); if (doc != -1) { sb.append(doc); } else { sb.append("?"); } sb.append(")"); return sb.toString(); } }
/** * {@inheritDoc} */ public NodeReferences getNodeReferences(NodeId id) throws NoSuchItemStateException, ItemStateException { throw new NoSuchItemStateException(id.toString()); }
/** * Return the lock token associated with this lock. * * @return lock token */ public String getLockToken() { String uuid = id.toString(); return uuid + "-" + getLockTokenCheckDigit(uuid); }
/** * {@inheritDoc} */ public NodeReferences getNodeReferences(NodeId id) throws NoSuchItemStateException, ItemStateException { throw new NoSuchItemStateException(id.toString()); }
/** * Return the lock token associated with this lock. * * @return lock token */ public String getLockToken() { String uuid = id.toString(); return uuid + "-" + getLockTokenCheckDigit(uuid); }
/** * {@inheritDoc} */ public String getVersionableIdentifier() throws RepositoryException { return getInternalVersionHistory().getVersionableId().toString(); }
@Override public NodeReferences getNodeReferences(NodeId id) throws NoSuchItemStateException, ItemStateException { // check persistence manager try { return pMgr.loadReferencesTo(id); } catch (NoSuchItemStateException e) { // ignore } // throw throw new NoSuchItemStateException(id.toString()); }
@Override public NodeReferences getNodeReferences(NodeId id) throws NoSuchItemStateException, ItemStateException { // check persistence manager try { return pMgr.loadReferencesTo(id); } catch (NoSuchItemStateException e) { // ignore } // throw throw new NoSuchItemStateException(id.toString()); }
/** * Retrieves the root of the indexing aggregate for <code>state</code> and * puts it into <code>aggregates</code> map. * * @param state the node state for which we want to retrieve the aggregate * root. * @param aggregates aggregate roots are collected in this map. */ protected void retrieveAggregateRoot(NodeState state, Map<NodeId, NodeState> aggregates) { retrieveAggregateRoot(state, aggregates, state.getNodeId().toString(), 0); }
/** * Retrieves the root of the indexing aggregate for <code>state</code> and * puts it into <code>aggregates</code> map. * * @param state the node state for which we want to retrieve the aggregate * root. * @param aggregates aggregate roots are collected in this map. */ protected void retrieveAggregateRoot(NodeState state, Map<NodeId, NodeState> aggregates) { retrieveAggregateRoot(state, aggregates, state.getNodeId().toString(), 0); }
/** * {@inheritDoc} */ public String getVersionableIdentifier() throws RepositoryException { return getInternalVersionHistory().getVersionableId().toString(); }
/** * {@inheritDoc} * * Loads the state via the appropriate NodePropBundle. */ public NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException { NodePropBundle bundle = getBundle(id); if (bundle == null) { throw new NoSuchItemStateException(id.toString()); } return bundle.createNodeState(this); }
/** * {@inheritDoc} * * Loads the state via the appropriate NodePropBundle. */ public NodeState load(NodeId id) throws NoSuchItemStateException, ItemStateException { NodePropBundle bundle = getBundle(id); if (bundle == null) { throw new NoSuchItemStateException(id.toString()); } return bundle.createNodeState(this); }
/** * {@inheritDoc} */ public String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException { // check state of this instance sanityCheck(); if (!isNodeType(NameConstants.MIX_REFERENCEABLE)) { throw new UnsupportedRepositoryOperationException(); } return getNodeId().toString(); }
public void testToString() { for (NodeId id : ids) { assertEquals(id, new NodeId(id.toString())); } }
public void testOffset() throws RepositoryException { System.setProperty(NodeIdFactory.SEQUENTIAL_NODE_ID, "ab/0"); NodeIdFactory f = new NodeIdFactory(factoryDir); f.open(); assertEquals("00000000-0000-00ab-0000-000000000000", f.newNodeId().toString()); f.close(); f = new NodeIdFactory(factoryDir); f.open(); assertEquals("00000000-0000-00ab-0000-000000000001", f.newNodeId().toString()); f.close(); }
protected void setUp() throws Exception { factory = InternalValueFactory.getInstance(); rootPath = PathFactoryImpl.getInstance().getRootPath(); testName = NameFactoryImpl.getInstance().create(Name.NS_JCR_URI, "data"); reference = NodeId.randomId().toString(); }