Package edu.uga.galileo.voci.exception

Examples of edu.uga.galileo.voci.exception.NoSuchCommunityException


    try {
      Configuration.getConnectionPool().executeQuery(qp);
    } catch (SQLException e) {
      Logger.fatal("Couldn't execute query", e);
      throw new NoSuchCommunityException("A SQLException was the cause: "
          + e.getMessage());
    }

    if (qp.getResultCount() > 0) {
      return createObjectFromQueryParser(Community.class, qp);
    } else {
      throw new NoSuchCommunityException("The requested community ID ("
          + communityId + ") doesn't exist.");
    }
  }
View Full Code Here


    try {
      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    } catch (SQLException e) {
      Logger.error("Metadata record couldn't be added", e);
      throw new NoSuchCommunityException(
          "SQLException prevented community record addition: "
              + e.getMessage());
    }
  }
View Full Code Here

    qp.addPreparedStmtElementDefinition(community.getCommunityId());
    qp.addPreparedStmtElementDefinition(community.getProjectId());

    try {
      if (!Configuration.getConnectionPool().executeInsertOrUpdate(qp)) {
        throw new NoSuchCommunityException("Community "
            + community.getId() + " in project "
            + community.getProjectId()
            + " couldn't be found to update.");
      }
    } catch (SQLException e) {
      Logger.error("Community record couldn't be updated", e);
      throw new NoSuchCommunityException(
          "SQLException prevented community record update: "
              + e.getMessage());
    }
  }
View Full Code Here

    qp.addPreparedStmtElementDefinition(community.getCommunityId());
    qp.addPreparedStmtElementDefinition(community.getCommunityId());

    try {
      if (!Configuration.getConnectionPool().executeInsertOrUpdate(qp)) {
        throw new NoSuchCommunityException("Childless community "
            + community.getId() + " in project "
            + community.getProjectId()
            + " couldn't be found to delete.");
      }
    } catch (SQLException e) {
      Logger.error("Community record couldn't be deleted", e);
      throw new NoSuchCommunityException(
          "SQLException prevented community record deletion: "
              + e.getMessage());
    }
  }
View Full Code Here

    } catch (SQLException e) {
      Logger
          .error(
              "Community ID couldn't be retrieved b/c of SQLException",
              e);
      throw new NoSuchCommunityException(
          "Couldn't get a community ID from the handle_id_seq b/c of a SQLException: "
              + e.getMessage());
    } catch (DataTypeMismatchException e) {
      Logger.error("Community ID couldn't be retrieved", e);
      throw new NoSuchCommunityException(
          "Couldn't get a community ID from the handle_id_seq: "
              + e.getMessage());
    }
  }
View Full Code Here

    int projectId;
    try {
      projectId = (new ProjectManager()).getProjectID(command
          .getProject());
    } catch (NoSuchProjectException e) {
      throw new NoSuchCommunityException(
          "The project associated with this "
              + "community couldn't be found.");
    }

    if (communityId == -1) {
      community = new Community();
      community.setCommunityId(-1);
      community.setProjectId(projectId);
    } else {
      community = cdao.getCommunity(communityId, projectId);
    }

    if ((mustBeActive) && (!community.isActive())) {
      throw new NoSuchCommunityException(
          "No matching, active community found.");
    }

    if (addMetadata) {
      metadataManager.populateVBOWithMetadata(community);
View Full Code Here

TOP

Related Classes of edu.uga.galileo.voci.exception.NoSuchCommunityException

Copyright © 2018 www.massapicom. 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.