| made to load class or resource [ metamodel /PrimitiveValue.jdo] on an ASURLClassLoader instance ... : file:/usr/local/glassfish/glassfish/domains/dex/applications/ metamodel -ear-1.0-SNAPSHOT/lib/commons ... / metamodel -ear-1.0-SNAPSHOT/lib/commons-logging-1.2.jar, URLEntry : file:/usr/local/glassfish/glassfish |
| install mvn exec:java -Dexec.mainClass="test. metamodel .App" or fire it up in your favorite Maven capable ... .java:84) at test. metamodel .App.main(App.java:15) ... 6 more Caused by: com.objectdb.o.UserException ... the Retrieving Metamodel without Connection feature (which was implemented following your request two years ago |
| , the Metamodel is empty - none of the entities referenced in the mapping file are present in the Metamodel ... -classes to false. The Metamodel API still returns the empty set when 'getEntities()' is invoked ... the Metamodel API (storing objects, etc)? Does it work? support Support So I changed the persistence |
| I tried adding an explicit inspection of the EntityType using the metamodel public IMapItem getMapItem(Integer cachedKey, EntityManager em) { Metamodel metamodel = em.getMetamodel(); EntityType type2 = metamodel .entity(NoIdQueryMapItem.class); if(type2 == null) { System.err.println("CRASH |
| etc) This is the code I use to retrieve all Managed Types and data for the Athlete class Metamodel metamodel = em.getMetamodel(); Set allManagedTypes = metamodel .getManagedTypes(); for(ManagedType o ... parse the data? ezazop Akis Zazopoulos Using Java Reflection API. The JPA Metamodel API may also help. support Support |
| _01") @javax.persistence.NamedQueries({ /* queries */ }) public class ObjectValue implements metamodel ... ; queries */}) public class Attribute implements metamodel .IAttribute { @javax.persistence.Id   ... (name="value") private metamodel .Value value; public Attribute() {   |
| code fails EntityType type = metamodel .entity(domainClass);   ... ; "The given domain class can not be found in the given Metamodel !");   ... Metamodel API is fully supported by ObjectDB, but it seems that the getTypeId method was implemented |
| I was wondering if there is any way to get a list of the entity names in the database? dmoshal David Moshal You can use the Metamodel API as explained by the JPA Metamodel API page in ... (PersistenceManager.class)); This method remained from ObjectDB 1.x, but in JPA 2 applications the JPA Metamodel API |
| . The Main class opens a database file, creates an EntityManagerFactory and interacts with the Metamodel ... to access the metamodel and in this specific case, as there is no EntityManager , ObjectDB creates ... the metamodel from an EntityManager or at least from an EntityManagerFactory |
| JPA Method in javax.persistence. metamodel .ManagedType SingularAttribute getSingularAttribute ( String name ) Return the single-valued attribute of the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: single |
| JPA Method in javax.persistence. metamodel .ManagedType SingularAttribute getDeclaredSingularAttribute ( String name ) Return the single-valued attribute declared by the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute |
| JPA Method in javax.persistence. metamodel .ManagedType MapAttribute getDeclaredMap ( String name ) Return the Map-valued attribute declared by the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: declared |
| JPA Method in javax.persistence. metamodel .ManagedType MapAttribute getMap ( String name ) Return the Map-valued attribute of the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: MapAttribute of the given name |
| JPA Method in javax.persistence. metamodel .ManagedType ListAttribute getList ( String name ) Return the List-valued attribute of the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: ListAttribute of the given name |
| JPA Method in javax.persistence. metamodel .ManagedType ListAttribute getDeclaredList ( String name ) Return the List-valued attribute declared by the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: declared |
| JPA Method in javax.persistence. metamodel .ManagedType ListAttribute getDeclaredList ( String name, Class elementType ) Return the List-valued attribute declared by the managed type that corresponds to the specified name and Java element type. Parameters |
| JPA Method in javax.persistence. metamodel .ManagedType SetAttribute getDeclaredSet ( String name, Class elementType ) Return the Set-valued attribute declared by the managed type that corresponds to the specified name and Java element type. Parameters: name |
| JPA Method in javax.persistence. metamodel .ManagedType ListAttribute getList ( String name, Class elementType ) Return the List-valued attribute of the managed type that corresponds to the specified name and Java element type. Parameters: name - the name |
| JPA Method in javax.persistence. metamodel .ManagedType SetAttribute getSet ( String name, Class elementType ) Return the Set-valued attribute of the managed type that corresponds to the specified name and Java element type. Parameters: name - the name |
| JPA Method in javax.persistence. metamodel .ManagedType CollectionAttribute getCollection ( String name, Class elementType ) Return the Collection-valued attribute of the managed type that corresponds to the specified name and Java element type. Parameters |
| JPA Method in javax.persistence. metamodel .ManagedType CollectionAttribute getDeclaredCollection ( String name, Class elementType ) Return the Collection-valued attribute declared by the managed type that corresponds to the specified name and Java element |
| JPA Method in javax.persistence. metamodel .ManagedType Attribute getDeclaredAttribute ( String name ) Return the attribute declared by the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: attribute with given name |
| JPA Method in javax.persistence. metamodel .ManagedType Set getDeclaredPluralAttributes () Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) declared by the managed type. Returns empty set if the managed type has no declared multi-valued attributes. Return |
| JPA Method in javax.persistence. metamodel .ManagedType Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name. Parameters: name - the name of the represented attribute Return: attribute with given name Throws |
| JPA Method in javax.persistence. metamodel .ManagedType Set getPluralAttributes () Return all multi-valued attributes (Collection-, Set-, List-, and Map-valued attributes) of the managed type. Returns empty set if the managed type has no multi-valued attributes. Return: Collection-, Set-, List-, and Map-valued attributes Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .ManagedType MapAttribute getMap ( String name, Class keyType, Class valueType ) Return the Map-valued attribute of the managed type that corresponds to the specified name and Java key |
| JPA Method in javax.persistence. metamodel .ManagedType MapAttribute getDeclaredMap ( String name, Class keyType, Class valueType ) Return the Map-valued attribute declared by the managed type that corresponds to the specified name |
| JPA Method in javax.persistence. metamodel .ManagedType Set getAttributes () Return the attributes of the managed type. Return: attributes of the managed type Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType Set getIdClassAttributes () Return the attributes corresponding to the id class of the identifiable type. Return: id attributes Throws: IllegalArgumentException - if the identifiable type does not have an id class Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType Type getIdType () Return the type that represents the type of the id. Return: type of id Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType boolean hasVersionAttribute () Whether the identifiable type has a version attribute. Return: boolean indicating whether the identifiable type has a version attribute Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .ManagedType Set getDeclaredSingularAttributes () Return the single-valued attributes declared by the managed type. Returns empty set if the managed type has no declared single-valued attributes. Return: declared single-valued attributes Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .ManagedType Set getSingularAttributes () Return the single-valued attributes of the managed type. Returns empty set if the managed type has no single-valued attributes. Return: single-valued attributes Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .ManagedType SingularAttribute getSingularAttribute ( String name, Class type ) Return the single-valued attribute of the managed type that corresponds to the specified name and Java type. Parameters: name - the name |
| JPA Method in javax.persistence. metamodel .ManagedType SingularAttribute getDeclaredSingularAttribute ( String name, Class type ) Return the single-valued attribute declared by the managed type that corresponds to the specified name and Java type. Parameters |
| JPA Method in javax.persistence. metamodel .ManagedType Set getDeclaredAttributes () Return the attributes declared by the managed type. Returns empty set if the managed type has no declared attributes. Return: declared attributes of the managed type Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType SingularAttribute getId ( Class type ) Return the attribute that corresponds to the id attribute of the entity or mapped superclass. Parameters: type - the type of the represented id attribute Return: id attribute Throws |
| JPA Method in javax.persistence. metamodel .EntityType String getName () Return the entity name. Return: entity name Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType IdentifiableType getSupertype () Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass. Return: supertype of identifiable type or null if no such supertype Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType boolean hasSingleIdAttribute () Whether the identifiable type has a single id attribute. Returns true for a simple id or embedded id; returns false for an idclass. Return: boolean indicating whether the identifiable type has a single id attribute Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .IdentifiableType SingularAttribute getDeclaredVersion ( Class type ) Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass. Parameters: type - the type of the represented declared |
| JPA Method in javax.persistence. metamodel .IdentifiableType SingularAttribute getVersion ( Class type ) Return the attribute that corresponds to the version attribute of the entity or mapped superclass. Parameters: type - the type of the represented version attribute Return |
| JPA Method in javax.persistence. metamodel .IdentifiableType SingularAttribute getDeclaredId ( Class type ) Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass. Parameters: type - the type of the represented declared id attribute |
| . Parameters: entity - metamodel entity representing the entity of type X Return: query root |
| JPA Method in javax.persistence. metamodel .Type Class getJavaType () Return the represented Java type. Return: Java type Since: JPA 2.0 |
| JPA Method in javax.persistence. metamodel .Type Type .PersistenceType getPersistenceType () Return the persistence type. Return: persistence type Since: JPA 2.0 |
| - metamodel entity representing the entity of type X Return: query root corresponding to the given entity Since: JPA 2.1 |
| JPA Method in javax.persistence. metamodel .SingularAttribute Type getType () Return the type that represents the type of the attribute. Return: type of attribute Since: JPA 2.0 |
| , the entity that is being updated. Parameters: entity - metamodel entity representing the entity of type X |
| From my Entities a StaticMetamodel is generated through Hibernate JPA 2 Metamodel Generator ... and a failing test case BigMichi1 Michael Cramer Currently ObjectDB doesn't support the static metamodel ... ). Support of the static metamodel classes should be added to ObjectDB soon. support Support |