Package javax.persistence

Examples of javax.persistence.NamedQuery


          QueryBinder.bindSqlResultsetMapping( current, mappings, false );
        }
      }
    }
    {
      NamedQuery ann = annotatedElement.getAnnotation( NamedQuery.class );
      QueryBinder.bindQuery( ann, mappings, false );
    }
    {
      org.hibernate.annotations.NamedQuery ann = annotatedElement.getAnnotation(
          org.hibernate.annotations.NamedQuery.class
View Full Code Here


          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
      else {
        NamedQuery namedQuery = getAnnotation(annotations, NamedQuery.class);
        if (namedQuery != null) {
          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
    }
    catch (Exception e) {
      // Ignore
View Full Code Here

          QueryBinder.bindSqlResultsetMapping( current, mappings, false );
        }
      }
    }
    {
      NamedQuery ann = annotatedElement.getAnnotation( NamedQuery.class );
      QueryBinder.bindQuery( ann, mappings, false );
    }
    {
      org.hibernate.annotations.NamedQuery ann = annotatedElement.getAnnotation(
          org.hibernate.annotations.NamedQuery.class
View Full Code Here

          QueryBinder.bindSqlResultsetMapping( current, mappings, false );
        }
      }
    }
    {
      NamedQuery ann = annotatedElement.getAnnotation( NamedQuery.class );
      QueryBinder.bindQuery( ann, mappings, false );
    }
    {
      org.hibernate.annotations.NamedQuery ann = annotatedElement.getAnnotation(
          org.hibernate.annotations.NamedQuery.class
View Full Code Here

  private NamedQueries getNamedQueries(Element tree, XMLContext.Default defaults) {
    //TODO avoid the Proxy Creation (@NamedQueries) when possible
    List<NamedQuery> queries = (List<NamedQuery>) buildNamedQueries( tree, false, defaults );
    if ( defaults.canUseJavaAnnotations() ) {
      NamedQuery annotation = getJavaAnnotation( NamedQuery.class );
      addNamedQueryIfNeeded( annotation, queries );
      NamedQueries annotations = getJavaAnnotation( NamedQueries.class );
      if ( annotations != null ) {
        for ( NamedQuery current : annotations.value() ) {
          addNamedQueryIfNeeded( current, queries );
View Full Code Here

          QueryBinder.bindSqlResultsetMapping( current, mappings, false );
        }
      }
    }
    {
      NamedQuery ann = annotatedElement.getAnnotation( NamedQuery.class );
      QueryBinder.bindQuery( ann, mappings, false );
    }
    {
      org.hibernate.annotations.NamedQuery ann = annotatedElement.getAnnotation(
          org.hibernate.annotations.NamedQuery.class
View Full Code Here

    {
        ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata();
        String name, query = null;
        if (clazz.isAnnotationPresent(NamedQuery.class))
        {
            NamedQuery ann = (NamedQuery) clazz.getAnnotation(NamedQuery.class);
            appMetadata.addQueryToCollection(ann.name(), ann.query(), false, clazz);
        }

        if (clazz.isAnnotationPresent(NamedQueries.class))
        {
            NamedQueries ann = (NamedQueries) clazz.getAnnotation(NamedQueries.class);

            NamedQuery[] anns = ann.value();
            for (NamedQuery a : anns)
            {
                appMetadata.addQueryToCollection(a.name(), a.query(), false, clazz);
            }
        }

        if (clazz.isAnnotationPresent(NamedNativeQuery.class))
        {
            NamedNativeQuery ann = (NamedNativeQuery) clazz.getAnnotation(NamedNativeQuery.class);
            appMetadata.addQueryToCollection(ann.name(), ann.query(), true, clazz);
        }

        if (clazz.isAnnotationPresent(NamedNativeQueries.class))
        {
            NamedNativeQueries ann = (NamedNativeQueries) clazz.getAnnotation(NamedNativeQueries.class);

            NamedNativeQuery[] anns = ann.value();
            for (NamedNativeQuery a : anns)
            {
                appMetadata.addQueryToCollection(a.name(), a.query(), true, clazz);
            }
        }
View Full Code Here

    {
        ApplicationMetadata appMetadata = kunderaMetadata.getApplicationMetadata();
        String name, query = null;
        if (clazz.isAnnotationPresent(NamedQuery.class))
        {
            NamedQuery ann = (NamedQuery) clazz.getAnnotation(NamedQuery.class);
            appMetadata.addQueryToCollection(ann.name(), ann.query(), false, clazz);
        }

        if (clazz.isAnnotationPresent(NamedQueries.class))
        {
            NamedQueries ann = (NamedQueries) clazz.getAnnotation(NamedQueries.class);

            NamedQuery[] anns = ann.value();
            for (NamedQuery a : anns)
            {
                appMetadata.addQueryToCollection(a.name(), a.query(), false, clazz);
            }
        }

        if (clazz.isAnnotationPresent(NamedNativeQuery.class))
        {
            NamedNativeQuery ann = (NamedNativeQuery) clazz.getAnnotation(NamedNativeQuery.class);
            appMetadata.addQueryToCollection(ann.name(), ann.query(), true, clazz);
        }

        if (clazz.isAnnotationPresent(NamedNativeQueries.class))
        {
            NamedNativeQueries ann = (NamedNativeQueries) clazz.getAnnotation(NamedNativeQueries.class);

            NamedNativeQuery[] anns = ann.value();
            for (NamedNativeQuery a : anns)
            {
                appMetadata.addQueryToCollection(a.name(), a.query(), true, clazz);
            }
        }
View Full Code Here

          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
      else {
        NamedQuery namedQuery = getAnnotation(annotations, NamedQuery.class);
        if (namedQuery != null) {
          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
    }
    catch (Exception e) {
      // Ignore
View Full Code Here

          QueryBinder.bindSqlResultsetMapping( current, mappings, false );
        }
      }
    }
    {
      NamedQuery ann = annotatedElement.getAnnotation( NamedQuery.class );
      QueryBinder.bindQuery( ann, mappings, false );
    }
    {
      org.hibernate.annotations.NamedQuery ann = annotatedElement.getAnnotation(
          org.hibernate.annotations.NamedQuery.class
View Full Code Here

TOP

Related Classes of javax.persistence.NamedQuery

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.