Examples of jdoReplaceStateManager()


Examples of javax.jdo.spi.PersistenceCapable.jdoReplaceStateManager()

        // Create a StateManager to give us a means of extracting the detached info
        PersistenceCapable pc = (PersistenceCapable)obj;
        org.datanucleus.ObjectManager thePM = ((JDOPersistenceManager)pm).getObjectManager();
        StateManager sm = StateManagerFactory.newStateManagerForDetached(thePM, pc, getObjectId(pc), null);
        pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm); // Assign this StateManager to our detached object
        sm.retrieveDetachState(sm);
        String[] loadedFieldNames = sm.getLoadedFieldNames();
        pc.jdoReplaceStateManager(null); // Remove the StateManager from our detached object

        return loadedFieldNames;
View Full Code Here

Examples of javax.jdo.spi.PersistenceCapable.jdoReplaceStateManager()

        org.datanucleus.ObjectManager thePM = ((JDOPersistenceManager)pm).getObjectManager();
        StateManager sm = StateManagerFactory.newStateManagerForDetached(thePM, pc, getObjectId(pc), null);
        pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm); // Assign this StateManager to our detached object
        sm.retrieveDetachState(sm);
        String[] loadedFieldNames = sm.getLoadedFieldNames();
        pc.jdoReplaceStateManager(null); // Remove the StateManager from our detached object

        return loadedFieldNames;
    }

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