Search in sources :

Example 1 with ManagedType

use of jakarta.persistence.metamodel.ManagedType in project eclipselink by eclipse-ee4j.

the class EntityManagerSetupImpl method preInitializeCanonicalMetamodel.

/**
 * INTERNAL:
 * First phase of canonical metamodel initialization.  For each class the metamodel is aware of, check
 * for a canonical metamodel class and initialize each attribute in it with a proxy that can cause the
 * rest of the metamodel population.  Attributes are found reflectively rather than through the metamodel
 * to avoid having to further initialize the metamodel.
 */
public void preInitializeCanonicalMetamodel(EntityManagerFactoryImpl factory) {
    // 338837: verify that the collection is not empty - this would mean entities did not make it into the search path
    if (null == metaModel.getManagedTypes() || metaModel.getManagedTypes().isEmpty()) {
        getSession().log(SessionLog.FINER, SessionLog.METAMODEL, "metamodel_type_collection_empty");
    }
    for (ManagedType manType : metaModel.getManagedTypes()) {
        boolean classInitialized = false;
        String className = MetadataHelper.getQualifiedCanonicalName(((ManagedTypeImpl) manType).getJavaTypeName(), getSession());
        try {
            Class<?> clazz = this.getSession().getDatasourcePlatform().convertObject(className, ClassConstants.CLASS);
            classInitialized = true;
            this.getSession().log(SessionLog.FINER, SessionLog.METAMODEL, "metamodel_canonical_model_class_found", className);
            Field[] fields = null;
            if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
                fields = AccessController.doPrivileged(new PrivilegedGetDeclaredFields(clazz));
            } else {
                fields = PrivilegedAccessHelper.getDeclaredFields(clazz);
            }
            for (Field attribute : fields) {
                if (Attribute.class.isAssignableFrom(attribute.getType())) {
                    Object assignedAttribute = null;
                    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
                        assignedAttribute = AccessController.doPrivileged(new PrivilegedGetValueFromField(attribute, null));
                    } else {
                        assignedAttribute = PrivilegedAccessHelper.getValueFromField(attribute, null);
                    }
                    AttributeProxyImpl proxy = null;
                    if (assignedAttribute == null) {
                        if (SingularAttribute.class.isAssignableFrom(attribute.getType())) {
                            proxy = new SingularAttributeProxyImpl();
                        } else if (MapAttribute.class.isAssignableFrom(attribute.getType())) {
                            proxy = new MapAttributeProxyImpl();
                        } else if (SetAttribute.class.isAssignableFrom(attribute.getType())) {
                            proxy = new SetAttributeProxyImpl();
                        } else if (ListAttribute.class.isAssignableFrom(attribute.getType())) {
                            proxy = new ListAttributeProxyImpl();
                        } else if (CollectionAttribute.class.isAssignableFrom(attribute.getType())) {
                            proxy = new CollectionAttributeProxyImpl();
                        }
                        if (proxy != null) {
                            attribute.setAccessible(true);
                            attribute.set(null, proxy);
                        }
                    } else if (assignedAttribute instanceof AttributeProxyImpl) {
                        proxy = (AttributeProxyImpl) assignedAttribute;
                    }
                    if (proxy != null) {
                        proxy.addFactory(factory);
                    }
                }
            }
        } catch (PrivilegedActionException pae) {
            getSession().logThrowable(SessionLog.FINEST, SessionLog.METAMODEL, pae);
        } catch (IllegalAccessException iae) {
            getSession().logThrowable(SessionLog.FINEST, SessionLog.METAMODEL, iae);
        } catch (ConversionException ce) {
        }
        if (!classInitialized) {
            getSession().log(SessionLog.FINER, SessionLog.METAMODEL, "metamodel_canonical_model_class_not_found", className);
        }
    }
}
Also used : ConversionException(org.eclipse.persistence.exceptions.ConversionException) ManagedType(jakarta.persistence.metamodel.ManagedType) PrivilegedActionException(java.security.PrivilegedActionException) MapAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.MapAttributeProxyImpl) CollectionAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.CollectionAttributeProxyImpl) EntityManagerFactoryProvider.getConfigPropertyAsString(org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.getConfigPropertyAsString) SingularAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.SingularAttributeProxyImpl) Field(java.lang.reflect.Field) PrivilegedGetDeclaredField(org.eclipse.persistence.internal.security.PrivilegedGetDeclaredField) PrivilegedGetValueFromField(org.eclipse.persistence.internal.security.PrivilegedGetValueFromField) MapAttribute(jakarta.persistence.metamodel.MapAttribute) ListAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.ListAttributeProxyImpl) PrivilegedGetValueFromField(org.eclipse.persistence.internal.security.PrivilegedGetValueFromField) SingularAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.SingularAttributeProxyImpl) CollectionAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.CollectionAttributeProxyImpl) AttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.AttributeProxyImpl) MapAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.MapAttributeProxyImpl) ListAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.ListAttributeProxyImpl) SetAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.SetAttributeProxyImpl) PrivilegedGetDeclaredFields(org.eclipse.persistence.internal.security.PrivilegedGetDeclaredFields) SetAttributeProxyImpl(org.eclipse.persistence.internal.jpa.metamodel.proxy.SetAttributeProxyImpl) ListAttribute(jakarta.persistence.metamodel.ListAttribute)

Example 2 with ManagedType

use of jakarta.persistence.metamodel.ManagedType in project eclipselink by eclipse-ee4j.

the class MetamodelMetamodelTest method testManagedType_getDeclaredMap_Type_param_Method.

public void testManagedType_getDeclaredMap_Type_param_Method() {
    EntityManager em = null;
    boolean expectedIAExceptionThrown = false;
    try {
        em = privateTestSetup();
        assertNotNull(em);
        Metamodel metamodel = em.getMetamodel();
        assertNotNull("The metamodel should never be null after an em.getMetamodel() call here.", metamodel);
        EntityTypeImpl<Manufacturer> entityManufacturer_ = (EntityTypeImpl) metamodel.entity(Manufacturer.class);
        assertNotNull(entityManufacturer_);
        MappedSuperclassTypeImpl<Person> msPerson_ = (MappedSuperclassTypeImpl) metamodel.managedType(Person.class);
        assertNotNull(msPerson_);
        MappedSuperclassTypeImpl<Corporation> msCorporation_ = (MappedSuperclassTypeImpl) metamodel.managedType(Corporation.class);
        assertNotNull(msCorporation_);
        EntityTypeImpl<GalacticPosition> entityLocation_ = (EntityTypeImpl) metamodel.entity(GalacticPosition.class);
        assertNotNull(entityLocation_);
        EntityTypeImpl<Computer> entityComputer_ = (EntityTypeImpl) metamodel.entity(Computer.class);
        assertNotNull(entityComputer_);
        EntityTypeImpl<HardwareDesigner> entityHardwareDesigner_ = (EntityTypeImpl) metamodel.entity(HardwareDesigner.class);
        assertNotNull(entityHardwareDesigner_);
        /**
         *  Return the Map-valued attribute declared by the managed
         *  type that corresponds to the specified name and Java key
         *  and value types.
         *  @param name  the name of the represented attribute
         *  @param keyType  the key type of the represented attribute
         *  @param valueType  the value type of the represented attribute
         *  @return declared MapAttribute of the given name and key
         *          and value types
         *  @throws IllegalArgumentException if attribute of the given
         *          name and type is not declared in the managed type
         */
        // <K, V> MapAttribute<X, K, V> getDeclaredMap(String name, Class<K> keyType, Class<V> valueType);
        expectedIAExceptionThrown = false;
        MapAttribute<? super Manufacturer, ?, ?> anAttribute = entityManufacturer_.getDeclaredMap("hardwareDesignersMap", Integer.class, HardwareDesigner.class);
        // verify the default key type is the not the Map key - rather that is is the managedType PK
        Class<?> keyJavaType = anAttribute.getKeyJavaType();
        // @OneToMany(cascade=ALL, mappedBy="mappedEmployer")
        // private Map<String, HardwareDesigner> hardwareDesignersMap;// = new HashMap<String, HardwareDesigner>();
        // http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_63:_20090824:_Add_Map_support_for_.40MapKey_to_MapAttribute
        // Key is the primary key (PK) of the target entity - in this case HardwareDesigner which inherits its @Id from the Person @MappedSuperclass as '''Integer'''.
        Type keyType = anAttribute.getKeyType();
        // When @MapKey(name="name") is present - or generics are set
        assertEquals(String.class, keyJavaType);
        // assertEquals(Integer.class, keyJavaType); // When @MapKey or generics are not present - we default to the PK
        assertNotNull(keyType);
        assertTrue(keyType instanceof Type);
        assertEquals(Type.PersistenceType.BASIC, keyType.getPersistenceType());
    } catch (IllegalArgumentException iae) {
        iae.printStackTrace();
        expectedIAExceptionThrown = true;
    } finally {
        cleanup(em);
        assertFalse("An IAE exception should not occur here.", expectedIAExceptionThrown);
    }
}
Also used : GalacticPosition(org.eclipse.persistence.testing.models.jpa.metamodel.GalacticPosition) Corporation(org.eclipse.persistence.testing.models.jpa.metamodel.Corporation) EntityManager(jakarta.persistence.EntityManager) EntityType(jakarta.persistence.metamodel.EntityType) IdentifiableType(jakarta.persistence.metamodel.IdentifiableType) PersistentAttributeType(jakarta.persistence.metamodel.Attribute.PersistentAttributeType) MappedSuperclassType(jakarta.persistence.metamodel.MappedSuperclassType) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) PersistenceType(jakarta.persistence.metamodel.Type.PersistenceType) CollectionType(jakarta.persistence.metamodel.PluralAttribute.CollectionType) Type(jakarta.persistence.metamodel.Type) ManagedType(jakarta.persistence.metamodel.ManagedType) HardwareDesigner(org.eclipse.persistence.testing.models.jpa.metamodel.HardwareDesigner) Manufacturer(org.eclipse.persistence.testing.models.jpa.metamodel.Manufacturer) EntityTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl) MappedSuperclassTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.MappedSuperclassTypeImpl) Computer(org.eclipse.persistence.testing.models.jpa.metamodel.Computer) Metamodel(jakarta.persistence.metamodel.Metamodel) Person(org.eclipse.persistence.testing.models.jpa.metamodel.Person)

Example 3 with ManagedType

use of jakarta.persistence.metamodel.ManagedType in project eclipselink by eclipse-ee4j.

the class MetamodelMetamodelTest method testOutOfSpecificationInternalAPI.

public void testOutOfSpecificationInternalAPI() {
    EntityManager em = null;
    boolean exceptionThrown = false;
    try {
        em = privateTestSetup();
        assertNotNull(em);
        Metamodel metamodel = em.getMetamodel();
        assertNotNull(metamodel);
        // Actual Test Case
        EntityTypeImpl<ArrayProcessor> entityArrayProcessor_ = (EntityTypeImpl) metamodel.entity(ArrayProcessor.class);
        assertNotNull(entityArrayProcessor_);
        EntityTypeImpl<Processor> entityProcessor_ = (EntityTypeImpl) metamodel.entity(Processor.class);
        assertNotNull(entityProcessor_);
        // verify all Types have their javaClass set
        Collection<TypeImpl<?>> types = ((MetamodelImpl) metamodel).getTypes().values();
        assertNotNull(types);
        for (TypeImpl type : types) {
            assertNotNull(type);
            assertNotNull(type.getJavaType());
        }
        // verify all embeddables are only embeddables
        Set<EmbeddableType<?>> embeddables = metamodel.getEmbeddables();
        assertNotNull(embeddables);
        for (EmbeddableType embeddable : embeddables) {
            // This method works only on EntityType
            assertNotNull(embeddable);
            assertTrue(embeddable instanceof EmbeddableTypeImpl);
        }
        // verify all entities are only entities
        Set<EntityType<?>> entities = metamodel.getEntities();
        assertNotNull(entities);
        for (EntityType entity : entities) {
            // This method works only on EntityType
            assertNotNull(entity.getName());
            assertTrue(entity instanceof EntityTypeImpl);
        }
        // Verify all Attributes and their element and declaring/managed types
        List<Attribute> allAttributes = ((MetamodelImpl) metamodel).getAllManagedTypeAttributes();
        assertNotNull(allAttributes);
        assertEquals(METAMODEL_ALL_ATTRIBUTES_SIZE, allAttributes.size());
        // Why do we have this function? So we can verify attribute integrity
        for (Attribute anAttribute : allAttributes) {
            ManagedType declaringType = anAttribute.getDeclaringType();
            assertNotNull(declaringType);
            Type elementType = null;
            if (((AttributeImpl) anAttribute).isPlural()) {
                elementType = ((PluralAttributeImpl) anAttribute).getElementType();
            } else {
                elementType = ((SingularAttributeImpl) anAttribute).getType();
            }
            assertNotNull("elementType should not be null", elementType);
            // Since the javaType may be computed off the elementType - it must not be null or we will get a NPE below
            Class<?> javaType = anAttribute.getJavaType();
        }
        boolean expectedIAExceptionThrown = false;
        // Check entity-->entity hierarchy
        // Processor:entity (Board boards)
        // +--VectorProcessor
        Set<Attribute<ArrayProcessor, ?>> entityArrayProcessorDeclaredAttributes = entityArrayProcessor_.getDeclaredAttributes();
        assertEquals(1, entityArrayProcessorDeclaredAttributes.size());
        // verify getting the attribute directly
        Attribute<ArrayProcessor, ?> entityArrayProcessorDeclaredAttribute = entityArrayProcessor_.getDeclaredAttribute("speed");
        // verify we do get an IAE on declared type above
        try {
            Attribute<ArrayProcessor, ?> entityArrayProcessorDeclaredAttributeThatIsNonExistent = entityArrayProcessor_.getDeclaredAttribute("non-existent");
        } catch (IllegalArgumentException iae) {
            // expecting no exception
            expectedIAExceptionThrown = true;
        }
        assertTrue("Expected thrown IllegalArgumentException", expectedIAExceptionThrown);
        // Verify we get an IAE on a type declared above
        try {
            Attribute<ArrayProcessor, ?> entityArrayProcessorDeclaredAttributeThatIsDeclaredAbove = entityArrayProcessor_.getDeclaredAttribute("id");
        } catch (IllegalArgumentException iae) {
            // expecting no exception
            expectedIAExceptionThrown = true;
        }
        assertTrue("Expected thrown IllegalArgumentException", expectedIAExceptionThrown);
        Set<Attribute<Processor, ?>> entityProcessorDeclaredAttributes = entityProcessor_.getDeclaredAttributes();
        assertEquals(3, entityProcessorDeclaredAttributes.size());
    } catch (IllegalArgumentException iae) {
        iae.printStackTrace();
        exceptionThrown = true;
    } finally {
        cleanup(em);
        assertFalse("An IAE exception should not occur here.", exceptionThrown);
    }
}
Also used : Processor(org.eclipse.persistence.testing.models.jpa.metamodel.Processor) ArrayProcessor(org.eclipse.persistence.testing.models.jpa.metamodel.ArrayProcessor) VectorProcessor(org.eclipse.persistence.testing.models.jpa.metamodel.VectorProcessor) EmbeddableTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EmbeddableTypeImpl) PluralAttribute(jakarta.persistence.metamodel.PluralAttribute) Attribute(jakarta.persistence.metamodel.Attribute) MapAttribute(jakarta.persistence.metamodel.MapAttribute) SingularAttribute(jakarta.persistence.metamodel.SingularAttribute) SetAttribute(jakarta.persistence.metamodel.SetAttribute) ListAttribute(jakarta.persistence.metamodel.ListAttribute) CollectionAttribute(jakarta.persistence.metamodel.CollectionAttribute) MapAttributeImpl(org.eclipse.persistence.internal.jpa.metamodel.MapAttributeImpl) AttributeImpl(org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl) PluralAttributeImpl(org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl) SingularAttributeImpl(org.eclipse.persistence.internal.jpa.metamodel.SingularAttributeImpl) ArrayProcessor(org.eclipse.persistence.testing.models.jpa.metamodel.ArrayProcessor) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) EntityTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl) Metamodel(jakarta.persistence.metamodel.Metamodel) MappedSuperclassTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.MappedSuperclassTypeImpl) TypeImpl(org.eclipse.persistence.internal.jpa.metamodel.TypeImpl) EmbeddableTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EmbeddableTypeImpl) BasicTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.BasicTypeImpl) EntityTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl) ManagedTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.ManagedTypeImpl) ManagedType(jakarta.persistence.metamodel.ManagedType) EntityType(jakarta.persistence.metamodel.EntityType) EntityManager(jakarta.persistence.EntityManager) EntityType(jakarta.persistence.metamodel.EntityType) IdentifiableType(jakarta.persistence.metamodel.IdentifiableType) PersistentAttributeType(jakarta.persistence.metamodel.Attribute.PersistentAttributeType) MappedSuperclassType(jakarta.persistence.metamodel.MappedSuperclassType) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) PersistenceType(jakarta.persistence.metamodel.Type.PersistenceType) CollectionType(jakarta.persistence.metamodel.PluralAttribute.CollectionType) Type(jakarta.persistence.metamodel.Type) ManagedType(jakarta.persistence.metamodel.ManagedType) MetamodelImpl(org.eclipse.persistence.internal.jpa.metamodel.MetamodelImpl)

Example 4 with ManagedType

use of jakarta.persistence.metamodel.ManagedType in project eclipselink by eclipse-ee4j.

the class MetamodelMetamodelTest method testMapAttribute_getKeyType_294811_UC12_DI86_Embedded_keyType_Method.

// This test verifies the workaround for 294811
public void testMapAttribute_getKeyType_294811_UC12_DI86_Embedded_keyType_Method() {
    EntityManager em = null;
    boolean exceptionThrown = false;
    try {
        em = privateTestSetup();
        assertNotNull(em);
        Metamodel metamodel = em.getMetamodel();
        assertNotNull("The metamodel should never be null after an em.getMetamodel() call here.", metamodel);
        EntityTypeImpl<Computer> entityComputer_ = (EntityTypeImpl) metamodel.entity(Computer.class);
        assertNotNull(entityComputer_);
        // Actual Test Case
        /**
         * Return the type representing the key type of the map.
         * @return type representing key type
         */
        // Type<K> getKeyType();
        MapAttribute<? super Computer, ?, ?> anAttribute = entityComputer_.getMap("positionUC12");
        // verify the key type is the Map key - not the managedType PK
        Class<?> keyJavaType = anAttribute.getKeyJavaType();
        // UC12:  mapKey defined via generics and is an Embeddable (EmbeddedId) java class defined as an IdClass on the element(value) class
        // @OneToMany(mappedBy="computerUC12", cascade=ALL, fetch=EAGER)
        // @MapKey // key defaults to an instance of the composite pk class
        // private Map<EmbeddedPK, GalacticPosition> positionUC12;
        Type keyType = anAttribute.getKeyType();
        // When @MapKey(name="name") is present or we use generics
        assertEquals(EmbeddedPK.class, keyJavaType);
        assertNotNull(keyType);
    } catch (IllegalArgumentException iae) {
        iae.printStackTrace();
        exceptionThrown = true;
    } finally {
        cleanup(em);
        assertFalse("An IAE exception should not occur here.", exceptionThrown);
    }
}
Also used : EntityManager(jakarta.persistence.EntityManager) EntityType(jakarta.persistence.metamodel.EntityType) IdentifiableType(jakarta.persistence.metamodel.IdentifiableType) PersistentAttributeType(jakarta.persistence.metamodel.Attribute.PersistentAttributeType) MappedSuperclassType(jakarta.persistence.metamodel.MappedSuperclassType) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) PersistenceType(jakarta.persistence.metamodel.Type.PersistenceType) CollectionType(jakarta.persistence.metamodel.PluralAttribute.CollectionType) Type(jakarta.persistence.metamodel.Type) ManagedType(jakarta.persistence.metamodel.ManagedType) Computer(org.eclipse.persistence.testing.models.jpa.metamodel.Computer) EntityTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl) Metamodel(jakarta.persistence.metamodel.Metamodel)

Example 5 with ManagedType

use of jakarta.persistence.metamodel.ManagedType in project eclipselink by eclipse-ee4j.

the class MetamodelMetamodelTest method testMapAttribute_getKeyJavaType_UC9_DI86_Embeddable_IdClass_keyType_Method.

// See
// http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/metamodel_api#DI_86:_20090921:_Handle_Embeddable_Type_keyType_in_MapAttributeImpl_constructor
public void testMapAttribute_getKeyJavaType_UC9_DI86_Embeddable_IdClass_keyType_Method() {
    EntityManager em = null;
    boolean exceptionThrown = false;
    try {
        em = privateTestSetup();
        assertNotNull(em);
        Metamodel metamodel = em.getMetamodel();
        assertNotNull("The metamodel should never be null after an em.getMetamodel() call here.", metamodel);
        EntityTypeImpl<Manufacturer> entityManufacturer_ = (EntityTypeImpl) metamodel.entity(Manufacturer.class);
        assertNotNull(entityManufacturer_);
        // Actual Test Case
        /**
         * Return the Java type of the map key.
         * @return Java key type
         */
        // Class<K> getKeyJavaType();
        MapAttribute<? super Manufacturer, ?, ?> anAttribute = entityManufacturer_.getMap("enclosureByBoardMapUC9");
        // verify the key type is the Map key - not the managedType PK
        Class<?> keyJavaType = anAttribute.getKeyJavaType();
        // UC9: no targetEntity, no MapKey, but generics are set (MapKey has an IdClass with an Embeddable)
        // @OneToMany(cascade=CascadeType.ALL, mappedBy="mappedManufacturerUC9")
        // private Map<Board, Enclosure> enclosureByBoardMapUC9;
        Type keyType = anAttribute.getKeyType();
        // When @MapKey(name="name") is present or we use generics
        assertEquals(Board.class, keyJavaType);
        assertNotNull(keyType);
        assertTrue(keyType instanceof Type);
        assertEquals(Type.PersistenceType.ENTITY, keyType.getPersistenceType());
    } catch (IllegalArgumentException iae) {
        iae.printStackTrace();
        exceptionThrown = true;
    } finally {
        cleanup(em);
        assertFalse("An IAE exception should not occur here.", exceptionThrown);
    }
}
Also used : EntityManager(jakarta.persistence.EntityManager) EntityType(jakarta.persistence.metamodel.EntityType) IdentifiableType(jakarta.persistence.metamodel.IdentifiableType) PersistentAttributeType(jakarta.persistence.metamodel.Attribute.PersistentAttributeType) MappedSuperclassType(jakarta.persistence.metamodel.MappedSuperclassType) EmbeddableType(jakarta.persistence.metamodel.EmbeddableType) PersistenceType(jakarta.persistence.metamodel.Type.PersistenceType) CollectionType(jakarta.persistence.metamodel.PluralAttribute.CollectionType) Type(jakarta.persistence.metamodel.Type) ManagedType(jakarta.persistence.metamodel.ManagedType) Manufacturer(org.eclipse.persistence.testing.models.jpa.metamodel.Manufacturer) EntityTypeImpl(org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl) Metamodel(jakarta.persistence.metamodel.Metamodel)

Aggregations

ManagedType (jakarta.persistence.metamodel.ManagedType)25 EntityManager (jakarta.persistence.EntityManager)23 Metamodel (jakarta.persistence.metamodel.Metamodel)23 EntityTypeImpl (org.eclipse.persistence.internal.jpa.metamodel.EntityTypeImpl)23 PersistentAttributeType (jakarta.persistence.metamodel.Attribute.PersistentAttributeType)22 EmbeddableType (jakarta.persistence.metamodel.EmbeddableType)22 EntityType (jakarta.persistence.metamodel.EntityType)22 IdentifiableType (jakarta.persistence.metamodel.IdentifiableType)22 MappedSuperclassType (jakarta.persistence.metamodel.MappedSuperclassType)22 CollectionType (jakarta.persistence.metamodel.PluralAttribute.CollectionType)22 Type (jakarta.persistence.metamodel.Type)22 PersistenceType (jakarta.persistence.metamodel.Type.PersistenceType)22 Manufacturer (org.eclipse.persistence.testing.models.jpa.metamodel.Manufacturer)18 Computer (org.eclipse.persistence.testing.models.jpa.metamodel.Computer)6 ListAttribute (jakarta.persistence.metamodel.ListAttribute)5 MapAttribute (jakarta.persistence.metamodel.MapAttribute)5 Attribute (jakarta.persistence.metamodel.Attribute)4 CollectionAttribute (jakarta.persistence.metamodel.CollectionAttribute)4 PluralAttribute (jakarta.persistence.metamodel.PluralAttribute)4 SetAttribute (jakarta.persistence.metamodel.SetAttribute)4