/** * Returns {@code true} if the specified {@code nodeId} is the ID of the root node; false otherwise. * * @param nodeId The identifier of the node to be tested. * @return {@code true} if the given id is the identifier of the root node. */ private boolean isRootId( NodeId nodeId ) { return rootID.equals( nodeId ); }
/** * @param nodeId * @return <code>true</code> if this entry is defined on the node * at <code>nodeId</code> */ boolean isLocal(NodeId nodeId) { return id != null && id.equals(nodeId); }
/** * @param nodeId * @return <code>true</code> if this entry is defined on the node * at <code>nodeId</code> */ boolean isLocal(NodeId nodeId) { return id != null && id.equals(nodeId); }
/** * Returns {@code true} if the specified {@code nodeId} is the ID of the * root node; false otherwise. * * @param nodeId The identifier of the node to be tested. * @return {@code true} if the given id is the identifier of the root node. */ private boolean isRootId(NodeId nodeId) { return rootID.equals(nodeId); }
/** * @param nodeId * @return <code>true</code> if this entry is defined on the node * at <code>nodeId</code> */ boolean isLocal(NodeId nodeId) { return id != null && id.equals(nodeId); }
/** * Returns {@code true} if the specified {@code nodeId} is the ID of the * root node; false otherwise. * * @param nodeId The identifier of the node to be tested. * @return {@code true} if the given id is the identifier of the root node. */ private boolean isRootId(NodeId nodeId) { return rootID.equals(nodeId); }
public boolean equals(Object object) { if (object instanceof ChildNodeEntry) { ChildNodeEntry that = (ChildNodeEntry) object; return name.equals(that.name) && id.equals(that.id); } else { return false; } }
public boolean equals(Object object) { if (object instanceof ChildNodeEntry) { ChildNodeEntry that = (ChildNodeEntry) object; return name.equals(that.name) && id.equals(that.id); } else { return false; } }
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof ChildNodeEntry) { ChildNodeEntry other = (ChildNodeEntry) obj; return (name.equals(other.name) && id.equals(other.id) && index == other.index); } return false; }
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof ChildNodeEntry) { ChildNodeEntry other = (ChildNodeEntry) obj; return (name.equals(other.name) && id.equals(other.id) && index == other.index); } return false; }
/** * @see Object#equals(Object) */ @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof RetentionPolicyImpl) { RetentionPolicyImpl other = (RetentionPolicyImpl) obj; return name.equals(other.name) && ((nodeId == null) ? other.nodeId == null : nodeId.equals(other.nodeId)); } return false; } }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (obj instanceof UnlockEvent) { UnlockEvent other = (UnlockEvent) obj; return nodeId.equals(other.nodeId); } return false; } }
@Override void doRepair(final ChangeLog changes) throws ItemStateException { final NodePropBundle bundle = getBundle(nodeId); final Iterator<NodePropBundle.ChildNodeEntry> entryIterator = bundle.getChildNodeEntries().iterator(); while (entryIterator.hasNext()) { final NodePropBundle.ChildNodeEntry childNodeEntry = entryIterator.next(); if (childNodeEntry.getId().equals(childNodeId)) { entryIterator.remove(); saveBundle(bundle); changes.modified(new NodeState(nodeId, null, null, ItemState.STATUS_EXISTING, false)); } } }
/** * {@inheritDoc} */ public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof InternalVersionImpl) { InternalVersionImpl v = (InternalVersionImpl) obj; return v.getId().equals(getId()); } return false; }
@Override void doRepair(final ChangeLog changes) throws ItemStateException { final NodePropBundle bundle = getBundle(nodeId); final Iterator<NodePropBundle.ChildNodeEntry> entryIterator = bundle.getChildNodeEntries().iterator(); while (entryIterator.hasNext()) { final NodePropBundle.ChildNodeEntry childNodeEntry = entryIterator.next(); if (childNodeEntry.getId().equals(childNodeId)) { entryIterator.remove(); saveBundle(bundle); changes.modified(new NodeState(nodeId, null, null, ItemState.STATUS_EXISTING, false)); } } }
private List<PathMap.Element<LRUEntry>> getCachedPaths(NodeId id) { // JCR-2720: Handle the root path as a special case if (rootNodeId.equals(id)) { return Collections.singletonList(pathCache.map( PathFactoryImpl.getInstance().getRootPath(), true)); } LRUEntry entry = (LRUEntry) idCache.get(id); if (entry != null) { return Arrays.asList(entry.getElements()); } else { return Collections.emptyList(); } }
private List<PathMap.Element<LRUEntry>> getCachedPaths(NodeId id) { // JCR-2720: Handle the root path as a special case if (rootNodeId.equals(id)) { return Collections.singletonList(pathCache.map( PathFactoryImpl.getInstance().getRootPath(), true)); } LRUEntry entry = (LRUEntry) idCache.get(id); if (entry != null) { return Arrays.asList(entry.getElements()); } else { return Collections.emptyList(); } }
/** * {@inheritDoc} */ public InternalVersion getLinearSuccessor(InternalVersion baseVersion) { // walk up all predecessors of the base version until 'this' version // is found. InternalVersion pred = baseVersion.getLinearPredecessor(); while (pred != null && !pred.getId().equals(getId())) { baseVersion = pred; pred = baseVersion.getLinearPredecessor(); } return pred == null ? null : baseVersion; }
/** * {@inheritDoc} */ public boolean holdsLock(NodeImpl node) throws RepositoryException { LockInfo info; if (isInXA()) { info = xaEnv.getLockInfo(node); } else { info = lockMgr.getLockInfo(node.getNodeId()); } return info != null && info.getId().equals(node.getId()); }
/** * {@inheritDoc} */ public boolean holdsLock(NodeImpl node) throws RepositoryException { LockInfo info; if (isInXA()) { info = xaEnv.getLockInfo(node); } else { info = lockMgr.getLockInfo(node.getNodeId()); } return info != null && info.getId().equals(node.getId()); }