Package org.datanucleus.state

Examples of org.datanucleus.state.StateManager


        if (isDetached(pc))
        {
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();

            // Temporarily attach a StateManager to access the detached field information
            StateManager sm = (StateManager) ObjectProviderFactory.newForDetached(ec, pc, getObjectId(pc), null);
            pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm);
            sm.retrieveDetachState(sm);
            String[] dirtyFieldNames = sm.getDirtyFieldNames();
            pc.jdoReplaceStateManager(null);

            return dirtyFieldNames;
        }
        else
        {
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();
            ObjectProvider sm = ec.findObjectProvider(pc);
            if (sm == null)
            {
                return null;
            }
            return sm.getDirtyFieldNames();
        }
    }
View Full Code Here


        if (isDetached(pc))
        {
            // Temporarily attach a StateManager to access the detached field information
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();
            StateManager sm = (StateManager) ObjectProviderFactory.newForDetached(ec, pc, getObjectId(pc), null);
            pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm);
            sm.retrieveDetachState(sm);
            String[] loadedFieldNames = sm.getLoadedFieldNames();
            pc.jdoReplaceStateManager(null);

            return loadedFieldNames;
        }
        else
        {
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();
            ObjectProvider sm = ec.findObjectProvider(pc);
            if (sm == null)
            {
                return null;
            }
            return sm.getLoadedFieldNames();
        }
    }
View Full Code Here

        if (isDetached(pc))
        {
            // Temporarily attach a StateManager to access the detached field information
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();
            StateManager sm = (StateManager) ObjectProviderFactory.newForDetached(ec, pc, getObjectId(pc), null);
            pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm);
            sm.retrieveDetachState(sm);
            int position = sm.getClassMetaData().getAbsolutePositionOfMember(memberName);
            boolean loaded = sm.isFieldLoaded(position);
            pc.jdoReplaceStateManager(null);

            return loaded;
        }
        else
        {
            ExecutionContext ec = ((JDOPersistenceManager)pc.jdoGetPersistenceManager()).getObjectManager();
            ObjectProvider sm = ec.findObjectProvider(pc);
            if (sm == null)
            {
                return null;
            }
            int position = sm.getClassMetaData().getAbsolutePositionOfMember(memberName);
            return sm.isFieldLoaded(position);
        }
    }
View Full Code Here

        if (isDetached(pc))
        {
            // Temporarily attach a StateManager to access the detached field information
            ExecutionContext ec = ((JDOPersistenceManager)pm).getObjectManager();
            StateManager sm = (StateManager) ObjectProviderFactory.newForDetached(ec, pc, getObjectId(pc), null);
            pc.jdoReplaceStateManager((javax.jdo.spi.StateManager) sm);
            sm.retrieveDetachState(sm);
            int position = sm.getClassMetaData().getAbsolutePositionOfMember(memberName);
            boolean[] dirtyFieldNumbers = sm.getDirtyFields();
            pc.jdoReplaceStateManager(null);

            return dirtyFieldNumbers[position];
        }
        else
        {
            ExecutionContext ec = ((JDOPersistenceManager)pc.jdoGetPersistenceManager()).getObjectManager();
            ObjectProvider sm = ec.findObjectProvider(pc);
            if (sm == null)
            {
                return null;
            }
            int position = sm.getClassMetaData().getAbsolutePositionOfMember(memberName);
            boolean[] dirtyFieldNumbers = sm.getDirtyFields();
            return dirtyFieldNumbers[position];
        }
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.state.StateManager

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.