Package org.eclipse.persistence.internal.queries

Examples of org.eclipse.persistence.internal.queries.DirectMapContainerPolicy


        }
        this.containerPolicy.setContainerClass(concreteMapClass);
    }

    public void writeSingleValue(Object attributeValue, Object parent, XMLRecord row, AbstractSession session) {
        DirectMapContainerPolicy cp = (DirectMapContainerPolicy) this.getContainerPolicy();
        if ((attributeValue == null) || (cp.sizeFor(attributeValue) == 0)) {
            return;
        }
        DOMRecord record = (DOMRecord) row;
        if (record.getDOM().getNodeType() != Node.ELEMENT_NODE) {
            return;
        }
        Element root = (Element) record.getDOM();

        if (field != null) {
            root = (Element) XPathEngine.getInstance().create((XMLField) getField(), root, session);
        }
        List extraNamespaces = new ArrayList();
        NamespaceResolver nr = row.getNamespaceResolver();
        for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) {
            Object key = cp.next(iter, session);
            if ((key != null) && key instanceof QName) {
                Object value = cp.valueFromKey(key, attributeValue);
                QName attributeName = (QName) key;
                String namespaceURI = attributeName.getNamespaceURI();
                String qualifiedName = attributeName.getLocalPart();

                if (nr != null) {
View Full Code Here


     * Indicates the name of the Map class to be used. 
     * 
     * @param concreteMapClassName
     */
    public void useMapClassName(String concreteMapClassName) {
        this.setContainerPolicy(new DirectMapContainerPolicy());
        this.getContainerPolicy().setContainerClassName(concreteMapClassName);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.queries.DirectMapContainerPolicy

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.