Examples of IsSetNullPolicy


Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

                            attributeClassification = org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(attributeTypeName, getClass().getClassLoader());
                        }
                        mapping.setAttributeClassification(attributeClassification);
                    }

                    IsSetNullPolicy nullPolicy = new IsSetNullPolicy("isSetValue", false, true, XMLNullRepresentationType.ABSENT_NODE);
                    //nullPolicy.setNullRepresentedByEmptyNode(true);
                    mapping.setNullPolicy(nullPolicy);

                    if(type != null && type.isEnumerationType()){
                        mapping.setConverter(buildJAXBEnumTypeConverter(mapping, (EnumTypeInfo)type));
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

            NullPolicy nullPolicy = new NullPolicy();
            nullPolicy.setSetPerformedForAbsentNode(xmlNullPolicy.isIsSetPerformedForAbsentNode());
            absNullPolicy = nullPolicy;
        } else {
            XmlIsSetNullPolicy xmlIsSetNullPolicy = (XmlIsSetNullPolicy) xmlAbsNullPolicy;
            IsSetNullPolicy isSetNullPolicy = new IsSetNullPolicy();
            isSetNullPolicy.setIsSetMethodName(xmlIsSetNullPolicy.getIsSetMethodName());
            // handle isSetParams
            ArrayList<Object> parameters = new ArrayList<Object>();
            ArrayList<Class> parameterTypes = new ArrayList<Class>();
            List<XmlIsSetNullPolicy.IsSetParameter> params = xmlIsSetNullPolicy.getIsSetParameter();
            for (XmlIsSetNullPolicy.IsSetParameter param : params) {
                String valueStr = param.getValue();
                String typeStr = param.getType();
                // create a conversion manager instance with the helper's loader
                XMLConversionManager mgr = new XMLConversionManager();
                mgr.setLoader(helper.getClassLoader());
                // handle parameter type
                Class typeClass = mgr.convertClassNameToClass(typeStr);
                // handle parameter value
                Object parameterValue = mgr.convertObject(valueStr, typeClass);
                parameters.add(parameterValue);
                parameterTypes.add(typeClass);
            }
            isSetNullPolicy.setIsSetParameters(parameters.toArray());
            isSetNullPolicy.setIsSetParameterTypes(parameterTypes.toArray(new Class[parameterTypes.size()]));
            absNullPolicy = isSetNullPolicy;
        }
        // handle commmon settings
        absNullPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.valueOf(xmlAbsNullPolicy.getNullRepresentationForXml().name()));
        absNullPolicy.setNullRepresentedByEmptyNode(xmlAbsNullPolicy.isEmptyNodeRepresentsNull());
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping returnUpdateMapping = new XMLDirectMapping();
        returnUpdateMapping.setAttributeName("m_returnUpdate");
        returnUpdateMapping.setGetMethodName("getReturnUpdate");
        returnUpdateMapping.setSetMethodName("setReturnUpdate");
        returnUpdateMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy returnUpdatePolicy = new IsSetNullPolicy("isReturnUpdate");
        returnUpdatePolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        returnUpdateMapping.setNullPolicy(returnUpdatePolicy);
        returnUpdateMapping.setXPath("orm:return-update");
        descriptor.addMapping(returnUpdateMapping);
       
        // Attribute mappings.
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping cascadeAllMapping = new XMLDirectMapping();
        cascadeAllMapping.setAttributeName("m_cascadeAll");
        cascadeAllMapping.setGetMethodName("getCascadeAll");
        cascadeAllMapping.setSetMethodName("setCascadeAll");
        cascadeAllMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadeAllPolicy = new IsSetNullPolicy("isCascadeAll");
        cascadeAllPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadeAllMapping.setNullPolicy(cascadeAllPolicy);
        cascadeAllMapping.setXPath("orm:cascade-all");
        descriptor.addMapping(cascadeAllMapping);
       
        descriptor.addMapping(getCascadePersistMapping());
       
        XMLDirectMapping cascadeMergeMapping = new XMLDirectMapping();
        cascadeMergeMapping.setAttributeName("m_cascadeMerge");
        cascadeMergeMapping.setGetMethodName("getCascadeMerge");
        cascadeMergeMapping.setSetMethodName("setCascadeMerge");
        cascadeMergeMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadeMergePolicy = new IsSetNullPolicy("isCascadeMerge");
        cascadeMergePolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadeMergeMapping.setNullPolicy(cascadeMergePolicy);
        cascadeMergeMapping.setXPath("orm:cascade-merge");
        descriptor.addMapping(cascadeMergeMapping);
       
        XMLDirectMapping cascadeRemoveMapping = new XMLDirectMapping();
        cascadeRemoveMapping.setAttributeName("m_cascadeRemove");
        cascadeRemoveMapping.setGetMethodName("getCascadeRemove");
        cascadeRemoveMapping.setSetMethodName("setCascadeRemove");
        cascadeRemoveMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadeRemovePolicy = new IsSetNullPolicy("isCascadeRemove");
        cascadeRemovePolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadeRemoveMapping.setNullPolicy(cascadeRemovePolicy);
        cascadeRemoveMapping.setXPath("orm:cascade-remove");
        descriptor.addMapping(cascadeRemoveMapping);
       
        XMLDirectMapping cascadeRefreshMapping = new XMLDirectMapping();
        cascadeRefreshMapping.setAttributeName("m_cascadeRefresh");
        cascadeRefreshMapping.setGetMethodName("getCascadeRefresh");
        cascadeRefreshMapping.setSetMethodName("setCascadeRefresh");
        cascadeRefreshMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadeRefreshPolicy = new IsSetNullPolicy("isCascadeRefresh");
        cascadeRefreshPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadeRefreshMapping.setNullPolicy(cascadeRefreshPolicy);
        cascadeRefreshMapping.setXPath("orm:cascade-refresh");
        descriptor.addMapping(cascadeRefreshMapping);
       
        XMLDirectMapping cascadeDetachMapping = new XMLDirectMapping();
        cascadeDetachMapping.setAttributeName("m_cascadeDetach");
        cascadeDetachMapping.setGetMethodName("getCascadeDetach");
        cascadeDetachMapping.setSetMethodName("setCascadeDetach");
        cascadeDetachMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadeDetachPolicy = new IsSetNullPolicy("isCascadeDetach");
        cascadeDetachPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadeDetachMapping.setNullPolicy(cascadeDetachPolicy);
        cascadeDetachMapping.setXPath("orm:cascade-detach");
        descriptor.addMapping(cascadeDetachMapping);
       
        return descriptor;
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping delimitedIdentifiersMapping = new XMLDirectMapping();
        delimitedIdentifiersMapping.setAttributeName("m_delimitedIdentifiers");
        delimitedIdentifiersMapping.setGetMethodName("getDelimitedIdentifiers");
        delimitedIdentifiersMapping.setSetMethodName("setDelimitedIdentifiers");
        delimitedIdentifiersMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy delimitedIdentifiersPolicy = new IsSetNullPolicy("isDelimitedIdentifiers");
        delimitedIdentifiersPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        delimitedIdentifiersMapping.setNullPolicy(delimitedIdentifiersPolicy);
        delimitedIdentifiersMapping.setXPath("orm:delimited-identifiers");
        descriptor.addMapping(delimitedIdentifiersMapping);
       
        descriptor.addMapping(getAccessMapping());
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping xmlMappingMetadataCompleteMapping = new XMLDirectMapping();
        xmlMappingMetadataCompleteMapping.setAttributeName("m_xmlMappingMetadataComplete");
        xmlMappingMetadataCompleteMapping.setGetMethodName("getXMLMappingMetadataComplete");
        xmlMappingMetadataCompleteMapping.setSetMethodName("setXMLMappingMetadataComplete");
        xmlMappingMetadataCompleteMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy xmlMappingMetadataCompletePolicy = new IsSetNullPolicy("isXMLMappingMetadataComplete");
        xmlMappingMetadataCompletePolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        xmlMappingMetadataCompleteMapping.setNullPolicy(xmlMappingMetadataCompletePolicy);
        xmlMappingMetadataCompleteMapping.setXPath("orm:xml-mapping-metadata-complete");
        descriptor.addMapping(xmlMappingMetadataCompleteMapping);
       
        XMLDirectMapping excludeDefaultMappingsMapping = new XMLDirectMapping();
        excludeDefaultMappingsMapping.setAttributeName("m_excludeDefaultMappings");
        excludeDefaultMappingsMapping.setGetMethodName("getExcludeDefaultMappings");
        excludeDefaultMappingsMapping.setSetMethodName("setExcludeDefaultMappings");
        excludeDefaultMappingsMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy excludeDefaultMappingsPolicy = new IsSetNullPolicy("excludeDefaultMappings");
        excludeDefaultMappingsPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        excludeDefaultMappingsMapping.setNullPolicy(excludeDefaultMappingsPolicy);
        excludeDefaultMappingsMapping.setXPath("orm:exclude-default-mappings");
        descriptor.addMapping(excludeDefaultMappingsMapping);
       
        XMLCompositeObjectMapping persistenceUnitDefaultsMapping = new XMLCompositeObjectMapping();
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        cascadePersistMapping.setAttributeName("m_cascadePersist");
        cascadePersistMapping.setGetMethodName("getCascadePersist");
        cascadePersistMapping.setSetMethodName("setCascadePersist");
        //cascadePersistMapping.setAttributeClassification(String.class);
        cascadePersistMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy cascadePersistPolicy = new IsSetNullPolicy("isCascadePersist");
        cascadePersistPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        cascadePersistMapping.setNullPolicy(cascadePersistPolicy);
        cascadePersistMapping.setXPath("orm:cascade-persist");
        return cascadePersistMapping;
    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        deleteAllMapping.setAttributeName("m_deleteAll");
        deleteAllMapping.setGetMethodName("getDeleteAll");
        deleteAllMapping.setSetMethodName("setDeleteAll");
        deleteAllMapping.setXPath("orm:delete-all");
        deleteAllMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy deleteAllPolicy = new IsSetNullPolicy("isDeleteAll");
        deleteAllPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        deleteAllMapping.setNullPolicy(deleteAllPolicy);
        return deleteAllMapping;
    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping excludeDefaultListenersMapping = new XMLDirectMapping();
        excludeDefaultListenersMapping.setAttributeName("m_excludeDefaultListeners");
        excludeDefaultListenersMapping.setGetMethodName("getExcludeDefaultListeners");
        excludeDefaultListenersMapping.setSetMethodName("setExcludeDefaultListeners");
        excludeDefaultListenersMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy excludeDefaultListenersPolicy = new IsSetNullPolicy("excludeDefaultListeners");
        excludeDefaultListenersPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        excludeDefaultListenersMapping.setNullPolicy(excludeDefaultListenersPolicy);
        excludeDefaultListenersMapping.setXPath("orm:exclude-default-listeners");
        return excludeDefaultListenersMapping;
    }
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.nullpolicy.IsSetNullPolicy

        XMLDirectMapping excludeSuperclassListenersMapping = new XMLDirectMapping();
        excludeSuperclassListenersMapping.setAttributeName("m_excludeSuperclassListeners");
        excludeSuperclassListenersMapping.setGetMethodName("getExcludeSuperclassListeners");
        excludeSuperclassListenersMapping.setSetMethodName("setExcludeSuperclassListeners");
        excludeSuperclassListenersMapping.setConverter(new EmptyElementConverter());
        IsSetNullPolicy excludeSuperclassListenersPolicy = new IsSetNullPolicy("excludeSuperclassListeners");
        excludeSuperclassListenersPolicy.setMarshalNullRepresentation(XMLNullRepresentationType.EMPTY_NODE);
        excludeSuperclassListenersMapping.setNullPolicy(excludeSuperclassListenersPolicy);
        excludeSuperclassListenersMapping.setXPath("orm:exclude-superclass-listeners");
        return excludeSuperclassListenersMapping;
    }
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.