Package org.eclipse.persistence.oxm.mappings

Examples of org.eclipse.persistence.oxm.mappings.XMLDirectMapping


   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getAllocationSizeAttributeMapping() {
        XMLDirectMapping allocationSizeMapping = new XMLDirectMapping();
        allocationSizeMapping.setAttributeName("m_allocationSize");
        allocationSizeMapping.setGetMethodName("getAllocationSize");
        allocationSizeMapping.setSetMethodName("setAllocationSize");
        allocationSizeMapping.setXPath("@allocation-size");
        return allocationSizeMapping;
    }
View Full Code Here


   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getCatalogAttributeMapping() {
        XMLDirectMapping catalogMapping = new XMLDirectMapping();
        catalogMapping.setAttributeName("m_catalog");
        catalogMapping.setGetMethodName("getCatalog");
        catalogMapping.setSetMethodName("setCatalog");
        catalogMapping.setXPath("@catalog");
        return catalogMapping;
    }
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getCatalogMapping() {
        XMLDirectMapping catalogMapping = new XMLDirectMapping();
        catalogMapping.setAttributeName("m_catalog");
        catalogMapping.setGetMethodName("getCatalog");
        catalogMapping.setSetMethodName("setCatalog");
        catalogMapping.setXPath("orm:catalog/text()");
        return catalogMapping;
    }
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getClassAttributeMapping() {
        XMLDirectMapping classMapping = new XMLDirectMapping();
        classMapping.setAttributeName("m_className");
        classMapping.setGetMethodName("getClassName");
        classMapping.setSetMethodName("setClassName");
        classMapping.setXPath("@class");
        return classMapping;
    }
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getColumnAttributeMapping() {
        XMLDirectMapping columnMapping = new XMLDirectMapping();
        columnMapping.setAttributeName("m_column");
        columnMapping.setGetMethodName("getColumn");
        columnMapping.setSetMethodName("setColumn");
        columnMapping.setXPath("@column");
        return columnMapping;
    }
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getColumnDefinitionAttributeMapping() {
        XMLDirectMapping columnDefinitionMapping = new XMLDirectMapping();
        columnDefinitionMapping.setAttributeName("m_columnDefinition");
        columnDefinitionMapping.setGetMethodName("getColumnDefinition");
        columnDefinitionMapping.setSetMethodName("setColumnDefinition");
        columnDefinitionMapping.setXPath("@column-definition");
        return columnDefinitionMapping;
    }
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected XMLDirectMapping getConvertMapping() {
        XMLDirectMapping convertMapping = new XMLDirectMapping();
        convertMapping.setAttributeName("m_convert");
        convertMapping.setGetMethodName("getConvert");
        convertMapping.setSetMethodName("setConvert");
        convertMapping.setXPath("orm:convert/text()");
        return convertMapping;
    }
View Full Code Here

        XMLDescriptor descriptor = new XMLDescriptor();
        descriptor.setJavaClass(DiscriminatorColumnMetadata.class);
   
        descriptor.addMapping(getNameAttributeMapping());
       
        XMLDirectMapping discriminatorTypeMapping = new XMLDirectMapping();
        discriminatorTypeMapping.setAttributeName("m_discriminatorType");
        discriminatorTypeMapping.setGetMethodName("getDiscriminatorType");
        discriminatorTypeMapping.setSetMethodName("setDiscriminatorType");
        discriminatorTypeMapping.setConverter(new EnumTypeConverter(discriminatorTypeMapping, DiscriminatorType.class, false));
        discriminatorTypeMapping.setXPath("@discriminator-type");
        descriptor.addMapping(discriminatorTypeMapping);
       
        descriptor.addMapping(getColumnDefinitionAttributeMapping());
        descriptor.addMapping(getLengthAttributeMapping());
       
View Full Code Here

        inheritanceMapping.setSetMethodName("setInheritance");
        inheritanceMapping.setReferenceClass(InheritanceMetadata.class);
        inheritanceMapping.setXPath("orm:inheritance");
        descriptor.addMapping(inheritanceMapping);
       
        XMLDirectMapping discriminatorValueMapping = new XMLDirectMapping();
        discriminatorValueMapping.setAttributeName("m_discriminatorValue");
        discriminatorValueMapping.setGetMethodName("getDiscriminatorValue");
        discriminatorValueMapping.setSetMethodName("setDiscriminatorValue");
        discriminatorValueMapping.setXPath("orm:discriminator-value/text()");
        descriptor.addMapping(discriminatorValueMapping);
       
        descriptor.addMapping(getDiscriminatorColumnMapping());
        descriptor.addMapping(getOptimisticLockingMapping());
        descriptor.addMapping(getCacheMapping());
        descriptor.addMapping(getConverterMapping());
        descriptor.addMapping(getTypeConverterMapping());
        descriptor.addMapping(getObjectTypeConverterMapping());
        descriptor.addMapping(getStructConverterMapping());
        descriptor.addMapping(getCustomCopyPolicyMapping());
        descriptor.addMapping(getInstantiationCopyPolicyMapping());
        descriptor.addMapping(getCloneCopyPolicyMapping());
        descriptor.addMapping(getSequenceGeneratorMapping());
        descriptor.addMapping(getTableGeneratorMapping());
        descriptor.addMapping(getNamedQueryMapping());
        descriptor.addMapping(getNamedNativeQueryMapping());
        descriptor.addMapping(getNamedStoredProcedureQueryMapping());
        descriptor.addMapping(getResultSetMappingMapping());
        descriptor.addMapping(getExcludeDefaultListenersMapping());
        descriptor.addMapping(getExcludeSuperclassListenersMapping());
        descriptor.addMapping(getEntityListenersMapping());
        descriptor.addMapping(getPrePeristMapping());
        descriptor.addMapping(getPostPeristMapping());
        descriptor.addMapping(getPreRemoveMapping());
        descriptor.addMapping(getPostRemoveMapping());
        descriptor.addMapping(getPreUpdateMapping());
        descriptor.addMapping(getPostUpdateMapping());
        descriptor.addMapping(getPostLoadMapping());
        descriptor.addMapping(getPropertiesMapping());
        descriptor.addMapping(getAttributeOverrideMapping());
       
        XMLCompositeCollectionMapping associationOverridesMapping = new XMLCompositeCollectionMapping();
        associationOverridesMapping.setAttributeName("m_associationOverrides");
        associationOverridesMapping.setGetMethodName("getAssociationOverrides");
        associationOverridesMapping.setSetMethodName("setAssociationOverrides");
        associationOverridesMapping.setReferenceClass(AssociationOverrideMetadata.class);
        associationOverridesMapping.setXPath("orm:association-override");
        descriptor.addMapping(associationOverridesMapping);
       
        descriptor.addMapping(getAttributesMapping());
       
        XMLDirectMapping nameMapping = new XMLDirectMapping();
        nameMapping.setAttributeName("m_entityName");
        nameMapping.setGetMethodName("getEntityName");
        nameMapping.setSetMethodName("setEntityName");
        nameMapping.setXPath("@name");
        descriptor.addMapping(nameMapping);

        descriptor.addMapping(getClassAttributeMapping());
        descriptor.addMapping(getAccessAttributeMapping());
        descriptor.addMapping(getMetadataCompleteAttributeMapping());
View Full Code Here

        persistenceUnitMetadataMapping.setSetMethodName("setPersistenceUnitMetadata");
        persistenceUnitMetadataMapping.setReferenceClass(XMLPersistenceUnitMetadata.class);
        persistenceUnitMetadataMapping.setXPath("orm:persistence-unit-metadata");
        descriptor.addMapping(persistenceUnitMetadataMapping);
       
        XMLDirectMapping packageMapping = new XMLDirectMapping();
        packageMapping.setAttributeName("m_package");
        packageMapping.setGetMethodName("getPackage");
        packageMapping.setSetMethodName("setPackage");
        packageMapping.setXPath("orm:package/text()");
        descriptor.addMapping(packageMapping);
       
        descriptor.addMapping(getSchemaMapping());
        descriptor.addMapping(getCatalogMapping());
        descriptor.addMapping(getAccessMapping());
        descriptor.addMapping(getConverterMapping());
        descriptor.addMapping(getTypeConverterMapping());
        descriptor.addMapping(getObjectTypeConverterMapping());
        descriptor.addMapping(getStructConverterMapping());

        XMLCompositeCollectionMapping sequenceGeneratorsMapping = new XMLCompositeCollectionMapping();
        sequenceGeneratorsMapping.setAttributeName("m_sequenceGenerators");
        sequenceGeneratorsMapping.setGetMethodName("getSequenceGenerators");
        sequenceGeneratorsMapping.setSetMethodName("setSequenceGenerators");
        sequenceGeneratorsMapping.setReferenceClass(SequenceGeneratorMetadata.class);
        sequenceGeneratorsMapping.setXPath("orm:sequence-generator");
        descriptor.addMapping(sequenceGeneratorsMapping);
       
        XMLCompositeCollectionMapping tableGeneratorsMapping = new XMLCompositeCollectionMapping();
        tableGeneratorsMapping.setAttributeName("m_tableGenerators");
        tableGeneratorsMapping.setGetMethodName("getTableGenerators");
        tableGeneratorsMapping.setSetMethodName("setTableGenerators");
        tableGeneratorsMapping.setReferenceClass(TableGeneratorMetadata.class);
        tableGeneratorsMapping.setXPath("orm:table-generator");
        descriptor.addMapping(tableGeneratorsMapping);
       
        descriptor.addMapping(getNamedQueryMapping());       
        descriptor.addMapping(getNamedNativeQueryMapping());
        descriptor.addMapping(getNamedStoredProcedureQueryMapping());
        descriptor.addMapping(getResultSetMappingMapping());
       
        XMLCompositeCollectionMapping mappedSuperclassMapping = new XMLCompositeCollectionMapping();
        mappedSuperclassMapping.setAttributeName("m_mappedSuperclasses");
        mappedSuperclassMapping.setGetMethodName("getMappedSuperclasses");
        mappedSuperclassMapping.setSetMethodName("setMappedSuperclasses");
        mappedSuperclassMapping.setReferenceClass(MappedSuperclassAccessor.class);
        mappedSuperclassMapping.setXPath("orm:mapped-superclass");
        descriptor.addMapping(mappedSuperclassMapping);
       
        XMLCompositeCollectionMapping entityMapping = new XMLCompositeCollectionMapping();
        entityMapping.setAttributeName("m_entities");
        entityMapping.setGetMethodName("getEntities");
        entityMapping.setSetMethodName("setEntities");
        entityMapping.setReferenceClass(EntityAccessor.class);
        entityMapping.setXPath("orm:entity");
        descriptor.addMapping(entityMapping);
       
        XMLCompositeCollectionMapping embeddableMapping = new XMLCompositeCollectionMapping();
        embeddableMapping.setAttributeName("m_embeddables");
        embeddableMapping.setGetMethodName("getEmbeddables");
        embeddableMapping.setSetMethodName("setEmbeddables");
        embeddableMapping.setReferenceClass(EmbeddableAccessor.class);
        embeddableMapping.setXPath("orm:embeddable");
        descriptor.addMapping(embeddableMapping);
       
        // What about the version attribute???
        XMLDirectMapping versionMapping = new XMLDirectMapping();
        versionMapping.setAttributeName("m_version");
        versionMapping.setGetMethodName("getVersion");
        versionMapping.setSetMethodName("setVersion");
        versionMapping.setXPath("@version");
        descriptor.addMapping(versionMapping);
       
        return descriptor;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.oxm.mappings.XMLDirectMapping

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.