Package org.jboss.dna.connector.store.jpa.util

Examples of org.jboss.dna.connector.store.jpa.util.StoreOptions


            // Establish a connection and obtain the store options...
            entityManager = entityManagerFactory.createEntityManager();

            // Find and update/set the root node's UUID ...
            StoreOptions options = new StoreOptions(entityManager);
            UUID actualUuid = options.getRootNodeUuid();
            if (actualUuid != null) {
                this.setRootNodeUuid(actualUuid.toString());
            } else {
                options.setRootNodeUuid(this.rootUuid);
            }

            // Find or set the type of model that will be used.
            String actualModelName = options.getModelName();
            if (actualModelName == null) {
                // This is a new store, so set to the specified model ...
                if (model == null) setModel(Models.DEFAULT.getName());
                assert model != null;
                options.setModelName(model);
            } else {
                try {
                    setModel(actualModelName);
                } catch (Throwable e) {
                    // The actual model name doesn't match what's available in the software ...
View Full Code Here

TOP

Related Classes of org.jboss.dna.connector.store.jpa.util.StoreOptions

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.