Internal Website Search

1-50 of 200 results

JPA Annotations for Mapping (ORM)

The following JPA annotations and enums are designated for mapping a JPA object model to a relational database, and are not required by ObjectDB: ObjectDB silently ignores all the above annotations.

Is ObjectDB better than Object Relational Mapping (ORM)?

All about Is ObjectDB better than Object Relational Mapping (ORM)? in Java/JPA database - explanations, examples, references, links and related information.

JPA Persistable Types

, Mapped superclasses, Embeddable classes. Simple Java data types: Primitive types, Wrappers, String, Date and Math types. Multi value types - Collections, Maps and Arrays. Miscellaneous types: Enum ... share the same class name, explicit entity name setting is required to avoid clashes. Mapped

JPA Entity Fields

Fields of persistable user defined classes (entity classes, embeddable classes and mapped ... ( Mapped By) fields Primary key (ID) fields Version field The first three groups (transient ... - for references of entity types. OneToMany , ManyToMany - for collections and maps of entity types

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW ... manager closes and as expected both a mapped @OneToMany list and an unmapped @OneToMany list are viewable: a.listA_ mapped :[{A}[4]"ownedElement1", {A}[5]"ownedElement2"] a.listB_unmapped:[{B}[2]"b1", {B}[3

JPA Persistence Unit

, embeddable classes and mapped superclasses) with related settings. Defining a persistence unit ... implementation that is found is used. The mapping -file elements specify XML mapping files that are added to the default META-INF/orm.xml mapping file. Every annotation that is described in

Optimization of Map Queries

hi! I am having loads and loads of occurrences of something like ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someProperty ... ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someOtherProperty .. ((com.test.MyEntity) $1. map .get('com.test.MyEntity')).someMoreProperties I need to use

Query over the keySet of a map field with collection parameter

It is possible to execute a query over a keySet of a map field with comparing to a collection ... " + EntityParent.class.getName() + " e " + "WHERE e. map member of ?1"; TypedQuery q = em.createQuery(query ... ; } @OneToMany (cascade = CascadeType.ALL) public Map map = new HashMap (); } @Entity public static class

Extended mapping-definitions

The described feature is not available in any object-db I know, but possible with mapping ... (respectively its class) gets mapped to a java class. So cats get mapped to the java class 'Cat', dogs to 'Dog ... - mapping , containing dogs and cats mixed up. Querying would not be as performant as with storing

Path.get(map) - JPA Method

JPA Method in javax.persistence.criteria.Path Expression get (    MapAttribute   map ) Create a path corresponding to the referenced map -valued attribute. Parameters: map - map -valued attribute Return: expression corresponding to the referenced attribute Since: JPA 2.0

EntityManagerFactory.createEntityManager(synchronizationType,map) - JPA Method

;  SynchronizationType  synchronizationType,     Map   map ) Create a new JTA application-managed EntityManager with the specified synchronization type and map of properties ... should be synchronized with the current JTA transaction map - properties for entity manager Return

EntityManagerFactory.createEntityManager(map) - JPA Method

JPA Method in javax.persistence.EntityManagerFactory EntityManager createEntityManager (    Map   map ) Create a new application-managed EntityManager with the specified Map ... will return true on the returned instance. Parameters: map - properties for entity manager Return: entity

CriteriaBuilder.keys(map) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression keys (   M  map ) Create an expression that returns the keys of a map . Parameters: map - map Return: set expression Since: JPA 2.0

CriteriaBuilder.values(map) - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression values (   M  map ) Create an expression that returns the values of a map . Parameters: map - map Return: collection expression Since: JPA 2.0

Persistence.generateSchema(persistenceUnitName,map) - JPA Static Method

JPA Static Method in javax.persistence.Persistence void generateSchema (   String persistenceUnitName,     Map   map ) Create database schemas and/or tables and/or ... - the name of the persistence unit map - properties for schema generation; these may also contain

From.join(map,jt) - JPA Method

JPA Method in javax.persistence.criteria.From MapJoin join (    MapAttribute   map ,     JoinType  jt ) Create a join to the specified Map -valued attribute using the given join type. Parameters: map - target of the join jt - join type Return: the resulting join Since: JPA 2.0

From.join(map) - JPA Method

JPA Method in javax.persistence.criteria.From MapJoin join (    MapAttribute   map ) Create an inner join to the specified Map -valued attribute. Parameters: map - target of the join Return: the resulting join Since: JPA 2.0

javax.persistence.metamodel.Type$PersistenceType.MAPPED_SUPERCLASS

JPA Enum Constant in javax.persistence.metamodel.Type $PersistenceType MAPPED _SUPERCLASS Mapped superclass Since: JPA 2.0

javax.persistence.metamodel.PluralAttribute$CollectionType.MAP

JPA Enum Constant in javax.persistence.metamodel.PluralAttribute $CollectionType MAP Map -valued attribute Since: JPA 2.0

JDO Annotations for Mapping (ORM)

The following JDO annotations and enums are designated for mapping a JDO object model to a relational database, and are not required by ObjectDB: ObjectDB silently ignores all the above annotations.

JPA Named Queries

to exactly one entity class or mapped superclass - usually to the most relevant entity class ... Country { ... } Note: Named queries can be defined in JPA XML mapping files instead of using the @NamedQuery annotation. ObjectDB supports JPA XML mapping files, including the definition of named

JPA Metamodel API

, embeddable classes, mapped super classes) Set allManagedTypes = metamodel. getManagedTypes ... , embeddable or mapped super classes): ManagedType type1 = metamodel. managedType (MyClass.class ...  - represents user defined mapped super classes. EntityType  - represents user defined

Retrieving JPA Entity Objects

collection and map persistent fields (i.e. through one-to-one and many-to-one relationships ... navigation through non collection and map persistent fields are also retrieved. Theoretically, in some ... ) private Employee manager; : } The default for non collection and map references is FetchType . EAGER

Database Connection using JPA

of the createEntityManagerFactory method takes a map of persistence unit properties as a second parameter: Map properties ... and a password in the persistence unit or in a map of properties (as demonstrated above). To obtain ... a map of properties as an argument. This form is useful when a user name and a password

ObjectDB Object Database Features

). Map keys and values are indexable. Nested paths inside embedded objects are indexable. Indices ... . Easy Learning Curve Easier than other JPA solutions - no need to learn and use O/R mapping . Easier ... to most developers. Friendly API JPA is very simple , except for mapping , which is irrelevant

ObjectDB - JPA Object Database for Java

Mapping (ORM) tools can reduce some manual work but cannot eliminate the extra processing time ... with no mapping . See for yourself how easy it is. Download ObjectDB and follow the Getting Stated Tutorial ... or NetBeans . Forget relational databases, JDBC, drivers, tables, records, ORM tools and mapping

Locking in JPA

- using the  createEntityManagerFacotory method:   Map properties = new HashMap();   ... ); For an EntityManager  - using the createEntityManager method:    Map properties = new HashMap ... pessimistic locking, timeout can be specified as a property. For example: Map properties = new HashMap

JPA Lifecycle Events

listeners can only be specified in a mapping XML file because there is no equivalent annotation: The mapping file has to be located either in the default location, META-INF/orm.xml , or in another location

Setting and Tuning of JPA Queries

; createEntityManagerFacotory method:   Map properties = new HashMap();   properties.put("javax.persistence ... the createEntityManager method:   Map properties = new HashMap();   properties.put("javax.persistence

Storing JPA Entity Objects

mapping file: The mapping file has to be located either in the default location, META-INF/orm.xml

JPA Class Enhancer

( entity classes , embeddable classes and mapped superclasses ), and is usually optional ... loading of entity objects. With no enhancement, only persistent collection and map fields

What is the Java Persistence API (JPA)?

. These implementations are Object Relational Mapping (ORM) tools. The mapping  bridges between the data

Database Schema Evolution

). From any object to any collection or array that can contain that object as en element. From any map type to any map type as long as the keys and values are convertible (e.g. from HashMap to TreeMap

JPA Annotations

other JPA annotations are designated for Object Relational Mapping (ORM) JPA providers (for mapping

Paths and Types in JPQL and Criteria API

Instances of user defined persistable classes (entity classes, mapped super classes and embeddable classes) are represented in JPQL by the following types of expressions: Variables - FROM ... persistable class. The dot (.) operator cannot be applied to collections, maps and values of simple

SELECT clause (JPQL / Criteria API)

value path expressions can be used in the SELECT clause. Collection and map fields cannot be included

Index Definition

for every index. A BTree is an ordered map data structure that ObjectDB maintains in the file

What are the main benefits of using ObjectDB?

the execution time of object oriented applications significantly. For instance, collection and map

Can I use ObjectDB to access a relational database?

To access relational databases using the Java Persistence API (JPA) you will need an Object Relational Mapping (ORM) tool, such as Hibernate, TopLink, EclipseLink, Open JPA or DataNucleus. The DataNucleus ORM implementation supports also the Java Data Objects (JDO) API. ObjectDB is a full featured

Deleting JPA Entity Objects

for collection and map fields. For example: @Entity class Employee { : @OneToMany ( orphanRemoval

Entity Management Settings

class, mapped super class or embeddable class). The element The element specifies global settings

JPA Annotations for Classes

JPA defines three types of persistable classes which are set by the following annotations: Chapter 2 of the ObjectDB manual explains these annotations in detail. Entity and mapped super classes can be further configured by annotations that specify cache preferences and lifecycle event listener

javax.persistence.AssociationOverride

Used to override a mapping for an entity relationship. May be applied to an entity that extends a mapped superclass to override a relationship mapping defined by the mapped superclass. If not specified, the association is mapped the same as in the original mapping . When used to override a mapping

Eager load Map

I'm having an issue eager loading a nested map . I've attached @ManyToMany(fetch=FetchType.EAGER) attributes to no avail. If the map is viewed in the debugger or force iterated in the code it loads ... it to a db and re-loads it. The EntityManager is closed before accesing any fields. Finally the nested map

PersistenceManagerFactory.setMapping(mapping) - JDO Method

JDO Method in javax.jdo.PersistenceManagerFactory void setMapping (   String  mapping ) Set the Mapping setting for this factory. This is used to find the object-datastore mapping file(s). Parameters: mapping - the Mapping setting. Since: JDO 1.0

javax.jdo.annotations.DiscriminatorStrategy.VALUE_MAP

JDO Enum Constant in javax.jdo.annotations.DiscriminatorStrategy VALUE_ MAP Since: JDO 2.1

[ODB1] Chapter 4 - JDO Metadata

explained in section 4.5 . 4.4  Arrays, Collections and Maps Special XML sub elements are available for array, collection and map fields: A element representing a persistent field whose type is collection, map or array, can have a , or sub element, respectively. embedded-element, embedded-key

[ODB1] Chapter 1 - About ObjectDB

. Most other JDO implementations map classes and objects to tables and records in an RDBMS. Using such mapping makes it possible to write clean Java code, but still requires some familiarity ... the necessary mappings and maintain them throughout the life of a system. With ObjectDB

[ODB1] Chapter 3 - Persistent Classes

and Hashtable , and the interfaces - Collection , Set , List and Map . java.math.BigInteger and java.math ... , List and Map ) cannot refer to an unsupported collection, or a collection that contains objects

[ODB1] Chapter 7 - JDOQL Queries

), otherwise the query execution throws a JDOUserException . Array and Maps of Parameters Queries