log.trace("getAuthoritySegments()");
// check authority
if (authority == null) throw new NullPointerException();
if (! (authority instanceof DbAuthority)) throw new StoreNotFoundException("Authority is not from this store.");
// start database session
Session session = this.getSessionFactory().getCurrentSession();
// get subsegments that lead to this authority
Set<DbSubSegment> subSegments;
try {
session.beginTransaction();
reattach(session, authority);
subSegments = ((DbAuthority)authority).getSubSegments();
Hibernate.initialize(subSegments);
if (subSegments == null) throw new StoreNotFoundException("Subsegments do not exist.");
session.getTransaction().commit();
} catch (StoreException ex) {
log.error(ex);