Package org.apache.juddi.query.util

Examples of org.apache.juddi.query.util.DynamicQuery.WHERE()


    }

    // Make sure keys aren't implicated in another transfer request
    DynamicQuery checkKeysQry = new DynamicQuery();
    checkKeysQry.append("select ttk.entityKey from TransferTokenKey ttk ");
    checkKeysQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));

    Query qry = checkKeysQry.buildJPAQuery(em);
    List<?> obj = qry.getResultList();
    if (obj != null && obj.size() > 0)
      throw new TokenAlreadyExistsException(new ErrorMessage("errors.gettransfertoken.KeyExists", (String)obj.get(0)));
View Full Code Here


      }
     
      DynamicQuery checkParentKeyQry = new DynamicQuery();
      checkParentKeyQry.append("select COUNT(t.entityKey) from Tmodel t").pad();

      checkParentKeyQry.WHERE().pad().appendGroupedAnd(pubParam);
      checkParentKeyQry.AND().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
     
      Query qry = checkParentKeyQry.buildJPAQuery(em);     
      Number resultCount = (Number)qry.getSingleResult();
      if (resultCount.longValue() != requiredCount)
View Full Code Here

          DynamicQuery.PREDICATE_EQUALS);
     
      DynamicQuery checkDomainKeyQry = new DynamicQuery();
      checkDomainKeyQry.append("select t.entityKey from Tmodel t").pad();
     
      checkDomainKeyQry.WHERE().pad().appendGroupedAnd(notPubParam, keyParam);

      Query qry = checkDomainKeyQry.buildJPAQuery(em);
      List<?> obj = qry.getResultList();
      // If there are results then another publisher has the domain key and therefore the key generator is unavailable
      if (obj != null && obj.size() > 0)
View Full Code Here

        }
 
        // Find the associated transfer tokens and remove them.
        DynamicQuery getTokensQry = new DynamicQuery();
        getTokensQry.append("select distinct ttk.transferToken from TransferTokenKey ttk").pad();
        getTokensQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
 
        Query qry = getTokensQry.buildJPAQuery(em);
        List<org.apache.juddi.model.TransferToken> tokensToDelete = qry.getResultList();
        if (tokensToDelete != null && tokensToDelete.size() > 0) {
          for (org.apache.juddi.model.TransferToken tt : tokensToDelete)
View Full Code Here

        }
 
        // Find the associated transfer tokens and remove them.
        DynamicQuery getTokensQry = new DynamicQuery();
        getTokensQry.append("select distinct ttk.transferToken from TransferTokenKey ttk").pad();
        getTokensQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
 
        Query qry = getTokensQry.buildJPAQuery(em);
        List<org.apache.juddi.model.TransferToken> tokensToDelete = qry.getResultList();
        if (tokensToDelete != null && tokensToDelete.size() > 0) {
          for (org.apache.juddi.model.TransferToken tt : tokensToDelete)
View Full Code Here

      }
     
      DynamicQuery checkParentKeyQry = new DynamicQuery();
      checkParentKeyQry.append("select COUNT(t.entityKey) from Tmodel t").pad();

      checkParentKeyQry.WHERE().pad().appendGroupedAnd(pubParam);
      checkParentKeyQry.AND().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
     
      Query qry = checkParentKeyQry.buildJPAQuery(em);     
      Number resultCount = (Number)qry.getSingleResult();
      if (resultCount.longValue() != requiredCount)
View Full Code Here

          DynamicQuery.PREDICATE_EQUALS);
     
      DynamicQuery checkDomainKeyQry = new DynamicQuery();
      checkDomainKeyQry.append("select t.entityKey from Tmodel t").pad();
     
      checkDomainKeyQry.WHERE().pad().appendGroupedAnd(notPubParam, keyParam);

      Query qry = checkDomainKeyQry.buildJPAQuery(em);
      List<?> obj = qry.getResultList();
      // If there are results then another publisher has the domain key and therefore the key generator is unavailable
      if (obj != null && obj.size() > 0)
View Full Code Here

      }
     
      DynamicQuery checkParentKeyQry = new DynamicQuery();
      checkParentKeyQry.append("select COUNT(t.entityKey) from Tmodel t").pad();

      checkParentKeyQry.WHERE().pad().appendGroupedAnd(pubParam);
      checkParentKeyQry.AND().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));
     
      Query qry = checkParentKeyQry.buildJPAQuery(em);     
      Number resultCount = (Number)qry.getSingleResult();
      if (resultCount.longValue() != requiredCount)
View Full Code Here

          DynamicQuery.PREDICATE_EQUALS);
     
      DynamicQuery checkDomainKeyQry = new DynamicQuery();
      checkDomainKeyQry.append("select t.entityKey from Tmodel t").pad();
     
      checkDomainKeyQry.WHERE().pad().appendGroupedAnd(notPubParam, keyParam);

      Query qry = checkDomainKeyQry.buildJPAQuery(em);
      List<?> obj = qry.getResultList();
      // If there are results then another publisher has the domain key and therefore the key generator is unavailable
      if (obj != null && obj.size() > 0)
View Full Code Here

    }

    // Make sure keys aren't implicated in another transfer request
    DynamicQuery checkKeysQry = new DynamicQuery();
    checkKeysQry.append("select ttk.entityKey from TransferTokenKey ttk ");
    checkKeysQry.WHERE().pad().appendGroupedOr(params.toArray(new DynamicQuery.Parameter[0]));

    Query qry = checkKeysQry.buildJPAQuery(em);
    List<?> obj = qry.getResultList();
    if (obj != null && obj.size() > 0)
      throw new TokenAlreadyExistsException(new ErrorMessage("errors.gettransfertoken.KeyExists", (String)obj.get(0)));
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.