Package org.eclipse.persistence.internal.oxm

Examples of org.eclipse.persistence.internal.oxm.ContainerValue


            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    Object containerInstance = null;
                    if(containerValue.getReuseContainer()) {
                        containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
                    }
                    if(null == containerInstance) {
                        containerInstance = containerValue.getContainerInstance();
                    }
                    containersMap.put(containerValue, containerInstance);
                    if(containerValue.getMapping() instanceof XMLChoiceCollectionMapping) {
                        XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue = (XMLChoiceCollectionMappingUnmarshalNodeValue)containerValue;
                        for(NodeValue next:nodeValue.getAllNodeValues()) {
                            NodeValue nestedNodeValue = ((XMLChoiceCollectionMappingUnmarshalNodeValue)next).getChoiceElementNodeValue();
                            containersMap.put((ContainerValue)nestedNodeValue, containerInstance);
                        }
View Full Code Here


            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    Object containerInstance = null;
                    if(containerValue.getReuseContainer()) {
                        containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
                    }
                    if(null == containerInstance) {
                        containerInstance = containerValue.getContainerInstance();
                    }
                    containersMap.put(containerValue, containerInstance);
                    if(containerValue.getMapping() instanceof XMLChoiceCollectionMapping) {
                        XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue = (XMLChoiceCollectionMappingUnmarshalNodeValue)containerValue;
                        for(NodeValue next:nodeValue.getAllNodeValues()) {
                            NodeValue nestedNodeValue = ((XMLChoiceCollectionMappingUnmarshalNodeValue)next).getChoiceElementNodeValue();
                            containersMap.put((ContainerValue)nestedNodeValue, containerInstance);
                        }
View Full Code Here

        try {
            // PROCESS COLLECTION MAPPINGS
          //All populated containerValues need to be set on the object
          if(null != populatedContainerValues){
                for (int populatedCVSize=populatedContainerValues.size(), i = populatedCVSize-1; i>=0; i--) {            
              ContainerValue cv = ((ContainerValue) populatedContainerValues.get(i));
              cv.setContainerInstance(currentObject, getContainerInstance(cv, cv.isDefaultEmptyContainer()));
            }
          }

          //Additionally if any containerValues are defaultEmptyContainerValues they need to be set to a new empty container
          if(null != defaultEmptyContainerValues){
                 for (int defaultEmptyCVSize=defaultEmptyContainerValues.size(),i = defaultEmptyCVSize-1; i>=0; i--) {            
                     ContainerValue cv = ((ContainerValue) defaultEmptyContainerValues.get(i));
                     cv.setContainerInstance(currentObject, getContainerInstance(cv, cv.isDefaultEmptyContainer()));
                 }
           
          }
            // PROCESS NULL CAPABLE VALUES
            // This must be done because the node may not have existed to
View Full Code Here

                this.xmlReader.newObjectEvent(object, null, selfRecordMapping);
            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                ContainerValue containerValue;
                Object containerInstance;
                int containerValuesSize = containerValues.size();
                for (int x = 0; x < containerValuesSize; x++) {
                    containerValue = (ContainerValue)containerValues.get(x);
                    containerInstance = containerValue.getContainerInstance();
                    containersMap.put(containerValue, containerInstance);
                }
            }

            if (null != xPathNode.getSelfChildren()) {
View Full Code Here

        }
        try {
            // PROCESS COLLECTION MAPPINGS
            if (null != containersMap) {
                Iterator containersMapKeys = containersMap.keySet().iterator();
                ContainerValue containerValue;
                Object containerInstance;
                while (containersMapKeys.hasNext()) {
                    containerValue = (ContainerValue)containersMapKeys.next();
                    containerInstance = containersMap.get(containerValue);
                    containerValue.setContainerInstance(object, containerInstance);
                }
            }

            // PROCESS NULL CAPABLE VALUES
            // This must be done because the node may not have existed to
View Full Code Here

            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    Object containerInstance = null;
                    if(containerValue.getReuseContainer()) {
                        containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
                    }
                    if(null == containerInstance) {
                        containerInstance = containerValue.getContainerInstance();
                    }
                    containersMap.put(containerValue, containerInstance);   
                }
            }
View Full Code Here

            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
              containerInstances = new Object[containerValues.size()];
             
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    if(containerValue.getReuseContainer() && !(containerValue.getMapping().getAttributeAccessor().isReadOnly())) {
                        getContainerInstance(containerValue, false);
                    }
                    if(containerValue.isDefaultEmptyContainer()) {
                        getContainerInstance(containerValue, true);
                    }
                }
            }
View Full Code Here

        try {
            // PROCESS COLLECTION MAPPINGS
            if(null != treeObjectBuilder.getContainerValues()){
                for(int i=0; i<treeObjectBuilder.getContainerValues().size(); i++){
                  ContainerValue cv =((ContainerValue)treeObjectBuilder.getContainerValues().get(i));
                     cv.setContainerInstance(currentObject, containerInstances[cv.getIndex()]);
                }
            }

            // PROCESS NULL CAPABLE VALUES
            // This must be done because the node may not have existed to
View Full Code Here

            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    Object containerInstance = null;
                    if(containerValue.getReuseContainer()) {
                        containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
                    }
                    if(null == containerInstance) {
                        containerInstance = containerValue.getContainerInstance();
                    }
                    containersMap.put(containerValue, containerInstance);   
                }
            }
View Full Code Here

            }
            List containerValues = treeObjectBuilder.getContainerValues();
            if (null != containerValues) {
                containersMap = new HashMap(containerValues.size());
                for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {
                    ContainerValue containerValue = (ContainerValue)containerValues.get(x);
                    Object containerInstance = null;
                    if(containerValue.getReuseContainer()) {
                        containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);
                    }
                    if(null == containerInstance) {
                        containerInstance = containerValue.getContainerInstance();
                    }
                    containersMap.put(containerValue, containerInstance);   
                }
            }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.oxm.ContainerValue

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.