| | |
| | | DN2URI(TreeName treeName, Storage storage, EntryContainer entryContainer) |
| | | throws StorageRuntimeException |
| | | { |
| | | super(treeName, storage, entryContainer); |
| | | |
| | | super(treeName, storage); |
| | | prefixRDNComponents = entryContainer.getBaseDN().size(); |
| | | } |
| | | |
| | |
| | | try |
| | | { |
| | | // Go up through the DIT hierarchy until we find a referral. |
| | | for (DN dn = entryContainer.getParentWithinBase(targetDN); dn != null; |
| | | dn = entryContainer.getParentWithinBase(dn)) |
| | | for (DN dn = getParentWithinBase(targetDN); dn != null; dn = getParentWithinBase(dn)) |
| | | { |
| | | // Look for a record whose key matches the current DN. |
| | | if (cursor.positionToKey(toKey(dn))) |
| | |
| | | } |
| | | } |
| | | |
| | | private DN getParentWithinBase(DN targetDN) |
| | | { |
| | | return targetDN.size() == prefixRDNComponents ? null: targetDN.parent(); |
| | | } |
| | | |
| | | /** |
| | | * Return search result references for a search operation using the referral |
| | | * database to find all referral entries within scope of the search. |