Package org.datanucleus.state

Examples of org.datanucleus.state.StateManager.makePersistent()


                                objectType == ObjectProvider.EMBEDDED_PC) && ownerOP != null)
                        {
                            // SCO object
                            sm = (StateManager) ObjectProviderFactory.newForEmbedded(this, obj, false, ownerOP, ownerFieldNum);
                            sm.setPcObjectType((short) objectType);
                            sm.makePersistent();
                            id = sm.getInternalObjectId();
                        }
                        else
                        {
                            // FCO object
View Full Code Here


                        }
                        else
                        {
                            // FCO object
                            sm = (StateManager) ObjectProviderFactory.newForPersistentNew(this, obj, preInsertChanges);
                            sm.makePersistent();
                            id = sm.getInternalObjectId();
                        }
                    }
                    else
                    {
View Full Code Here

                    else
                    {
                        if (sm.getReferencedPC() == null)
                        {
                            // Persist it
                            sm.makePersistent();
                            id = sm.getInternalObjectId();
                        }
                        else
                        {
                            // Being attached, so use the attached object
View Full Code Here

                if (NucleusLogger.PERSISTENCE.isDebugEnabled())
                {
                    NucleusLogger.PERSISTENCE.debug(LOCALISER.msg("010015", StringUtils.toJVMIDString(obj)));
                }
                StateManager sm = findStateManager(obj);
                sm.makePersistent();
                id = sm.getInternalObjectId();
            }
            else if (api.isDeleted(obj))
            {
                // Deleted : (re)-persist it (permitted in JPA, but not JDO - see StateManager)
View Full Code Here

                if (NucleusLogger.PERSISTENCE.isDebugEnabled())
                {
                    NucleusLogger.PERSISTENCE.debug(LOCALISER.msg("010015", StringUtils.toJVMIDString(obj)));
                }
                StateManager sm = findStateManager(obj);
                sm.makePersistent();
                id = sm.getInternalObjectId();
            }
            else
            {
                if (api.isPersistent(obj) && api.isTransactional(obj) && api.isDirty(obj) &&
View Full Code Here

                    if (NucleusLogger.PERSISTENCE.isDebugEnabled())
                    {
                        NucleusLogger.PERSISTENCE.debug(LOCALISER.msg("010015", StringUtils.toJVMIDString(obj)));
                    }
                    StateManager sm = findStateManager(obj);
                    sm.makePersistent();
                    id = sm.getInternalObjectId();
                }
            }

            if (id != null && txCachedIds != 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.