Examples of findStateManager()


Examples of org.jpox.ObjectManager.findStateManager()

                {
                    Object element = elementsIter.next();
                    if (om.getApiAdapter().isPersistable(element) && om.getApiAdapter().isDeleted(element))
                    {
                        // Element is waiting to be deleted so flush it (it has the FK)
                        StateManager objSM = om.findStateManager(element);
                        objSM.flush();
                    }
                    else
                    {
                        // Element not yet marked for deletion so go through the normal process
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

            return true;
        }
        else
        {
            // Element was already persistent so make sure the FK is in place
            StateManager elementSM = om.findStateManager(element);
            if (getFieldNumberInElementForBidirectional(elementSM) >= 0 &&
                om.getOMFContext().getPersistenceConfiguration().getBooleanProperty("org.jpox.manageRelationships"))
            {
                // Managed Relations : 1-N bidir, so update the owner of the element
                om.getApiAdapter().isLoaded(elementSM, getFieldNumberInElementForBidirectional(elementSM)); // Ensure is loaded
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

        {
            return false;
        }

        ObjectManager om = sm.getObjectManager();
        StateManager esm = om.findStateManager(element);

        Object oldOwner = null;
        if (ownerFieldNumber >= 0)
        {
            if (!om.getApiAdapter().isDeleted(element))
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

                {
                    Object element = elementsIter.next();
                    if (om.getApiAdapter().isPersistable(element) && om.getApiAdapter().isDeleted(element))
                    {
                        // Element is waiting to be deleted so flush it (it has the FK)
                        StateManager elementSM = om.findStateManager(element);
                        elementSM.flush();
                    }
                    else
                    {
                        // Element not yet marked for deletion so go through the normal process
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

                    while (elementsIter.hasNext())
                    {
                        Object element = elementsIter.next();
                        if (!om.getApiAdapter().isDeleted(element))
                        {
                            StateManager elementSM = om.findStateManager(element);
                            if (elementSM != null)
                            {
                                // Null the owner of the element
                                if (JPOXLogger.PERSISTENCE.isDebugEnabled())
                                {
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

     * @return The state manager
     */
    protected StateManager getStateManagerForEmbeddedPCObject(StateManager sm, Object obj, JoinTable table)
    {
        ObjectManager om = sm.getObjectManager();
        StateManager objSM = om.findStateManager(obj);
        if (objSM == null)
        {
            objSM = StateManagerFactory.newStateManagerForEmbedded(om, obj, false);

            AbstractMemberMetaData ownerFmd = table.getOwnerFieldMetaData();
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

                    if (om != ObjectManagerHelper.getObjectManager(newValue))
                    {
                        throw new JPOXUserException(LOCALISER.msg("RDBMS.SCO.Map.WriteValudInvalidWithDifferentPM"), newValuePC.jdoGetObjectId());
                    }

                    StateManager vsm = om.findStateManager(newValue);
                   
                    // Ensure the current owner field is loaded, and replace with new value
                    if (ownerFieldNumber >= 0)
                    {
                        om.getApiAdapter().isLoaded(vsm, ownerFieldNumber);
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

                    {
                        throw new JPOXUserException(LOCALISER.msg("056060"),
                            om.getApiAdapter().getIdForObject(pcNewKey));
                    }

                    StateManager vsm = om.findStateManager(pcNewKey);

                    // Ensure the current owner field is loaded, and replace with new key
                    if (ownerFieldNumber >= 0)
                    {
                        om.getApiAdapter().isLoaded(vsm, ownerFieldNumber);
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

       
        // Null out the key and owner fields if they are nullable
        if (keyMapping.isNullable())
        {
            PersistenceCapable pcOldValue = (PersistenceCapable)oldValue;
            StateManager vsm = om.findStateManager(pcOldValue);
           
            // Null the key field
            vsm.setObjectField(pcOldValue, keyFieldNumber, key, null);
            vsm.replaceField(keyFieldNumber, null, true);
           
View Full Code Here

Examples of org.jpox.ObjectManager.findStateManager()

        ObjectManager om = sm.getObjectManager();

        // Null out the key and owner fields if they are nullable
        if (keyMapping.isNullable())
        {
            StateManager vsm = om.findStateManager(oldValue);

            // Check that the value hasn't already been deleted due to being removed from the map
            PersistenceCapable oldValuePC = (PersistenceCapable)oldValue;
            if (!om.getApiAdapter().isDeleted(oldValuePC))
            {
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.