Examples of JpaEntityMap


Examples of org.apache.cayenne.jpa.map.JpaEntityMap

            addChildVisitor(JpaEmbeddable.class, new EmbeddableVisitor());
        }

        @Override
        public boolean onStartNode(ProjectPath path) {
            JpaEntityMap entityMap = (JpaEntityMap) path.getObject();

            // TODO: andrus, 4/28/2006 - actually we need to analyze preloaded classes and
            // see how they were annotated to choose the right access type...

            entityMap.setAccess(AccessType.FIELD);

            return true;
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

            // TODO: andrus, 04/18/2006 - an inefficiency in XMLDecoder - it
            // doesn't cache the mapping

            XMLDecoder decoder = new XMLDecoder();
            JpaEntityMap entityMap = (JpaEntityMap) decoder.decode(in, mappingURL
                    .toExternalForm());

            return entityMap;
        }
        catch (Exception e) {
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

    protected ClassLoader tempClassLoader;

    public EntityMapLoaderContext(PersistenceUnitInfo unit) {
        this.unit = unit;
        this.conflicts = new ValidationResult();
        this.entityMap = new JpaEntityMap();
        this.tempClassLoader = unit.getNewTempClassLoader();
    }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        public void onFinishElement(
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            JpaEntity entity = (JpaEntity) context.pop();
            JpaEntityMap entityMap = (JpaEntityMap) context.peek();
            entityMap.getEntities().add(entity);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        public void onFinishElement(
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            JpaEmbeddable embeddable = (JpaEmbeddable) context.pop();
            JpaEntityMap entityMap = (JpaEntityMap) context.peek();
            entityMap.getEmbeddables().add(embeddable);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        public void onFinishElement(
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            JpaMappedSuperclass superclass = (JpaMappedSuperclass) context.pop();
            JpaEntityMap entityMap = (JpaEntityMap) context.peek();
            entityMap.getMappedSuperclasses().add(superclass);
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        }
    }

    protected void updateInheritanceHierarchy() {

        JpaEntityMap map = getEntityMap();

        for (JpaEntity entity : map.getEntities()) {

            Class<?> superclass = entity
                    .getClassDescriptor()
                    .getManagedClass()
                    .getSuperclass();

            while (superclass != null && !superclass.getName().equals("java.lang.Object")) {

                JpaEntity superEntity = map.getEntity(superclass.getName());
                if (superEntity != null) {
                    entity.setSuperEntity(superEntity);
                    break;
                }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        loadedLocations.add(DESCRIPTOR_LOCATION);
        Enumeration<URL> standardDescriptors = context.getTempClassLoader().getResources(
                DESCRIPTOR_LOCATION);

        while (standardDescriptors.hasMoreElements()) {
            JpaEntityMap map = loader.getEntityMap(standardDescriptors.nextElement());
            merger.mergeOverride(map);
        }

        // 2. load from orm.xml within the jars
        // TODO: andrus, 4/20/2006 - load from the jar files

        // 3. load from explicitly specified descriptors
        for (String descriptor : unit.getMappingFileNames()) {

            // avoid loading duplicates, such as META-INF/orm.xml that is also explicitly
            // mentioned in the unit...
            if (loadedLocations.add(descriptor)) {

                Enumeration<URL> mappedDescriptors = context
                        .getTempClassLoader()
                        .getResources(descriptor);
                while (mappedDescriptors.hasMoreElements()) {
                    JpaEntityMap map = loader.getEntityMap(mappedDescriptors
                            .nextElement());
                    merger.mergeOverride(map);
                }
            }
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

    protected ClassLoader tempClassLoader;

    public EntityMapLoaderContext(PersistenceUnitInfo unit) {
        this.unit = unit;
        this.conflicts = new ValidationResult();
        this.entityMap = new JpaEntityMap();
        this.tempClassLoader = unit.getNewTempClassLoader();
    }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaEntityMap

        public void onFinishElement(
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            JpaEntity entity = (JpaEntity) context.pop();
            JpaEntityMap entityMap = (JpaEntityMap) context.peek();
            entityMap.getEntities().add(entity);
        }
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.