Package org.apache.juddi.query.util

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


   
    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


        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

   
    // 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

   
    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

  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

  @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

      return keysIn;
   
    if (name == null)
      return keysIn;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, name);
    // Since this is a tModel, don't need to search the lazily deleted ones.
    dynamicQry.AND().pad().appendGroupedAnd(new DynamicQuery.Parameter(ENTITY_ALIAS + ".deleted", new Boolean(false), 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

      return keysIn;
   
    if (names == null || names.size() == 0)
      return keysIn;
   
    DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
    appendConditions(dynamicQry, fq, names);
    if (restrictions != null && restrictions.length > 0)
      dynamicQry.AND().pad().appendGroupedAnd(restrictions);

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

    List<?> restrictionList = keysIn;
    List<?> curResult = null;
    for (KeyedReferenceGroup keyedRefGroup : keyedRefGroups) {
      String curTModelKey = keyedRefGroup.getTModelKey();
     
      DynamicQuery dynamicQry = new DynamicQuery(selectSQL);
      appendConditions(dynamicQry, fq, keyedRefGroup);
      if (restrictions != null && restrictions.length > 0)
        dynamicQry.AND().pad().appendGroupedAnd(restrictions);
     

      if (fq.isOrLikeKeys()) {
        if (!curTModelKey.equals(prevTModelKey)) {
          if (count != 0) {
View Full Code Here

    this.keyGeneratorKeys = keyGeneratorKeys;
  }

  @SuppressWarnings("unchecked")
  public void populateKeyGeneratorKeys(EntityManager em) {
    DynamicQuery getKeysQuery = new DynamicQuery();
    getKeysQuery.append("select t.entityKey from Tmodel t").pad().WHERE().pad();

    DynamicQuery.Parameter pubParam = new DynamicQuery.Parameter("t.authorizedName",
         getAuthorizedName(),
         DynamicQuery.PREDICATE_EQUALS);

    DynamicQuery.Parameter keyParam = new DynamicQuery.Parameter("UPPER(t.entityKey)",
         (DynamicQuery.WILDCARD + KeyGenerator.KEYGENERATOR_SUFFIX).toUpperCase(),
         DynamicQuery.PREDICATE_LIKE);
   
   
    getKeysQuery.appendGroupedAnd(pubParam, keyParam);
    Query qry = getKeysQuery.buildJPAQuery(em);
   
    keyGeneratorKeys = qry.getResultList();
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.query.util.DynamicQuery$Parameter

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.