Package org.eclipse.persistence.internal.queries

Examples of org.eclipse.persistence.internal.queries.ContainerPolicy.addInto()


        for (Enumeration stream = nestedRows.elements(); stream.hasMoreElements();) {
            Object next = stream.nextElement();
            if (next instanceof Element) {               
                XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element)next);
            }
            cp.addInto(next, result, executionSession);
        }
        return result;
    }

    /**
 
View Full Code Here


                    if (next.getNodeValue().trim().length() > 0) {
                      objectValue = next.getNodeValue();
                        if(getConverter() != null) {
                          objectValue = getConverter().convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
                        }                     
                        cp.addInto(objectValue, container, session);
                    }
                } else if (next.getNodeType() == Node.ELEMENT_NODE) {
                    ClassDescriptor referenceDescriptor = null;

                    //In this case it must be an element so we need to dig up the descriptor
View Full Code Here

                            ObjectBuilder builder = referenceDescriptor.getObjectBuilder();
                            objectValue = builder.buildObject(query, nestedRecord, joinManager);
                            if(getConverter() != null) {
                              objectValue = getConverter().convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
                            }                     
                            cp.addInto(objectValue, container, session);
                        } else {
                            if ((keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) {
                                XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next);
                                objectValue = next;
                                if(getConverter() != null) {
View Full Code Here

                                XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next);
                                objectValue = next;
                                if(getConverter() != null) {
                                  objectValue = getConverter().convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
                                }                     
                                cp.addInto(objectValue, container, session);
                            }
                        }
                    } else {
                        String schemaType = ((Element) next).getAttributeNS(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE);
                        QName schemaTypeQName = null;
View Full Code Here

                            Object updated = ((XMLDescriptor) referenceDescriptor).wrapObjectInXMLRoot(objectValue, next.getNamespaceURI(), next.getLocalName(), next.getPrefix(), false);

                            if(getConverter() != null) {
                              updated = getConverter().convertDataValueToObjectValue(updated, session, record.getUnmarshaller());
                            }                     
                            cp.addInto(updated, container, session);
                        } else if ((referenceDescriptor == null) && (keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT)) {
                            XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next);
                            objectValue = next;
                            if(getConverter() != null) {
                              objectValue = getConverter().convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
View Full Code Here

                            XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element) next);
                            objectValue = next;
                            if(getConverter() != null) {
                              objectValue = getConverter().convertDataValueToObjectValue(objectValue, session, record.getUnmarshaller());
                            }                     
                            cp.addInto(objectValue, container, session);
                        } else {
                            Object value = null;
                            Node textchild = ((Element) next).getFirstChild();
                            if ((textchild != null) && (textchild.getNodeType() == Node.TEXT_NODE)) {
                                value = ((Text) textchild).getNodeValue();
View Full Code Here

                                XMLRoot rootValue = new XMLRoot();
                                rootValue.setLocalName(next.getLocalName());
                                rootValue.setSchemaType(schemaTypeQName);
                                rootValue.setNamespaceURI(next.getNamespaceURI());
                                rootValue.setObject(value);
                                cp.addInto(rootValue, container, session);
                            }
                        }
                    }
                }
            }
View Full Code Here

                descriptor.getObjectBuilder().buildAttributesIntoObject(arrayValue, nestedRow, query, null, false);
            } else if (isNestedStructure && (arrayValue instanceof Array)){
                arrayValue = buildContainerFromArray((Array)arrayValue, (ObjectRelationalDatabaseField)nestedType, session);
            }            
            
            cp.addInto(arrayValue, container, session);
        }
        return container;
     }

    /**
 
View Full Code Here

        for (int index = 0; index < size; index++) {
            AbstractRecord databaseRow = (AbstractRecord)databaseRows.get(index);
            // PERF: 1-m joining nulls out duplicate rows.
            if (databaseRow != null) {
                Object domainObject = buildObject(query, databaseRow, joinManager);
                policy.addInto(domainObject, domainObjects, session);
            }
        }
        return domainObjects;
    }
View Full Code Here

            }

            if (collectionContentType != null) {
                attributeValue = XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(attributeValue, collectionContentType, executionSession);
            }
            cp.addInto(attributeValue, result, query.getSession());
            //return attributeValue;
        }
        return result;
    }
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.