Package edu.uga.galileo.voci.db

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


      sql.append("(child_id, parent_id) values (?, ?) ");

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

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


    sql.append("select parent_id ");
    sql.append("from community2community ");
    sql.append("where child_id=? ");

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

    Configuration.getConnectionPool().executeQuery(qp);
    return qp.getResults(Integer.class, "parent_id");
  }
}
View Full Code Here

    sql.append("where ((c.expires is null) or (c.expires>now())) ");
    sql.append("and c.collection_id=c2c.child_id ");
    sql.append("and c2c.parent_id=? ");

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

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

    sql.append("   (select collection_id ");
    sql.append("    from collection2community ");
    sql.append("    where community_id=?) ");

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

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

    sql.append("    from collection2community ");
    sql.append("    where community_id=?) ");

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

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

    sql.append("from collections ");
    sql.append("where collection_id=? ");
    sql.append("and project_id=? ");

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

    try {
      Configuration.getConnectionPool().executeQuery(qp);
    } catch (SQLException e) {
View Full Code Here

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

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

    try {
      Configuration.getConnectionPool().executeQuery(qp);
    } catch (SQLException e) {
      Logger.fatal("Couldn't execute query", e);
View Full Code Here

    sql.append("(collection_id, project_id, active, ");
    sql.append("status, created, expires) values ");
    sql.append("(?, ?, ?, ?, now(), ?) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(collection.getCollectionId());
    qp.addPreparedStmtElementDefinition(collection.getProjectId());
    qp.addPreparedStmtElementDefinition(collection.isActive());
    qp.addPreparedStmtElementDefinition(QueryParserElement.INT, collection
        .getStatus() <= 0 ? null : collection.getStatus());
    qp.addPreparedStmtElementDefinition(QueryParserElement.TIMESTAMP,
View Full Code Here

    sql.append("status, created, expires) values ");
    sql.append("(?, ?, ?, ?, now(), ?) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(collection.getCollectionId());
    qp.addPreparedStmtElementDefinition(collection.getProjectId());
    qp.addPreparedStmtElementDefinition(collection.isActive());
    qp.addPreparedStmtElementDefinition(QueryParserElement.INT, collection
        .getStatus() <= 0 ? null : collection.getStatus());
    qp.addPreparedStmtElementDefinition(QueryParserElement.TIMESTAMP,
        collection.getExpires());
View Full Code Here

    sql.append("(?, ?, ?, ?, now(), ?) ");

    QueryParser qp = new QueryParser(sql.toString());
    qp.addPreparedStmtElementDefinition(collection.getCollectionId());
    qp.addPreparedStmtElementDefinition(collection.getProjectId());
    qp.addPreparedStmtElementDefinition(collection.isActive());
    qp.addPreparedStmtElementDefinition(QueryParserElement.INT, collection
        .getStatus() <= 0 ? null : collection.getStatus());
    qp.addPreparedStmtElementDefinition(QueryParserElement.TIMESTAMP,
        collection.getExpires());
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.