Package com.sun.jdo.spi.persistence.support.sqlstore.model

Examples of com.sun.jdo.spi.persistence.support.sqlstore.model.ForeignFieldDesc


        if (prefetchedCollectionFields != null) {
            StateManager sm = pc.jdoGetStateManager();
            Iterator prefetchedCollectionFieldsIter = prefetchedCollectionFields.keySet().iterator();

            while (prefetchedCollectionFieldsIter.hasNext()) {
                ForeignFieldDesc prefetchedCollectionField =
                        (ForeignFieldDesc) prefetchedCollectionFieldsIter.next();
                ResultDesc prefetchedResultDesc =
                        (ResultDesc) prefetchedCollectionFields.get(prefetchedCollectionField);

                // process deferred updates for prefetched collection relationships
                if (prefetchedCollectionField.cardinalityUPB > 1) {
                    Collection relationshipValue =
                            (Collection) prefetchedCollectionField.getValue(sm);

                    if (relationshipValue instanceof SCOCollection && ((SCOCollection) relationshipValue).isDeferred()){
                        ((SCOCollection) relationshipValue).applyDeferredUpdates(null);
                    }
View Full Code Here


                            // Set the field value and presence mask bit.
                            setFieldValue(sm, f, value);
                        }
                    } else {
                        ResultDesc frd = (ResultDesc) temp;
                        ForeignFieldDesc parentField = frd.parentField;

                        // Only try to fetch the field if it is not already present.
                        // If the field is already present, it should be in
                        // consistent state w.r.t. this transaction. Overwriting
                        // it with the value from database might corrupt consistency of data.
                        if (!sm.getPresenceMaskBit(parentField.absoluteID) || parentField.cardinalityUPB > 1) {
                            Object fobj = frd.setFields(pm, resultData);

                            if (parentField.cardinalityUPB > 1) { // parentField is a collection.
                                // Add the value and set the presence mask bit if necessary
                                addCollectionValue(sm, parentField, fobj);
                            } else { // parentField is an object.
                                // Set the field value and presence mask bit.
                                setFieldValue(sm, parentField, fobj);
                            }
                        }
                        if (debug) {
                            logger.finest("sqlstore.resultdesc.marking_foreign_field", // NOI18N
                                    parentField.getName());
                        }
                    }
                }

                sm.initialize(true);
View Full Code Here

        if (prefetchedCollectionFields != null) {
            StateManager sm = pc.jdoGetStateManager();
            Iterator prefetchedCollectionFieldsIter = prefetchedCollectionFields.keySet().iterator();

            while (prefetchedCollectionFieldsIter.hasNext()) {
                ForeignFieldDesc prefetchedCollectionField =
                        (ForeignFieldDesc) prefetchedCollectionFieldsIter.next();
                ResultDesc prefetchedResultDesc =
                        (ResultDesc) prefetchedCollectionFields.get(prefetchedCollectionField);

                // process deferred updates for prefetched collection relationships
                if (prefetchedCollectionField.cardinalityUPB > 1) {
                    Collection relationshipValue =
                            (Collection) prefetchedCollectionField.getValue(sm);

                    if (relationshipValue instanceof SCOCollection && ((SCOCollection) relationshipValue).isDeferred()){
                        ((SCOCollection) relationshipValue).applyDeferredUpdates(null);
                    }
View Full Code Here

                            // Set the field value and presence mask bit.
                            setFieldValue(sm, f, value);
                        }
                    } else {
                        ResultDesc frd = (ResultDesc) temp;
                        ForeignFieldDesc parentField = frd.parentField;

                        // Only try to fetch the field if it is not already present.
                        // If the field is already present, it should be in
                        // consistent state w.r.t. this transaction. Overwriting
                        // it with the value from database might corrupt consistency of data.
                        if (!sm.getPresenceMaskBit(parentField.absoluteID) || parentField.cardinalityUPB > 1) {
                            Object fobj = frd.setFields(pm, resultData);

                            if (parentField.cardinalityUPB > 1) { // parentField is a collection.
                                // Add the value and set the presence mask bit if necessary
                                addCollectionValue(sm, parentField, fobj);
                            } else { // parentField is an object.
                                // Set the field value and presence mask bit.
                                setFieldValue(sm, parentField, fobj);
                            }
                        }
                        if (debug) {
                            logger.finest("sqlstore.resultdesc.marking_foreign_field", // NOI18N
                                    parentField.getName());
                        }
                    }
                }

                sm.initialize(true);
View Full Code Here

TOP

Related Classes of com.sun.jdo.spi.persistence.support.sqlstore.model.ForeignFieldDesc

Copyright © 2018 www.massapicom. 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.