Package javax.persistence

Examples of javax.persistence.NamedQuery.query()


                final Class<?> clazz = Class.forName(packge.getName() + "." + entity.getName());
                final Annotation[] annotations = clazz.getAnnotations();
                for (final Annotation annotation : annotations) {
                    if (annotation.annotationType().equals(NamedQuery.class)) {
                        final NamedQuery nq = (NamedQuery) annotation;
                        entity.getQueries().add(new QueryVO(nq.name(), nq.query()));
                    } else if (annotation.annotationType().equals(NamedQueries.class)) {
                        final NamedQueries nqs = (NamedQueries) annotation;
                        for (final NamedQuery nq : nqs.value()) {
                            entity.getQueries().add(new QueryVO(nq.name(), nq.query()));
                        }
View Full Code Here


                        final NamedQuery nq = (NamedQuery) annotation;
                        entity.getQueries().add(new QueryVO(nq.name(), nq.query()));
                    } else if (annotation.annotationType().equals(NamedQueries.class)) {
                        final NamedQueries nqs = (NamedQueries) annotation;
                        for (final NamedQuery nq : nqs.value()) {
                            entity.getQueries().add(new QueryVO(nq.name(), nq.query()));
                        }
                    }
                }
            }
            Collections.sort(packge.getEntities());
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);
View Full Code Here

        }

        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);
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);
View Full Code Here

        }

        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);
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.