Package edu.uga.galileo.voci.db

Examples of edu.uga.galileo.voci.db.QueryParser.addPreparedStmtElementDefinition()


    sql.append("  from item2bundle ");
    sql.append("  where bundle_id=?) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(bundle.getBundleId());
    qp.addPreparedStmtElementDefinition(bundle.getProjectId());
    qp.addPreparedStmtElementDefinition(bundle.getBundleId());

    try {
      if (!Configuration.getConnectionPool().executeInsertOrUpdate(qp)) {
        throw new NoSuchBundleException("Childless bundle "
View Full Code Here


    sql.append("  where bundle_id=?) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(bundle.getBundleId());
    qp.addPreparedStmtElementDefinition(bundle.getProjectId());
    qp.addPreparedStmtElementDefinition(bundle.getBundleId());

    try {
      if (!Configuration.getConnectionPool().executeInsertOrUpdate(qp)) {
        throw new NoSuchBundleException("Childless bundle "
            + bundle.getId() + " in project "
View Full Code Here

      sql.append("where bundle_id=? ");
      sql.append("and collection_id=? ");
    }

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(childId);
    qp.addPreparedStmtElementDefinition(parentId);
    if (connection != null) {
      qp.setConnection(connection);
    }
View Full Code Here

      sql.append("and collection_id=? ");
    }

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(childId);
    qp.addPreparedStmtElementDefinition(parentId);
    if (connection != null) {
      qp.setConnection(connection);
    }

    int preInsertCheck = -1;
View Full Code Here

        sql.append("(bundle_id, collection_id) values (?, ?) ");
      }

      qp.clearForNewSQL();
      qp.setSql(sql.toString());
      qp.addPreparedStmtElementDefinition(childId);
      qp.addPreparedStmtElementDefinition(parentId);

      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    }
  }
View Full Code Here

      }

      qp.clearForNewSQL();
      qp.setSql(sql.toString());
      qp.addPreparedStmtElementDefinition(childId);
      qp.addPreparedStmtElementDefinition(parentId);

      Configuration.getConnectionPool().executeInsertOrUpdate(qp);
    }
  }
}
View Full Code Here

    sql.append("and c.project_id=? ");
    sql.append("and c.community_id=c2c.child_id ");
    sql.append("and c2c.parent_id=? ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(parent.getProjectId());
    qp.addPreparedStmtElementDefinition(parent.getCommunityId());

    try {
      Configuration.getConnectionPool().executeQuery(qp);
      if (qp.getResultCount() == 0) {
View Full Code Here

    sql.append("and c.community_id=c2c.child_id ");
    sql.append("and c2c.parent_id=? ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(parent.getProjectId());
    qp.addPreparedStmtElementDefinition(parent.getCommunityId());

    try {
      Configuration.getConnectionPool().executeQuery(qp);
      if (qp.getResultCount() == 0) {
        return null;
View Full Code Here

    sql.append("and c.community_id not in ");
    sql.append("   (select distinct(child_id) ");
    sql.append("    from community2community) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(projectHandle);

    try {
      Configuration.getConnectionPool().executeQuery(qp);
      if (qp.getResultCount() == 0) {
        return null;
View Full Code Here

    sql.append("from communities ");
    sql.append("where community_id=? ");
    sql.append("and project_id=? ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(communityId);
    qp.addPreparedStmtElementDefinition(projectId);

    try {
      Configuration.getConnectionPool().executeQuery(qp);
    } catch (SQLException e) {
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.