/** * Test if any reference directly refers to the object. * * @param id * ObjectId to find. * @return {@code true} if any reference exists directly referencing * {@code id}, or a annotated tag that peels to {@code id}. * @throws java.io.IOException * if references cannot be read. */ public boolean hasId(AnyObjectId id) throws IOException { try (RefCursor rc = byObjectId(id)) { return rc.next(); } }
/** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId name) throws IOException { MergedRefCursor m = new MergedRefCursor(); for (int i = 0; i < tables.length; i++) { m.add(new RefQueueEntry(tables[i].byObjectId(name), i)); } return m; }
/** * Test if any reference directly refers to the object. * * @param id * ObjectId to find. * @return {@code true} if any reference exists directly referencing * {@code id}, or a annotated tag that peels to {@code id}. * @throws java.io.IOException * if references cannot be read. */ public boolean hasId(AnyObjectId id) throws IOException { try (RefCursor rc = byObjectId(id)) { return rc.next(); } }
/** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId name) throws IOException { MergedRefCursor m = new MergedRefCursor(); for (int i = 0; i < tables.length; i++) { m.add(new RefQueueEntry(tables[i].byObjectId(name), i)); } return m; }