Examples of SDOProperty


Examples of org.eclipse.persistence.sdo.SDOProperty

    }

    //Since global properties aren't registered until the end of the define call we need to check XSDhelper
    //and the generatedProperties map to see if a type already exists
    private SDOProperty getExistingGlobalProperty(String uri, String localName, boolean isElement) {
        SDOProperty prop = (SDOProperty) aHelperContext.getXSDHelper().getGlobalProperty(uri, localName, isElement);
        if (prop == null) {
            QName qName = new QName(uri, localName);
            if (isElement) {
                prop = (SDOProperty) getGeneratedGlobalElements().get(qName);
            } else {
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

                    uri = getURIForPrefix(prefix);
                } else {
                    localName = substitutionGroup;
                    uri = defaultNamespace;
                }
                SDOProperty rootProp = getExistingGlobalProperty(uri, localName, true);
                SDOProperty thisProperty = getExistingGlobalProperty(targetNamespace, nextElement.getName(), true);

                if (rootProp != null && thisProperty != null) {
                    if (rootProp.getSubstitutableElements() == null) {
                        rootProp.setSubstitutableElements(new java.util.ArrayList<SDOProperty>());
                        rootProp.setSubstitutable(true);
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

                generatedTypes.remove(qName);
                generatedTypesByXsdQName.remove(qName);
                Iterator nonFinalizedProps = existingType.getNonFinalizedReferencingProps().iterator();
                Iterator nonFinalizedUris = existingType.getNonFinalizedMappingURIs().iterator();
                while(nonFinalizedProps.hasNext()) {
                    SDOProperty next = (SDOProperty)nonFinalizedProps.next();
                    next.setType(sdoDataType);
                    sdoDataType.getNonFinalizedReferencingProps().add(next);
                    sdoDataType.getNonFinalizedMappingURIs().add(nonFinalizedUris.next());
                }
                if(anonymousTypes.contains(existingType)) {
                  anonymousTypes.remove(existingType)
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

    private static final List EMPTY_LIST = new ArrayList(0);

    public SDOXMLHelperLoadOptionsType(SDOTypeHelper sdoTypeHelper, SDOType typeType) {
        super(SDOConstants.ORACLE_SDO_URL, SDOConstants.XMLHELPER_LOAD_OPTIONS, sdoTypeHelper);

        SDOProperty typeOptionProperty = new SDOProperty(aHelperContext);
        typeOptionProperty.setName(SDOConstants.TYPE_LOAD_OPTION);
        typeOptionProperty.setMany(false);
        typeOptionProperty.setType(typeType);
        addDeclaredProperty(typeOptionProperty);       
    }
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

    private boolean compare(DataObject dataObject1, DataObject dataObject2, boolean isDeep, List properties) {
        Iterator iterProperties = properties.iterator();

        while (iterProperties.hasNext()) {
            // !! assumption is two dataobjects share the same property    !!
            SDOProperty p = (SDOProperty)iterProperties.next();
            if (!compareProperty(dataObject1, dataObject2, isDeep, p)) {
                return false;
            }
        }
        return true;
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

    public SDOWrapperType(Type aPropertyType, String aTypeName, SDOTypeHelper aSDOTypeHelper, QName[] schemaTypes) {
        super(SDOConstants.ORACLE_SDO_URL, aTypeName, aSDOTypeHelper);
        typeName = aTypeName;

        SDOProperty valueProperty = new SDOProperty(aHelperContext);
        valueProperty.setName("value");
        valueProperty.setType(aPropertyType);
        valueProperty.setXsdType(schemaTypes[0]);
        addDeclaredProperty(valueProperty);

        // Remove any special characters from the type name to create the class name:
        String normalizedTypeName = SDOUtil.className(aTypeName, true, true, false);
        String instanceClassName = "org.eclipse.persistence.sdo." + normalizedTypeName + "Wrapper";
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

                return null;
            }
            if (convertToClass == ClassConstants.STRING) {
                return convertToStringValue(valueToConvert, prop.getType(), ((SDOProperty) prop).getXsdType());
            } else {
                SDOProperty sdoProp = (SDOProperty) prop;
                DatabaseMapping xmlMapping = sdoProp.getXmlMapping();
                if (xmlMapping != null && xmlMapping.isDirectToFieldMapping() && sdoProp.getXsdType() != null) {
                    return getXMLConversionManager().convertObject(valueToConvert, convertToClass, sdoProp.getXsdType());
                } else {
                    return getXMLConversionManager().convertObject(valueToConvert, convertToClass);
                }
            }
        } catch (ConversionException e) {
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

       
        XMLSchemaReference schemaReference = new XMLSchemaClassPathReference();
        schemaReference.setSchemaContext("/sdo:Property");
        xmlDescriptor.setSchemaReference(schemaReference);
        // these properties are ordered as listed page 74 sect. 8.3 of the spec in "SDO Model for Types and Properties"
        SDOProperty aliasNameProperty = new SDOProperty(aHelperContext);
        aliasNameProperty.setName("aliasName");
        aliasNameProperty.setMany(true);
        aliasNameProperty.setType(SDOConstants.SDO_STRING);
        addDeclaredProperty(aliasNameProperty);

        SDOProperty propNameProperty = new SDOProperty(aHelperContext);
        propNameProperty.setName("name");
        propNameProperty.setType(SDOConstants.SDO_STRING);
        addDeclaredProperty(propNameProperty);

        SDOProperty manyProperty = new SDOProperty(aHelperContext);
        manyProperty.setName("many");
        manyProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(manyProperty);

        SDOProperty containmentProperty = new SDOProperty(aHelperContext);
        containmentProperty.setName("containment");
        containmentProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(containmentProperty);

        SDOProperty defaultProperty = new SDOProperty(aHelperContext);
        defaultProperty.setName("default");
        defaultProperty.setType(SDOConstants.SDO_OBJECT);
        addDeclaredProperty(defaultProperty);

        SDOProperty readOnlyProperty = new SDOProperty(aHelperContext);
        readOnlyProperty.setName("readOnly");
        readOnlyProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(readOnlyProperty);

        SDOProperty typeProperty = new SDOProperty(aHelperContext);
        typeProperty.setName("type");
        typeProperty.setType(typeType);
        typeProperty.setContainment(false);
        addDeclaredProperty(typeProperty);

        SDOProperty oppositeProperty = new SDOProperty(aHelperContext);
        oppositeProperty.setName("opposite");
        oppositeProperty.setType(this);
        addDeclaredProperty(oppositeProperty);

        SDOProperty nullableProperty = new SDOProperty(aHelperContext);
        nullableProperty.setName("nullable");
        nullableProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(nullableProperty);

        setOpen(true);       
        setFinalized(true);
    }
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

    }
   
    public void initializeMappings() {
        Iterator propIterator = this.getDeclaredProperties().iterator();
        while(propIterator.hasNext()) {
            SDOProperty nextProp = (SDOProperty)propIterator.next();
            if(nextProp.getName().equals("type")) {
                XMLDirectMapping mapping = new XMLDirectMapping();
                mapping.setAttributeName(nextProp.getName());
                String xpath = nextProp.getQualifiedXPath(SDOConstants.SDO_URL, true);
                mapping.setXPath(xpath);
                mapping.setConverter(new TypeStringConverter(this.typeHelper));
                if (getXsdType() != null) {
                    ((XMLField)mapping.getField()).setSchemaType(getXsdType());
                }
                nextProp.setXmlMapping(mapping);
                nextProp.addMappingToOwner(true, -1);
               
            } else if(nextProp.getName().equals("opposite")) {
            } else {
                nextProp.buildMapping(SDOConstants.SDO_URL);
            }
        }
        initialized = true;
    }
View Full Code Here

Examples of org.eclipse.persistence.sdo.SDOProperty

        SDOType propertyType = new SDOPropertyType(sdoTypeHelper, this);
        sdoTypeHelper.addType(propertyType);
       
        // these properties are ordered as listed page 74 sect. 8.3 of the spec in "SDO Model for Types and Properties"
       
        SDOProperty baseTypeProperty = new SDOProperty(aHelperContext);
        baseTypeProperty.setName("baseType");
        baseTypeProperty.setMany(true);
        baseTypeProperty.setType(this);
        baseTypeProperty.setContainment(true);
        addDeclaredProperty(baseTypeProperty);

        SDOProperty propertiesProperty = new SDOProperty(aHelperContext);
        propertiesProperty.setName("property");
        propertiesProperty.setMany(true);
        propertiesProperty.setContainment(true);
        propertiesProperty.setType(propertyType);
        addDeclaredProperty(propertiesProperty);

        SDOProperty typeAliasNameProperty = new SDOProperty(aHelperContext);
        typeAliasNameProperty.setName("aliasName");
        typeAliasNameProperty.setMany(true);
        typeAliasNameProperty.setType(SDOConstants.SDO_STRING);
        addDeclaredProperty(typeAliasNameProperty);

        SDOProperty nameProperty = new SDOProperty(aHelperContext);
        nameProperty.setName("name");
        nameProperty.setType(SDOConstants.SDO_STRING);
        addDeclaredProperty(nameProperty);

        SDOProperty uriProperty = new SDOProperty(aHelperContext);
        uriProperty.setName("uri");
        uriProperty.setType(SDOConstants.SDO_STRING);
        addDeclaredProperty(uriProperty);

        SDOProperty dataTypeProperty = new SDOProperty(aHelperContext);
        dataTypeProperty.setName("dataType");
        dataTypeProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(dataTypeProperty);

        SDOProperty openProperty = new SDOProperty(aHelperContext);
        openProperty.setName("open");
        openProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(openProperty);

        SDOProperty sequencedProperty = new SDOProperty(aHelperContext);
        sequencedProperty.setName("sequenced");
        sequencedProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(sequencedProperty);

        SDOProperty abstractProperty = new SDOProperty(aHelperContext);
        abstractProperty.setName("abstract");
        abstractProperty.setType(SDOConstants.SDO_BOOLEAN);
        addDeclaredProperty(abstractProperty);
       
        // set the XMLAnyCollectionMapping on the descriptor on SDO_TYPE
        setOpen(true);       
        setFinalized(true);
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.