Examples of JpaEntityMap


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

            // name is formed as the concatenation of the following: the name of
            // the relationship property or field of entityA; "_" ; the name of
            // the primary key column in table B. The foreign key column has the
            // same type as the primary key of table B.

            JpaEntityMap map = path.firstInstanceOf(JpaEntityMap.class);
            JpaEntity target = map.entityForClass(relationship.getTargetEntityName());

            if (target == null) {
                context.recordConflict(new SimpleValidationFailure(
                        relationship,
                        "Invalid relationship target "
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

            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

            JpaManagedClass entity = path.firstInstanceOf(JpaManagedClass.class);
            access = entity.getAccess();

            if (access == null) {
                JpaEntityMap map = path.firstInstanceOf(JpaEntityMap.class);
                access = map.getAccess();
            }

            Class<?> objectClass = targetPath
                    .firstInstanceOf(Embeddable.class)
                    .getJavaClass();
View Full Code Here

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

            JpaManagedClass entity = path.firstInstanceOf(JpaManagedClass.class);
            access = entity.getAccess();

            if (access == null) {
                JpaEntityMap map = path.firstInstanceOf(JpaEntityMap.class);
                access = map.getAccess();
            }

            Class<?> objectClass = targetPath
                    .firstInstanceOf(ObjEntity.class)
                    .getJavaClass();
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

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