Examples of DetachState


Examples of org.datanucleus.state.DetachState

            if (detachAllOnTxnEndSMs != null)
            {
                // Detach all detachment root objects (causes recursion through the fetch plan)
                StateManager[] smsToDetach = detachAllOnTxnEndSMs;
                DetachState state = new DetachState(getApiAdapter());
                for (int i=0;i<smsToDetach.length;i++)
                {
                    Object pc = smsToDetach[i].getObject();
                    if (pc != null)
                    {
View Full Code Here

Examples of org.datanucleus.state.DetachState

            {
                // If the object is deleted then no point detaching.
                // An object can be in L1 cache if transient and passed in to a query as a param for example
                try
                {
                    sm.detach(new DetachState(getApiAdapter()));
                }
                catch (NucleusObjectNotFoundException onfe)
                {
                    // Catch exceptions for any objects that are deleted in other managers whilst having this open
                }
View Full Code Here

Examples of org.datanucleus.state.DetachState

                // The JPA spec doesn't actually say what to do with a newly persistent object
                // We simply flush it (which goes against "unflushed changes made to the entity will not be synced")
                // but then what are we supposed to do with a newly persistent ? does it make it into the DB after?
                om.flushInternal(true);
            }
            om.detachObject(entity, new DetachState(om.getApiAdapter()));
        }
        catch (NucleusException ne)
        {
            throwException(NucleusJPAHelper.getJPAExceptionForNucleusException(ne));
        }
View Full Code Here

Examples of org.datanucleus.state.DetachState

        try
        {
            om.assertClassPersistable(pc.getClass());
            assertReadable("detachCopy");

            return jdoDetachCopy(pc, new DetachState(om.getApiAdapter()));
        }
        catch (NucleusException ne)
        {
            throw NucleusJDOHelper.getJDOExceptionForNucleusException(ne);
        }
View Full Code Here

Examples of org.datanucleus.state.DetachState

    {
        assertIsOpen();
        assertReadable("detachCopyAll");

        // Detach the objects
        FetchPlanState state = new DetachState(om.getApiAdapter());
        List detacheds = new ArrayList();
        for (Iterator it = pcs.iterator(); it.hasNext();)
        {
            Object obj = it.next();
            if (obj == null)
View Full Code Here

Examples of org.datanucleus.state.DetachState

        {
            runningDetachAllOnCommit = true;

            // Detach all detachment root objects (causes recursion through the fetch plan)
            StateManager[] smsToDetach = detachAllOnCommitSMs;
            DetachState state = new DetachState(getApiAdapter());
            for (int i=0;i<smsToDetach.length;i++)
            {
                Object pc = smsToDetach[i].getObject();
                if (pc != null)
                {
View Full Code Here

Examples of org.datanucleus.state.DetachState

                if (sm != null && sm.getObject() != null &&
                    !sm.getObjectManager().getApiAdapter().isDeleted(sm.getObject()))
                {
                    try
                    {
                        sm.detach(new DetachState(getApiAdapter()));
                    }
                    catch (NucleusObjectNotFoundException onfe)
                    {
                        // Catch exceptions for any objects that are deleted in other managers whilst having this open
                    }
View Full Code Here

Examples of org.datanucleus.state.DetachState

        try
        {
            objectMgr.assertClassPersistable(pc.getClass());
            assertReadable("detachCopy");

            return jdoDetachCopy(pc, new DetachState(objectMgr.getApiAdapter()));
        }
        catch (NucleusException jpe)
        {
            throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
        }
View Full Code Here

Examples of org.datanucleus.state.DetachState

    {
        assertIsOpen();
        assertReadable("detachCopyAll");

        // Detach the objects
        FetchPlanState state = new DetachState(objectMgr.getApiAdapter());
        List detacheds = new ArrayList();
        for (Iterator it = pcs.iterator(); it.hasNext();)
        {
            Object obj = it.next();
            if (obj == null)
View Full Code Here

Examples of org.jpox.state.DetachState

        {
            runningDetachAllOnCommit = true;

            // Detach all detachment root objects (causes recursion through the fetch plan)
            StateManager[] smsToDetach = detachAllOnCommitSMs;
            DetachState state = new DetachState(getApiAdapter());
            for (int i=0;i<smsToDetach.length;i++)
            {
                Object pc = smsToDetach[i].getObject();
                if (pc != null)
                {
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.