Package org.eclipse.persistence.oxm.mappings

Examples of org.eclipse.persistence.oxm.mappings.XMLCompositeCollectionMapping.useCollectionClass()


        xmlToJavaPairsMapping.setSetMethodName("setUserXMLTypesForDeploymentXML");
        descriptor.addMapping(xmlToJavaPairsMapping);

        XMLCompositeCollectionMapping javaToXMLPairsMapping = new XMLCompositeCollectionMapping();
        javaToXMLPairsMapping.setXPath(getPrimaryNamespaceXPath() + "java-to-xml-conversion-pair");
        javaToXMLPairsMapping.useCollectionClass(ArrayList.class);
        javaToXMLPairsMapping.setReferenceClass(XMLConversionPair.class);
        javaToXMLPairsMapping.setAttributeName("userJavaTypes");
        javaToXMLPairsMapping.setGetMethodName("getUserJavaTypesForDeploymentXML");
        javaToXMLPairsMapping.setSetMethodName("setUserJavaTypesForDeploymentXML");
        descriptor.addMapping(javaToXMLPairsMapping);
View Full Code Here


        }else{
            if(getXsdType()!= null){              
                ((XMLField)mapping.getField()).setLeafElementType(getXsdType());
            }
        }
        mapping.useCollectionClass(ListWrapper.class);
       
        // Set null policy on mapping for xsi:nil support:
        // - aNullPolicy.setNullRepresentedByEmptyNode(false);
        // - aNullPolicy.setNullRepresentedByXsiNil(true);
        setIsSetNillablePolicyOnMapping(mapping, propertyName);
View Full Code Here

                        if (queryOperation.isCollection()) {
                            XMLCompositeCollectionMapping mapping =
                                new XMLCompositeCollectionMapping();
                            mapping.setAttributeName("result");
                            mapping.setReferenceClass(typeDescriptor.getJavaClass());
                            mapping.useCollectionClass(ArrayList.class);
                            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + ":" + "result/" + localElement);
                            descriptor.getNamespaceResolver().setDefaultNamespaceURI(
                                typeDescriptor.getNamespaceResolver().getDefaultNamespaceURI());
                            descriptor.addMapping(mapping);
                            mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
View Full Code Here

        primaryKeyFieldNamesMapping.setAttributeName("primaryKeyFields");
        primaryKeyFieldNamesMapping.setReferenceClass(DatabaseField.class);
        primaryKeyFieldNamesMapping.setGetMethodName("getPrimaryKeyFields");
        primaryKeyFieldNamesMapping.setSetMethodName("setPrimaryKeyFields");
        primaryKeyFieldNamesMapping.setXPath(getSecondaryNamespaceXPath() + "primary-key/" + getSecondaryNamespaceXPath() + "field");
        primaryKeyFieldNamesMapping.useCollectionClass(ArrayList.class);
        descriptor.addMapping(primaryKeyFieldNamesMapping);

        XMLDirectMapping descriptorIsReadOnlyMapping = new XMLDirectMapping();
        descriptorIsReadOnlyMapping.setAttributeName("shouldBeReadOnly");
        descriptorIsReadOnlyMapping.setGetMethodName("shouldBeReadOnly");
View Full Code Here

        queryManagerMapping.setReferenceClass(DescriptorQueryManager.class);
        queryManagerMapping.setXPath(getSecondaryNamespaceXPath() + "querying");
        descriptor.addMapping(queryManagerMapping);

        XMLCompositeCollectionMapping aggregateCollectionMapping = new XMLCompositeCollectionMapping();
        aggregateCollectionMapping.useCollectionClass(NonSynchronizedVector.class);
        aggregateCollectionMapping.setAttributeName("mappings");
        aggregateCollectionMapping.setReferenceClass(DatabaseMapping.class);
        aggregateCollectionMapping.setXPath(getSecondaryNamespaceXPath() + "attribute-mappings/" + getSecondaryNamespaceXPath() + "attribute-mapping");
        aggregateCollectionMapping.setSetMethodName("setMappings");
        aggregateCollectionMapping.setGetMethodName("getMappings");
View Full Code Here

        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setJavaClass(RelationalDescriptor.class);
        descriptor.getInheritancePolicy().setParentClass(ClassDescriptor.class);

        XMLCompositeCollectionMapping tablesMapping = new XMLCompositeCollectionMapping();
        tablesMapping.useCollectionClass(NonSynchronizedVector.class);
        tablesMapping.setAttributeName("tables/table");
        tablesMapping.setGetMethodName("getTables");
        tablesMapping.setSetMethodName("setTables");
        tablesMapping.setXPath(getPrimaryNamespaceXPath() + "tables/" + getPrimaryNamespaceXPath() + "table");
        tablesMapping.setReferenceClass(DatabaseTable.class);
View Full Code Here

        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setJavaClass(HistoryPolicy.class);
        descriptor.setDefaultRootElement("history-policy");

        XMLCompositeCollectionMapping historyTablesMapping = new XMLCompositeCollectionMapping();
        historyTablesMapping.useCollectionClass(NonSynchronizedVector.class);
        historyTablesMapping.setAttributeName("historicalTables");
        historyTablesMapping.setReferenceClass(HistoricalDatabaseTable.class);
        historyTablesMapping.setGetMethodName("getHistoricalTables");
        historyTablesMapping.setSetMethodName("setHistoricalTables");
        historyTablesMapping.setXPath(getPrimaryNamespaceXPath() + "history-tables/" + getPrimaryNamespaceXPath() + "history-table");
View Full Code Here

        historyTablesMapping.setSetMethodName("setHistoricalTables");
        historyTablesMapping.setXPath(getPrimaryNamespaceXPath() + "history-tables/" + getPrimaryNamespaceXPath() + "history-table");
        descriptor.addMapping(historyTablesMapping);

        XMLCompositeCollectionMapping startFieldNamesMapping = new XMLCompositeCollectionMapping();
        startFieldNamesMapping.useCollectionClass(NonSynchronizedVector.class);
        startFieldNamesMapping.setAttributeName("startFields");
        startFieldNamesMapping.setReferenceClass(DatabaseField.class);
        startFieldNamesMapping.setGetMethodName("getStartFields");
        startFieldNamesMapping.setSetMethodName("setStartFields");
        startFieldNamesMapping.setXPath(getPrimaryNamespaceXPath() + "start-fields/" + getPrimaryNamespaceXPath() + "start-field");
View Full Code Here

        startFieldNamesMapping.setSetMethodName("setStartFields");
        startFieldNamesMapping.setXPath(getPrimaryNamespaceXPath() + "start-fields/" + getPrimaryNamespaceXPath() + "start-field");
        descriptor.addMapping(startFieldNamesMapping);

        XMLCompositeCollectionMapping endFieldNamesMapping = new XMLCompositeCollectionMapping();
        endFieldNamesMapping.useCollectionClass(NonSynchronizedVector.class);
        endFieldNamesMapping.setAttributeName("endFields");
        endFieldNamesMapping.setReferenceClass(DatabaseField.class);
        endFieldNamesMapping.setGetMethodName("getEndFields");
        endFieldNamesMapping.setSetMethodName("setEndFields");
        endFieldNamesMapping.setXPath(getPrimaryNamespaceXPath() + "end-fields/" + getPrimaryNamespaceXPath() + "end-field");
View Full Code Here

         XMLCompositeCollectionMapping fieldToClassNameMapping = new XMLCompositeCollectionMapping();
         fieldToClassNameMapping.setAttributeName("fieldToClassAssociations");
         fieldToClassNameMapping.setGetMethodName("getChoiceFieldToClassAssociations");
         fieldToClassNameMapping.setSetMethodName("setChoiceFieldToClassAssociations");
         fieldToClassNameMapping.setReferenceClass(XMLChoiceFieldToClassAssociation.class);
         fieldToClassNameMapping.useCollectionClass(ArrayList.class);
         fieldToClassNameMapping.setXPath(getPrimaryNamespaceXPath() + "field-to-class-association");
         descriptor.addMapping(fieldToClassNameMapping);
        
         return descriptor;
     }
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.