Examples of MappedKeyMapAccessor


Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

            addPotentialEmbeddableAccessor(accessor.getReferenceClass(), accessor.getClassAccessor());
           
            // Tell an embeddable accessor that is a map key to a collection
            // to pre-process itself.
            if (accessor.isMappedKeyMapAccessor()) {
                MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
               
                // If the map key class is not specified, we need to look it
                // up from the accessor type.
                if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
                    // Try to extract the map key class from a generic
                    // specification. This will throw an exception if it can't.
                    mapKeyClass = accessor.getMapKeyReferenceClass();
                   
                    // Set the map key class.   
                    mapAccessor.setMapKeyClass(mapKeyClass);
                }
               
                // Add the embeddable accessor to the project. In the case of
                // pre-processing, if we are an embeddable accessor the nested
                // embeddable will be pre-processed now.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

        for (MappingAccessor accessor : m_mappingAccessors.values()) {
            if (! accessor.isProcessed()) {
                // If we a mapped key map accessor with an embeddable as the
                // key, process that embeddable accessor now.
                if (accessor.isMappedKeyMapAccessor()) {
                    MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                    EmbeddableAccessor mapKeyEmbeddableAccessor = getProject().getEmbeddableAccessor(mapAccessor.getMapKeyClass());
                   
                    if (mapKeyEmbeddableAccessor != null && ! mapKeyEmbeddableAccessor.isProcessed()) {
                        mapKeyEmbeddableAccessor.process();
                    }
                }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

        for (MappingAccessor accessor : m_mappingAccessors.values()) {
            if (! accessor.isProcessed()) {
                // If we a mapped key map accessor with an embeddable as the
                // key, process that embeddable accessor now.
                if (accessor.isMappedKeyMapAccessor()) {
                    MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                    EmbeddableAccessor mapKeyEmbeddableAccessor = getProject().getEmbeddableAccessor(mapAccessor.getMapKeyClass());
                   
                    if (mapKeyEmbeddableAccessor != null && ! mapKeyEmbeddableAccessor.isProcessed()) {
                        mapKeyEmbeddableAccessor.process();
                    }
                }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

            addPotentialEmbeddableAccessor(accessor.getReferenceClass());
           
            // Tell an embeddable accessor that is a map key to a collection
            // to pre-process itself.
            if (accessor.isMappedKeyMapAccessor()) {
                MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
               
                // If the map key class is not specified, we need to look it
                // up from the accessor type.
                if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
                    mapKeyClass = accessor.getAccessibleObject().getMapKeyClass(getDescriptor());
                   
                    if (mapKeyClass == null && mapAccessor.getMapKey() == null) {
                        // We don't have a map key class or map key, throw an exception.
                        throw ValidationException.unableToDetermineMapKeyClass(accessor.getAttributeName(), accessor.getJavaClass());
                    } else {
                        // Set the map key class (note, may still be null)
                        mapAccessor.setMapKeyClass(mapKeyClass);
                    }
                }
               
                // Add the embeddable accessor to the project. In the case of
                // pre-processing, if we are an embeddable accessor the nested
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

        for (MappingAccessor accessor : m_mappingAccessors.values()) {
            if (! accessor.isProcessed()) {
                // If we a mapped key map accessor with an embeddable as the
                // key, process that embeddable accessor now.
                if (accessor.isMappedKeyMapAccessor()) {
                    MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                    EmbeddableAccessor mapKeyEmbeddableAccessor = getProject().getEmbeddableAccessor(mapAccessor.getMapKeyClass());
                   
                    if (mapKeyEmbeddableAccessor != null && ! mapKeyEmbeddableAccessor.isProcessed()) {
                        mapKeyEmbeddableAccessor.process();
                    }
                }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

        for (MappingAccessor accessor : m_accessors.values()) {
            if (! accessor.isProcessed()) {
                // If we a mapped key map accessor with an embeddable as the
                // key, process that embeddable accessor now.
                if (accessor.isMappedKeyMapAccessor()) {
                    MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                    EmbeddableAccessor mapKeyEmbeddableAccessor = getProject().getEmbeddableAccessor(mapAccessor.getMapKeyClass());
                   
                    if (mapKeyEmbeddableAccessor != null && ! mapKeyEmbeddableAccessor.isProcessed()) {
                        mapKeyEmbeddableAccessor.process();
                    }
                }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

            addPotentialEmbeddableAccessor(accessor.getReferenceClass(), accessor.getClassAccessor());
           
            // Tell an embeddable accessor that is a map key to a collection
            // to pre-process itself.
            if (accessor.isMappedKeyMapAccessor()) {
                MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
               
                // If the map key class is not specified, we need to look it
                // up from the accessor type.
                if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
                    // Try to extract the map key class from a generic
                    // specification. This will throw an exception if it can't.
                    mapKeyClass = accessor.getMapKeyReferenceClass();
                   
                    // Set the map key class.   
                    mapAccessor.setMapKeyClass(mapKeyClass);
                }
               
                // Add the embeddable accessor to the project. In the case of
                // pre-processing, if we are an embeddable accessor the nested
                // embeddable will be pre-processed now.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

            addPotentialEmbeddableAccessor(accessor.getReferenceClass(), accessor.getClassAccessor());
           
            // Tell an embeddable accessor that is a map key to a collection
            // to pre-process itself.
            if (accessor.isMappedKeyMapAccessor()) {
                MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
               
                // If the map key class is not specified, we need to look it
                // up from the accessor type.
                if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
                  // Try to extract the map key class from a generic
                  // specification. This will throw an exception if it can't.
                    mapKeyClass = accessor.getMapKeyReferenceClass();
                   
                  // Set the map key class.   
                    mapAccessor.setMapKeyClass(mapKeyClass);
                }
               
                // Add the embeddable accessor to the project. In the case of
                // pre-processing, if we are an embeddable accessor the nested
                // embeddable will be pre-processed now.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

        for (MappingAccessor accessor : m_accessors.values()) {
            if (! accessor.isProcessed()) {
                // If we a mapped key map accessor with an embeddable as the
                // key, process that embeddable accessor now.
                if (accessor.isMappedKeyMapAccessor()) {
                    MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                    EmbeddableAccessor mapKeyEmbeddableAccessor = getProject().getEmbeddableAccessor(mapAccessor.getMapKeyClass());
                   
                    if (mapKeyEmbeddableAccessor != null && ! mapKeyEmbeddableAccessor.isProcessed()) {
                        mapKeyEmbeddableAccessor.process();
                    }
                }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.MappedKeyMapAccessor

            addPotentialEmbeddableAccessor(accessor.getReferenceClass(), accessor.getClassAccessor());
           
            // Tell an embeddable accessor that is a map key to a collection
            // to pre-process itself.
            if (accessor.isMappedKeyMapAccessor()) {
                MappedKeyMapAccessor mapAccessor = (MappedKeyMapAccessor) accessor;
                MetadataClass mapKeyClass = mapAccessor.getMapKeyClass();
               
                // If the map key class is not specified, we need to look it
                // up from the accessor type.
                if (mapKeyClass == null || mapKeyClass.equals(void.class)) {
                    mapKeyClass = accessor.getAccessibleObject().getMapKeyClass(getDescriptor());
                   
                    if (mapKeyClass == null) {
                        // The map key class has not been specified through
                        // either the map key class metadata or generics. Throw
                        // an exception.
                        throw ValidationException.unableToDetermineMapKeyClass(accessor.getAttributeName(), accessor.getJavaClass());
                    } else {
                        // Set the map key class (note, may still be null)
                        mapAccessor.setMapKeyClass(mapKeyClass);
                    }
                }
               
                // Add the embeddable accessor to the project. In the case of
                // pre-processing, if we are an embeddable accessor the nested
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.