Examples of MetadataClass


Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

        xmlEntityMappings = reloadXMLEntityMappingsObject(xmlEntityMappings);
       
        // Initialize the newly loaded/built mapped superclass
        MappedSuperclassAccessor mappedSuperclass = xmlEntityMappings.getMappedSuperclasses().get(0);
        Class mappedSuperclassClass = getClassForName(mappedSuperclass.getClassName());
        mappedSuperclass.initXMLClassAccessor(new MetadataClass(mappedSuperclassClass, this), descriptor, m_project);
       
        return mappedSuperclass;
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

            // for this persistence unit. Its inclusion therefore in this
            // persistence unit is through the use of an Embedded annotation
            // or an embedded element within a known entity. Therefore validate
            // that the reference class does indeed have an Embeddable
            // annotation.
            MetadataClass metadataClass = new MetadataClass(getReferenceClass());
            if (metadataClass.isAnnotationNotPresent(Embeddable.class)) {   
                throw ValidationException.invalidEmbeddedAttribute(getJavaClass(), getAttributeName(), getReferenceClass());
            } else {
                accessor = new EmbeddableAccessor(metadataClass.getAnnotation(Embeddable.class), getReferenceClass(), getProject());
                getProject().addEmbeddableAccessor(accessor);
            }
        }
       
        if (accessor.isProcessed()) {
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

                MappedSuperclassAccessor accessor = getProject().getMappedSuperclass(parent);

                // If the mapped superclass was not defined in XML then check
                // for a MappedSuperclass annotation.
                if (accessor == null) {
                    MetadataClass metadataClass = new MetadataClass(parent);
                    if (metadataClass.isAnnotationPresent(MappedSuperclass.class)) {
                        m_mappedSuperclasses.add(new MappedSuperclassAccessor(metadataClass.getAnnotation(MappedSuperclass.class), parent, getDescriptor()));
                    }
                } else {
                    m_mappedSuperclasses.add(reloadMappedSuperclass(accessor, getDescriptor()));
                }
            }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

   
    /**
     * Return if a given class is annotated with @Embeddable.
     */
    public static Annotation getEmbeddableAnnotation(Class candidateClass){
        return new MetadataClass(candidateClass).getAnnotation(javax.persistence.Embeddable.class);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

   
    /**
     * Return if a given class is annotated with @Entity.
     */
    public static Annotation getEntityAnnotation(Class candidateClass){
        return new MetadataClass(candidateClass).getAnnotation(javax.persistence.Entity.class);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

   
    /**
     * Return if a given class is annotated with @Embeddable.
     */
    public static boolean isEmbeddable(Class candidateClass) {
        return new MetadataClass(candidateClass).isAnnotationPresent(javax.persistence.Embeddable.class);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

   
    /**
     * Return if a given class is annotated with @Entity.
     */
    public static boolean isEntity(Class candidateClass){
        return new MetadataClass(candidateClass).isAnnotationPresent(javax.persistence.Entity.class);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

   
    /**
     * INTERNAL:
     */
    public ClassAccessor(Annotation annotation, Class cls, MetadataProject project) {
        super(annotation, new MetadataClass(cls), new MetadataDescriptor(cls), project);
       
        // Set the class accessor reference on the descriptor.
        getDescriptor().setClassAccessor(this);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

     * INTERNAL:
     * Called from MappedSuperclassAccessor. We want to avoid setting the
     * class accessor on the descriptor to be the MappedSuperclassAccessor.
     */
    protected ClassAccessor(Annotation annotation, Class cls, MetadataDescriptor descriptor) {   
        super(annotation, new MetadataClass(cls), descriptor, descriptor.getProject());
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass

    /**
     * INTERNAL:
     * Add a discovered metamodel class to the session.
     */
    public void addStaticMetamodelClass(MetadataAnnotation annotation, MetadataClass metamodelClass) {
        MetadataClass modelClass = metamodelClass.getMetadataClass((String) annotation.getAttributeString("value"));
       
        m_session.addStaticMetamodelClass(modelClass.getName(), metamodelClass.getName());
    }
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.