Package org.datanucleus

Examples of org.datanucleus.ObjectManager.findObject()


        Object elementToRemove = element;
        ObjectManager om = sm.getObjectManager();
        if (om.getApiAdapter().isDetached(element))
        {
            // Element passed in is detached so find attached version (DON'T attach this object)
            elementToRemove = om.findObject(om.getApiAdapter().getIdForObject(element), true, false,
                element.getClass().getName());
        }

        boolean modified = internalRemove(sm, elementToRemove, size);
View Full Code Here


        Object elementToRemove = element;
        ObjectManager om = ownerSM.getObjectManager();
        if (om.getApiAdapter().isDetached(element)) // User passed in detached object to collection.remove()!
        {
            // Find an attached equivalent of this detached object (DON'T attach the object itself)
            elementToRemove = om.findObject(om.getApiAdapter().getIdForObject(element), true, false, element.getClass().getName());
        }
        StateManager elementSM = om.findStateManager(elementToRemove);

        Object oldOwner = null;
        if (ownerFieldNumber >= 0)
View Full Code Here

        Object elementToRemove = element;
        ObjectManager om = sm.getObjectManager();
        if (om.getApiAdapter().isDetached(element))
        {
            // Element passed in is detached so find attached version (DON'T attach this object)
            elementToRemove = om.findObject(om.getApiAdapter().getIdForObject(element), true, false,
                element.getClass().getName());
        }

        boolean modified = getSpecialization().remove(sm, elementToRemove, size, this);
        CollectionMetaData collmd = ownerMemberMetaData.getCollection();
View Full Code Here

    ObjectManager om = ownerSM.getObjectManager();
    StateManager elementSM = om.findStateManager(element);
    if (om.getApiAdapter().isDetached(element)) // User passed in detached object to collection.remove()!
    {
      // Find an attached equivalent of this detached object (DON'T attach the object itself)
      element = om.findObject(om.getApiAdapter().getIdForObject(element), true, false,
                        element.getClass().getName());
    }
    if (om.getApiAdapter().isPersistable(element) && om.getApiAdapter().isDeleted(element)) {
      // Element is waiting to be deleted so flush it (it has the FK)
      elementSM.flush();
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.