Examples of StoreNotFoundException


Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("releaseSubsegment()");

    // check subsegment

    if (subSegment == null) throw new NullPointerException();
    if (! (subSegment instanceof DbSubSegment)) throw new StoreNotFoundException("Subsegment is not from this store.");

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("findSubSegment()");

    // check parent authority

    if (parentAuthority == null) throw new NullPointerException();
    if (! (parentAuthority instanceof DbAuthority)) throw new StoreNotFoundException("Parent authority is not from this store.");

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getSubSegmentParentAuthority()");

    // check subsegment

    if (subSegment == null) throw new NullPointerException();
    if (! (subSegment instanceof DbSubSegment)) throw new StoreNotFoundException("Subsegment is not from this store.");

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getSubSegmentAuthority()");

    // check subsegment

    if (subSegment == null) throw new NullPointerException();
    if (! (subSegment instanceof DbSubSegment)) throw new StoreNotFoundException("Subsegment is not from this store.");

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    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);
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getAuthorityChildSegments()");

    // check authority

    if (parent == null) throw new NullPointerException();
    if (! (parent instanceof DbAuthority)) throw new StoreNotFoundException("Parent authority is not from this store.");

    // start database session

    Session session = this.getSessionFactory().getCurrentSession();

    // get subsegments that have this authority as parent

    Set<DbSubSegment> subSegments;

    try {

      session.beginTransaction();

      reattach(session, parent);
      subSegments = ((DbAuthority)parent).getChildren();
      Hibernate.initialize(subSegments);

      if (subSegments == null) throw new StoreNotFoundException("Subsegments do not exist.");

      session.getTransaction().commit();
    } catch (StoreException ex) {

      log.error(ex);
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getSynonymSegments()");

    // check authorities

    if (parent == null) throw new NullPointerException();
    if (! (parent instanceof DbAuthority)) throw new StoreNotFoundException("Parent authority is not from this store.");

    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 have the given parent authority and authority

    List<DbSubSegment> subSegments;

    try {

      session.beginTransaction();

      reattach(session, parent);
      reattach(session, authority);

      subSegments = DbSubSegment.ByParentAndAuthority(session, (DbAuthority) parent, (DbAuthority) authority);
      Hibernate.initialize(subSegments);

      if (subSegments == null) throw new StoreNotFoundException("Subsegments do not exist.");

      session.getTransaction().commit();
    } catch (StoreException ex) {

      log.error(ex);
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getAuthorityQxris()");

    // 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();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("setAuthorityAttributes()");

    // 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();
View Full Code Here

Examples of org.openxri.exceptions.StoreNotFoundException

    log.trace("getAuthorityAttributes()");

    // check authority

    if (authority == null) throw new NullPointerException();
    if (! (authority instanceof DbAuthority)) throw new StoreNotFoundException("Authority is not from this store.");

    // get attributes from authority

    Map<String, String> attributes = ((DbAuthority) authority).getAttributes();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.