Package javax.persistence

Examples of javax.persistence.NamedQueries


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


      addNamedQuery(new NamedQueryInfo(aClass.getAnnotation(NamedQuery.class)));
    }

    aClasses = Empire.get().getAnnotationProvider().getClassesWithAnnotation(NamedQueries.class);
    for (Class<?> aClass : aClasses) {
      NamedQueries aNamedQueries = aClass.getAnnotation(NamedQueries.class);

      for (NamedQuery aQuery : aNamedQueries.value()) {
        addNamedQuery(new NamedQueryInfo(aQuery));
      }
    }

    aClasses = Empire.get().getAnnotationProvider().getClassesWithAnnotation(NamedNativeQuery.class);
View Full Code Here

    Map<String, IQuery> queries = new HashMap<String, IQuery>();

    try {
      Class<?> type = getType().getType();
      Annotation[] annotations = type.getAnnotations();
      NamedQueries namedQueries = getAnnotation(annotations, NamedQueries.class);

      if (namedQueries != null) {
        for (NamedQuery namedQuery : namedQueries.value()) {
          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
      else {
View Full Code Here

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

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

    //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 );
        }
      }
    }
    if ( queries.size() > 0 ) {
View Full Code Here

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

            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

            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

    Map<String, IQuery> queries = new HashMap<String, IQuery>();

    try {
      Class<?> type = getType().getType();
      Annotation[] annotations = type.getAnnotations();
      NamedQueries namedQueries = getAnnotation(annotations, NamedQueries.class);

      if (namedQueries != null) {
        for (NamedQuery namedQuery : namedQueries.value()) {
          IQuery query = buildQuery(namedQuery);
          queries.put(namedQuery.name(), query);
        }
      }
      else {
View Full Code Here

TOP

Related Classes of javax.persistence.NamedQueries

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.