Package com.ctp.cdi.query.meta.unit.EntityDescriptorReader

Examples of com.ctp.cdi.query.meta.unit.EntityDescriptorReader.MappingFile


            EntityDescriptorReader reader = new EntityDescriptorReader();
            List<EntityDescriptor> entities = new LinkedList<EntityDescriptor>();
            List<MappedSuperclassDescriptor> superClasses = new LinkedList<MappedSuperclassDescriptor>();
            NodeList list = element.getElementsByTagName("mapping-file");
            for (int i = 0; i < list.getLength(); i++) {
                MappingFile mappings = reader.readAll(baseUrl, list.item(i).getTextContent());
                entities.addAll(mappings.getEntities());
                superClasses.addAll(mappings.getSuperClasses());
            }
            MappingFile mappings = reader.readDefaultOrm(baseUrl);
            entities.addAll(mappings.getEntities());
            superClasses.addAll(mappings.getSuperClasses());
            DescriptorHierarchyBuilder.newInstance(entities, superClasses).buildHierarchy();
            return entities;
        } catch (Exception e) {
            throw new RuntimeException("Failed initializing mapping files", e);
        }
View Full Code Here

TOP

Related Classes of com.ctp.cdi.query.meta.unit.EntityDescriptorReader.MappingFile

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.