Examples of jdoIsDetached()


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

    {
        assertIsOpen();
        if (pc != null && pc instanceof PersistenceCapable)
        {
            PersistenceCapable p = (PersistenceCapable) pc;
            if (p.jdoIsPersistent() || p.jdoIsDetached())
            {
                return p.jdoGetObjectId();
            }
        }
        return null;
View Full Code Here

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

                PersistenceCapable toCheckPC = myPC;
                Object toCheckID = myID;
                disconnect();

                if (!toCheckPC.jdoIsDetached())
                {
                    // Sanity check on the objects detached state
                    throw new JPOXUserException(LOCALISER.msg("026025", toCheckPC.getClass().getName(), toCheckID));
                }
            }
View Full Code Here

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

                PersistenceCapable toCheckPC = myPC;
                Object toCheckID = myID;
                disconnect();

                if (!toCheckPC.jdoIsDetached())
                {
                    // Sanity check on the objects detached state
                    throw new NucleusUserException(LOCALISER.msg("026025", toCheckPC.getClass().getName(), toCheckID));
                }
            }
View Full Code Here

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

    {
        assertIsOpen();
        if (pc != null && pc instanceof PersistenceCapable)
        {
            PersistenceCapable p = (PersistenceCapable) pc;
            if (p.jdoIsPersistent() || p.jdoIsDetached())
            {
                return p.jdoGetObjectId();
            }
        }
        return null;
View Full Code Here

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

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("JPA Persist - entity: " + entity);
        }
        if (entity instanceof PersistenceCapable) {
            PersistenceCapable pc = (PersistenceCapable) entity;
            if (pc.jdoIsDetached()) {
                /**
                 * Sec - 3.2.2
                 * If X is a detached object, the EntityExistsException may be thrown when the persist
                 * operation is invoked, or the EntityExistsException or another PersistenceException may be thrown
                 * at flush or commit time
View Full Code Here

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

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("JPA Merge: - entity: " + entity);
        }
        if (entity instanceof PersistenceCapable) {
            PersistenceCapable pc = (PersistenceCapable) entity;
            if (pc.jdoIsDetached() && pc.jdoGetObjectId() == null) {
                throw new IllegalArgumentException("Detached entity with null id cannot be merged.");
            }
            // Read id from entity
            StateManager sm = om.findStateManager(entity);
            if (sm != null) {
View Full Code Here

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

                PersistenceCapable toCheckPC = myPC;
                Object toCheckID = myID;
                disconnect();

                if (!toCheckPC.jdoIsDetached())
                {
                    // Sanity check on the objects detached state
                    throw new NucleusUserException(LOCALISER.msg("026025", toCheckPC.getClass().getName(), toCheckID));
                }
            }
View Full Code Here

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

    {
        assertIsOpen();
        if (pc != null && pc instanceof PersistenceCapable)
        {
            PersistenceCapable p = (PersistenceCapable) pc;
            if (p.jdoIsPersistent() || p.jdoIsDetached())
            {
                return p.jdoGetObjectId();
            }
        }
        return 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.