Package org.glassfish.ejb.deployment.descriptor.runtime

Examples of org.glassfish.ejb.deployment.descriptor.runtime.IASEjbCMPFinder


        try{
        Set keySet = finders.keySet();
        Iterator it = keySet.iterator();
        while (it.hasNext()){
            Object obj = it.next();
            IASEjbCMPFinder finder = (IASEjbCMPFinder)finders.get(obj);
           
            //method-name
            String methodName = finder.getMethodName();
            if(methodName.length()==0){
                oneFailed = true;
                result.failed(smh.getLocalString(getClass().getName()+".failed2",
                    "FAILED [AS-EJB finder] : method-name cannot be an empty string."));
            }else{
                result.passed(smh.getLocalString(getClass().getName()+".passed2",
                    "PASSED [AS-EJB finder] : method-name is {0}",
                    new Object[]{methodName}));
            }

            //query-params
            String value = finder.getQueryParameterDeclaration();
            testQuery(value,result,"finder","query-params");

            //query-filter
            value = finder.getQueryFilter();
            testQuery(value,result,"finder","query-filter");

            //query-variables
            value = finder.getQueryVariables();
            testQuery(value,result,"finder","query-variables");

            //query-ordering
            value = finder.getQueryOrdering();
            testQuery(value,result,"finder","query-ordering");
        }
        }catch(Exception ex){
            oneFailed = true;
            result.failed(smh.getLocalString(getClass().getName()+".notRun",
View Full Code Here


   * query filter
   * @return the jdo filter expression
   */
  public String getJDOFilterExpression (Method method)
  {
    IASEjbCMPFinder cmpFinder = getFinder(method);

    return ((cmpFinder != null) ? cmpFinder.getQueryFilter() : null);
  }
View Full Code Here

   * parameter declaration
   * @return the jdo parameter declaration
   */
  public String getJDOParameterDeclaration (Method method)
  {
    IASEjbCMPFinder cmpFinder = getFinder(method);

    return ((cmpFinder != null) ?
      cmpFinder.getQueryParameterDeclaration() : null);
  }
View Full Code Here

   * parameter declaration
   * @return the jdo variables declaration
   */
  public String getJDOVariableDeclaration (Method method)
  {
    IASEjbCMPFinder cmpFinder = getFinder(method);

    return ((cmpFinder != null) ? cmpFinder.getQueryVariables() : null);
  }
View Full Code Here

   * parameter declaration
   * @return the jdo ordering specification
   */
  public String getJDOOrderingSpecification (Method method)
        {
    IASEjbCMPFinder cmpFinder = getFinder(method);

    return ((cmpFinder != null) ? cmpFinder.getQueryOrdering() : null);
        }
View Full Code Here

  private IASEjbCMPFinder getFinder (Method method)
  {
    IASEjbCMPEntityDescriptor cmpDescriptor =
      (IASEjbCMPEntityDescriptor)getDescriptor();
    IASEjbCMPFinder finder = cmpDescriptor.getIASEjbCMPFinder(method);

    if (finder == null) {
      String methodSignature = cmpDescriptor.getName() + '.' +
        method.getName() +
        JavaClassWriterHelper.parenleft_ +
View Full Code Here

                throw new RuntimeException(msg);
            }
           
            //parse the query declaration parameter and store the query object
            for ( Iterator i = arrOneOneFinders.iterator(); i.hasNext(); ) {
                IASEjbCMPFinder finder = ( IASEjbCMPFinder )i.next();
                String key = generateKey(finder, queryParser);
                oneOneFinders.put(key, finder);
            }
            arrOneOneFinders.clear();
        }
View Full Code Here

        Map finders = ejbDescriptor.getOneOneFinders();
        if (!finders.isEmpty()) {
            Node findersNode = appendChild(cmpNode, RuntimeTagNames.ONE_ONE_FINDERS);
            FinderNode fn = new FinderNode();
            for (Iterator finderIterator = finders.values().iterator();finderIterator.hasNext();) {
                IASEjbCMPFinder aFinder = (IASEjbCMPFinder) finderIterator.next();
                fn.writeDescriptor(findersNode, RuntimeTagNames.FINDER, aFinder);
            }
        }

        // prefetch-disabled
View Full Code Here

    private IASEjbCMPFinder descriptor;

    @Override
    public IASEjbCMPFinder getDescriptor() {
        if (descriptor==null) descriptor = new IASEjbCMPFinder();
        return descriptor;
    }
View Full Code Here

        try{
        Set keySet = finders.keySet();
        Iterator it = keySet.iterator();
        while (it.hasNext()){
            Object obj = it.next();
            IASEjbCMPFinder finder = (IASEjbCMPFinder)finders.get(obj);
           
            //method-name
            String methodName = finder.getMethodName();
            if(methodName.length()==0){
                oneFailed = true;
                result.failed(smh.getLocalString(getClass().getName()+".failed2",
                    "FAILED [AS-EJB finder] : method-name cannot be an empty string."));
            }else{
                result.passed(smh.getLocalString(getClass().getName()+".passed2",
                    "PASSED [AS-EJB finder] : method-name is {0}",
                    new Object[]{methodName}));
            }

            //query-params
            String value = finder.getQueryParameterDeclaration();
            testQuery(value,result,"finder","query-params");

            //query-filter
            value = finder.getQueryFilter();
            testQuery(value,result,"finder","query-filter");

            //query-variables
            value = finder.getQueryVariables();
            testQuery(value,result,"finder","query-variables");

            //query-ordering
            value = finder.getQueryOrdering();
            testQuery(value,result,"finder","query-ordering");
        }
        }catch(Exception ex){
            oneFailed = true;
            result.failed(smh.getLocalString(getClass().getName()+".notRun",
View Full Code Here

TOP

Related Classes of org.glassfish.ejb.deployment.descriptor.runtime.IASEjbCMPFinder

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.