Package org.eclipse.persistence.internal.jpa.metadata

Examples of org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor


                weaveFetchGroups = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_FETCHGROUPS, predeployProperties, "true", session));
                weaveInternal = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_INTERNAL, predeployProperties, "true", session));
            }
            if (!isSessionLoadedFromSessionsXML ) {
                // Create an instance of MetadataProcessor for specified persistence unit info
                processor = new MetadataProcessor(persistenceUnitInfo, session, privateClassLoader, enableWeaving, weaveEager);
               
                // Process the Object/relational metadata from XML and annotations.
                PersistenceUnitProcessor.processORMetadata(processor, throwExceptionOnFail);

                if (session.getIntegrityChecker().hasErrors()){
View Full Code Here


     */
    private static Set<String> buildPersistentClassSetFromXMLDocuments(PersistenceUnitInfo info, ClassLoader loader){
        // Build a MetadataProcessor to search the mapped classes in orm xml
        // documents. We hand in a null session since none of the functionality
        // required uses a session. (At least we hope not)
        MetadataProcessor processor = new MetadataProcessor(info, null, loader, false, false);
        // Read the mapping files.
        processor.loadMappingFiles(false);
        // Return the class set.
        return processor.getPersistenceUnitClassSetFromMappingFiles();
    }
View Full Code Here

        if (weaveEagerString != null && weaveEagerString.equalsIgnoreCase("true")) {
            weaveEager = true;
        }
       
        // Create an instance of MetadataProcessor for specified persistence unit info
        MetadataProcessor processor = new MetadataProcessor(unitInfo, session, privateClassLoader, true, weaveEager);
        // Process the Object/relational metadata from XML and annotations.
        PersistenceUnitProcessor.processORMetadata(processor, false);

        //Collection entities = buildEntityList(persistenceUnitInfo, privateClassLoader);
        Collection entities = PersistenceUnitProcessor.buildEntityList(processor.getProject(), privateClassLoader);

        boolean weaveLazy = true;
        String weaveL = (String)unitInfo.getProperties().get(PersistenceUnitProperties.WEAVING_LAZY);
        if (weaveL != null && weaveL.equalsIgnoreCase("false")) {
            weaveLazy = false;
View Full Code Here

                weaveFetchGroups = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_FETCHGROUPS, predeployProperties, "true", session));
                weaveInternal = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_INTERNAL, predeployProperties, "true", session));
            }
            if (!isSessionLoadedFromSessionsXML ) {
                // Create an instance of MetadataProcessor for specified persistence unit info
                processor = new MetadataProcessor(persistenceUnitInfo, session, privateClassLoader, enableWeaving, weaveEager);
               
                // Process the Object/relational metadata from XML and annotations.
                PersistenceUnitProcessor.processORMetadata(processor, throwExceptionOnFail);

                if (session.getIntegrityChecker().hasErrors()){
View Full Code Here

     */
    private static Set<String> buildPersistentClassSetFromXMLDocuments(PersistenceUnitInfo info, ClassLoader loader){
        // Build a MetadataProcessor to search the mapped classes in orm xml
        // documents. We hand in a null session since none of the functionality
        // required uses a session. (At least we hope not)
        MetadataProcessor processor = new MetadataProcessor(info, null, loader, false, false);
        // Read the mapping files.
        processor.loadMappingFiles(false);
        // Return the class set.
        return processor.getPersistenceUnitClassSetFromMappingFiles();
    }
View Full Code Here

     */
    private static Set<String> buildPersistentClassSetFromXMLDocuments(PersistenceUnitInfo info, ClassLoader loader){
        // Build a MetadataProcessor to search the mapped classes in orm xml
        // documents. We hand in a null session since none of the functionality
        // required uses a session. (At least we hope not)
        MetadataProcessor processor = new MetadataProcessor(info, null, loader, false, false);
        // Read the mapping files.
        processor.loadMappingFiles(false);
        // Return the class set.
        return processor.getPersistenceUnitClassSetFromMappingFiles();
    }
View Full Code Here

                weaveFetchGroups = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_FETCHGROUPS, predeployProperties, "true", session));
                weaveInternal = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.WEAVING_INTERNAL, predeployProperties, "true", session));
            }
            if (!isSessionLoadedFromSessionsXML ) {
                // Create an instance of MetadataProcessor for specified persistence unit info
                processor = new MetadataProcessor(persistenceUnitInfo, session, privateClassLoader, enableWeaving, weaveEager);
               
                // Process the Object/relational metadata from XML and annotations.
                PersistenceUnitProcessor.processORMetadata(processor, throwExceptionOnFail);

                if (session.getIntegrityChecker().hasErrors()){
View Full Code Here

        if (weaveEagerString != null && weaveEagerString.equalsIgnoreCase("true")) {
            weaveEager = true;
        }
       
        // Create an instance of MetadataProcessor for specified persistence unit info
        MetadataProcessor processor = new MetadataProcessor(unitInfo, session, privateClassLoader, true, weaveEager);
        // Process the Object/relational metadata from XML and annotations.
        PersistenceUnitProcessor.processORMetadata(processor, false);

        //Collection entities = buildEntityList(persistenceUnitInfo, privateClassLoader);
        Collection entities = PersistenceUnitProcessor.buildEntityList(processor.getProject(), privateClassLoader);

        boolean weaveLazy = true;
        String weaveL = (String)unitInfo.getProperties().get(PersistenceUnitProperties.WEAVING_LAZY);
        if (weaveL != null && weaveL.equalsIgnoreCase("false")) {
            weaveLazy = false;
View Full Code Here

            }
            if (!isSessionLoadedFromSessionsXML ) {
                if (isComposite) {
                    predeployCompositeMembers(predeployProperties, classLoaderToUse);
                } else {
                    MetadataProcessor compositeProcessor = null;
                    if (compositeEmSetupImpl == null) {
                        mode = PersistenceUnitProcessor.Mode.ALL;
                    } else {
                        // composite member
                        if (state != STATE_HALF_PREDEPLOYED_COMPOSITE_MEMBER) {
                            state = STATE_HALF_PREDEPLOYED_COMPOSITE_MEMBER;
                            mode = PersistenceUnitProcessor.Mode.COMPOSITE_MEMBER_INITIAL;
                        }
                        compositeProcessor = compositeEmSetupImpl.processor;
                    }
                   
                    if (mode == PersistenceUnitProcessor.Mode.ALL || mode == PersistenceUnitProcessor.Mode.COMPOSITE_MEMBER_INITIAL) {
                        boolean usesMultitenantSharedEmf = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.MULTITENANT_SHARED_EMF, predeployProperties, "true", session));
                        boolean usesMultitenantSharedCache = "true".equalsIgnoreCase(EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.MULTITENANT_SHARED_CACHE, predeployProperties, "false", session));
   
                        // Create an instance of MetadataProcessor for specified persistence unit info
                        processor = new MetadataProcessor(persistenceUnitInfo, session, classLoaderToUse, weaveLazy, weaveEager, weaveFetchGroups, usesMultitenantSharedEmf, usesMultitenantSharedCache, predeployProperties, compositeProcessor);
                       
                        //need to use the real classloader to create the repository class
                        updateMetadataRepository(predeployProperties, classLoaderToUse);
       
                        //bug:299926 - Case insensitive table / column matching with native SQL queries
View Full Code Here

        // makes sure each member has a non-null property, overrides where required properties with composite's predeploy properties.
        updateCompositeMembersProperties(compositeMemberPuInfos, predeployProperties);
        // Don't log these properties - may contain passwords. The properties will be logged by contained persistence units.
        Map compositeMemberMapOfProperties = (Map)getConfigProperty(PersistenceUnitProperties.COMPOSITE_UNIT_PROPERTIES, predeployProperties);
        this.compositeMemberEmSetupImpls = new HashSet(compositeMemberPuInfos.size());
        this.processor = new MetadataProcessor();
        if (enableWeaving) {
            this.weaver = new PersistenceWeaver(this.session, new HashMap());
        }
       
        // create containedEmSetupImpls and predeploy them for the first time.
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor

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.