Examples of provideField()


Examples of org.datanucleus.store.ObjectProvider.provideField()

                {
                    // make sure the link to the owner is now set
                    AbstractMemberMetaData relatedMmd = mmd.getRelatedMemberMetaData(clr)[0];
                    if (sm.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()))
                    {
                        Object currentVal = sm.provideField(relatedMmd.getAbsoluteFieldNumber());
                        if (currentVal != ownerSM.getObject())
                        {
                            sm.replaceFieldValue(relatedMmd.getAbsoluteFieldNumber(), ownerSM.getObject());
                        }
                    }
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.provideField()

                {
                    // make sure the link back to the owner is not still set
                    AbstractMemberMetaData relatedMmd = mmd.getRelatedMemberMetaData(clr)[0];
                    if (sm.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()))
                    {
                        Object currentVal = sm.provideField(relatedMmd.getAbsoluteFieldNumber());
                        if (currentVal == ownerSM.getObject())
                        {
                            sm.replaceFieldValue(relatedMmd.getAbsoluteFieldNumber(), null);
                        }
                    }
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.provideField()

            if (oldSM != null && relatedMmd != null &&
                oldSM.getLoadedFields()[relatedMmd.getAbsoluteFieldNumber()])
            {
                if (oldSM.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()))
                {
                    Object oldContainerValue = oldSM.provideField(relatedMmd.getAbsoluteFieldNumber());
                    if (oldContainerValue instanceof Collection)
                    {
                        Collection oldColl = (Collection)oldContainerValue;
                        if (oldColl.contains(pc))
                        {
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.provideField()

            AbstractMemberMetaData relatedMmd = mmd.getRelatedMemberMetaDataForObject(clr, pc, newValue);
            ObjectProvider newSM = om.findObjectProvider(newValue);
            if (newSM != null && relatedMmd != null &&
                newSM.getLoadedFields()[relatedMmd.getAbsoluteFieldNumber()])
            {
                Object newContainerValue = newSM.provideField(relatedMmd.getAbsoluteFieldNumber());
                if (newContainerValue instanceof Collection)
                {
                    Collection newColl = (Collection)newContainerValue;
                    if (!newColl.contains(pc))
                    {
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.provideField()

                            currentVal.add(sm.getObject());
                        }
                    }
                    if (sm.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()))
                    {
                        Collection currentVal = (Collection)sm.provideField(relatedMmd.getAbsoluteFieldNumber());
                        if (currentVal != null && !currentVal.contains(ownerSM.getObject()))
                        {
                            currentVal.add(ownerSM.getObject());
                        }
                    }
View Full Code Here

Examples of org.datanucleus.store.ObjectProvider.provideField()

                            ownerSM.unloadField(mmd.getName());
                        }
                    }
                    if (sm.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()) && !sm.getLifecycleState().isDeleted)
                    {
                        Collection currentVal = (Collection)sm.provideField(relatedMmd.getAbsoluteFieldNumber());
                        if (currentVal != null && currentVal.contains(ownerSM.getObject()))
                        {
                            currentVal.remove(ownerSM.getObject());
                        }
                    }
View Full Code Here

Examples of org.jpox.StateManager.provideField()

                    posMapping[j] = param[n++];
                }

                // Retrieve value of field from Embedded StateManager
                int embAbsFieldNum = embCmd.getAbsolutePositionOfMember(mapping.getFieldMetaData().getName());
                Object fieldValue = embSM.provideField(embAbsFieldNum);

                if (mapping instanceof EmbeddedPCMapping)
                {
                    mapping.setObject(om, ps, posMapping, fieldValue, embSM, embAbsFieldNum);
                }
View Full Code Here

Examples of org.jpox.StateManager.provideField()

        {
            if (relationType == Relation.ONE_TO_ONE_BI)
            {
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                AbstractMemberMetaData relatedMmd = fmd.getRelatedMemberMetaDataForObject(clr, sm.getObject(), pc);
                Object relatedValue = otherSM.provideField(relatedMmd.getAbsoluteFieldNumber());
                if (relatedValue == null)
                {
                    // Managed Relations : Other side not set so update it in memory
                    if (JPOXLogger.PERSISTENCE.isDebugEnabled())
                    {
View Full Code Here

Examples of org.jpox.StateManager.provideField()

                // TODO Make sure we have this PC in the collection at the other side
                StateManager otherSM = sm.getObjectManager().findStateManager(pc);
                if (otherSM != null)
                {
                    // Managed Relations : add to the collection on the other side
                    Collection relatedColl = (Collection)otherSM.provideField(relatedMmds[0].getAbsoluteFieldNumber());
                    if (relatedColl != null && !(relatedColl instanceof SCOCollection))
                    {
                        // TODO Make sure the collection is a wrapper
                        boolean contained = relatedColl.contains(sm.getObject());
                        if (!contained)
View Full Code Here

Examples of org.jpox.StateManager.provideField()

                        else
                        {
                            // Managed Relations : remove element from collection/map
                            if (relatedMmds[0].hasCollection())
                            {
                                Collection otherColl = (Collection)otherSM.provideField(relatedMmds[0].getAbsoluteFieldNumber());
                                if (otherColl != null)
                                {
                                    // TODO Remove from any cached SCO collection
                                }
                            }
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.