Examples of DynamicQuery


Examples of org.apache.juddi.query.util.DynamicQuery

   
    // If keysIn is null or empty, then nothing to fetch.
    if ((keysIn == null) || (keysIn.size() == 0))
      return Collections.emptyList();

    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendSortTables(dynamicQry);
    dynamicQry.appendInListWithAnd(ENTITY_ALIAS + "." + KEY_NAME, keysIn);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);
   
    appendSortCriteria(dynamicQry, fq);

    log.debug(dynamicQry);
   
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

   
    List<KeyedReference> keyedRefs = identifiers.getKeyedReference();
    if (keyedRefs == null || keyedRefs.size() == 0)
      return keysIn;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, keyedRefs);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);

    return getQueryResult(em, dynamicQry, keysIn, entityAlias + "." + keyName);
  }
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

   
    List<DiscoveryURL> discURLlist = discURLs.getDiscoveryURL();
    if (discURLlist == null || discURLlist.size() == 0)
      return keysIn;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, discURLlist);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);

    return getQueryResult(em, dynamicQry, keysIn, ENTITY_ALIAS + "." + KEY_NAME);
  }
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

        keyedRefs.add((KeyedReference)elem);
    }
    if (keyedRefs.size() == 0)
      return keysIn;   
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, keyedRefs);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);

    return getQueryResult(em, dynamicQry, keysIn, entityAlias + "." + keyName);
  }
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

   
    // If keysIn is null or empty, then nothing to fetch.
    if ((keysIn == null) || (keysIn.size() == 0))
      return Collections.emptyList();

    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendSortTables(dynamicQry);
    dynamicQry.appendInListWithAnd(ENTITY_ALIAS + "." + KEY_NAME, keysIn);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);

    appendSortCriteria(dynamicQry, fq);

    log.debug(dynamicQry);
   
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

   
    List<String> tmodelKeys = tModels.getTModelKey();
    if (tmodelKeys == null || tmodelKeys.size() == 0)
      return keysIn;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, tmodelKeys);
    if (parentKey != null && parentKey.length() > 0)
      dynamicQry.AND().pad().appendGroupedAnd(new DynamicQuery.Parameter(BindingTemplateQuery.ENTITY_ALIAS + "." + BindingTemplateQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS));
   
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);
   
    return getQueryResult(em, dynamicQry, keysIn, ENTITY_ALIAS + "." + KEY_NAME);
  }
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

  public static int delete(EntityManager em, List<?> businessKeys) {
    if ((businessKeys == null) || (businessKeys.size() == 0))
      return 0;
   
    DynamicQuery dynamicQry = new DynamicQuery(deleteSQL);
    appendConditions(dynamicQry, businessKeys);
   
    log.debug(dynamicQry);
   
    Query qry = dynamicQry.buildJPAQuery(em);
    int result = qry.executeUpdate();
   
    return result;
  }
View Full Code Here

Examples of org.apache.juddi.query.util.DynamicQuery

  @SuppressWarnings("unchecked")
  public static List<PublisherAssertion> select(EntityManager em, List<?> businessKeys, CompletionStatus completionStatus) {
    if ((businessKeys == null) || (businessKeys.size() == 0))
      return null;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, businessKeys, completionStatus);
   
    log.debug(dynamicQry);
   
    Query qry = dynamicQry.buildJPAQuery(em);
    List<PublisherAssertion> result = qry.getResultList();
   
    return result;
  }
View Full Code Here

Examples of org.apache.juddi.util.jdbc.DynamicQuery

    Vector keysOut = new Vector();
    PreparedStatement statement = null;
    ResultSet resultSet = null;

    // construct the SQL statement
    DynamicQuery sql = new DynamicQuery(selectSQL);
    appendWhere(sql,name,qualifiers);
    appendIn(sql,name,keysIn);
    appendOrderBy(sql,qualifiers);

    try
    {
      log.debug(sql.toString());

      statement = sql.buildPreparedStatement(connection);
      resultSet = statement.executeQuery();

      while (resultSet.next())
        keysOut.addElement(resultSet.getString(1));//("TMODEL_KEY"));
View Full Code Here

Examples of org.apache.juddi.util.jdbc.DynamicQuery

    Vector keysOut = new Vector();
    PreparedStatement statement = null;
    ResultSet resultSet = null;

    // construct the SQL statement
    DynamicQuery sql = new DynamicQuery(selectSQL);
    appendWhere(sql,businessKey,names,qualifiers);
    appendIn(sql,keysIn);
    appendOrderBy(sql,qualifiers);

    try
    {
      log.debug(sql.toString());

      statement = sql.buildPreparedStatement(connection);
      resultSet = statement.executeQuery();

      while (resultSet.next())
        keysOut.addElement(resultSet.getString(1));//("SERVICE_KEY"));
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.