Package org.datanucleus.store.valuegenerator

Examples of org.datanucleus.store.valuegenerator.AbstractGenerator


        Class valueGeneratedType = Long.class;
        try
        {
            // Create generator so we can find the generated type
            // a). Try as unique generator first
            AbstractGenerator generator = (AbstractGenerator)
                storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
                    "org.datanucleus.store_valuegenerator",
                    new String[] {"name", "unique"}, new String[] {strategyName, "true"},
                    "class-name", new Class[] {String.class, Properties.class}, new Object[] {null, null});
            if (generator == null)
            {
                // b). Try as datastore-specific generator
                generator = (AbstractGenerator)
                    storeMgr.getNucleusContext().getPluginManager().createExecutableExtension(
                    "org.datanucleus.store_valuegenerator",
                    new String[] {"name", "datastore"}, new String[] {strategyName, storeMgr.getStoreManagerKey()},
                    "class-name", new Class[] {String.class, Properties.class}, new Object[] {null, null});
            }
            if (generator != null)
            {
                valueGeneratedType = (Class) generator.getClass().getMethod("getStorageClass").invoke(null);
            }
        }
        catch (Exception e)
        {
            NucleusLogger.VALUEGENERATION.warn("Error retrieving storage class for value-generator " +
View Full Code Here

TOP

Related Classes of org.datanucleus.store.valuegenerator.AbstractGenerator

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.