ObjectDB Database Search

1-50 of 200 results

JPA Persistence Unit

A JPA Persistence Unit is a logical grouping of user defined persistable classes (entity classes, embeddable classes and mapped superclasses) with related settings. Defining a persistence unit is optional when using ObjectDB, but required by JPA. persistence .xml Persistence units are defined in

Step 2: Entity Class and Persistence Unit

with a default persistence unit (that will be configured later). If the  Finish button is disabled ... JPA persistence unit (with default settings) was generated in a persistence .xml file that was added ... ) and selecting New Entity Class ... (or New Other... Persistence Entity Class and clicking Next ). Enter

Step 2: Entity Class and Persistence Unit

file with a default persistence unit (that will be configured later). If the Finish button is disabled ... JPA persistence unit (with default settings) was generated in a persistence .xml file that was added ... ) and selecting  New Entity Class ... (or  New Other... Persistence Entity Class and clicking

Step 2: Entity Class and Persistence Unit

.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id; private

Step 2: Entity Class and Persistence Unit

java.io.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields: @Id @GeneratedValue Long id

The project does not contain a persistence unit

How do I fix this error/warning that Netbeans gives me regarding no persistence unit ?   ThreaT Ashton Hogan ObjectDB itself does not require a persistence unit , but NetBeans produces this warning because a persistence unit is required by JPA. Although your application should work

Exception while accessing the Persistence unit ...?

, because it seems that the persistence unit is unknown. Try repeating the tutorial steps one by one carefully or download ... the  unit name to the DAO class: (if I remove it then the exception thrown is the same with null for the Unit Name)   Thanks, Allen   ceylonsoft Allen T. Arumainayagam Maybe

Database Connection using JPA

of the createEntityManagerFactory method takes a map of persistence unit properties as a second parameter: Map properties ... an argument a name of a persistence unit . As an extension, ObjectDB enables specifying a database URL (or path) directly, bypassing the need for a persistence unit . Any string that starts with objectdb

JPA Persistable Types

The term persistable types refers to data types that can be used for storing data in the database. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes ... can be stored in the database directly. Other persistable types can be embedded in entity classes as fields

Obtaining a JPA Database Connection

to get an EntityManager instance. JPA requires the definition of a persistence unit in an XML file in order ... persistence unit in an XML file or you can simply provide the file path of the ObjectDB database ... :$objectdb/db/points.odb"); The createEntityManagerFactory static method expects a persistence unit name as

Shared (L2) Entity Cache

in the ObjectDB configuration. Per persistence unit in the persistence .xml  file. Per entity ... the cache a positive value has to be specified. Persistence Unit Settings The shared cache can also be enabled or disabled using a persistence unit property:        

What is the Java Persistence API (JPA)?

The Java Persistence API (JPA) is a standard API for accessing databases from within Java ... JDBC. Using plain old Java objects (POJO) to represent persistent data can significantly simplify ... of the Java Persistence API (JPA). By interacting with ObjectDB using standard JPA

JPA Class Enhancer

; :  path to input user classes -pu :  persistence unit name -s :  include sub directories ... the -pu option with the name of a persistence unit to enhance all the managed classes that are defined in that persistence unit : $ java com.objectdb.Enhancer -pu my-pu The -cp option can be used to specify

JPA Named Queries

. But since the scope of named queries is the entire persistence unit , names should be selected ... that JPA requires the listing of managed classes in a persistence unit definition is to support named ... classes must be available. ObjectDB makes the definition of a persistence unit optional. Named queries

Privacy Policy

", "We", "Us" or "Our" in this Agreement) refers to ObjectDB Software Ltd, 109 Vernon House Friar Lane Unit 632 37 Westminster Buildings Theatre Square Nottingham NG1 6LG United Kingdom. Cookies  are small ... section and verifying system and server integrity). Cookies can be " Persistent " or "Session" Cookies

JPA Metamodel API

the persistence unit (which is optional when using ObjectDB) then only known managed types are returned ... the persistence unit and have not been used yet). In this case, calling the method introduces ... The JPA Metamodel API provides the ability to examine the persistent object model and retrieve

Storing JPA Entity Objects

/orm.xml , or in another location that is specified explicitly in the persistence unit definition ... New entity objects can be stored in the database either explicitly by invoking the persist method or implicitly as a result of a cascade operation. Explicit Persist The following code stores

Posting Sample Code

( no persistence unit ). Keep the test as simple as possible - remove unnecessary code (but keep it complete ... a persistence unit , An entity or IdClass class should implement the java.io.Serializable interface). ... test; import java.util.*; import javax. persistence .*; public final class MyTestCase {   

About Us

persistence solution for Java, based on the Java Persistence API (JPA) and the Java Data Objects (JDO ... Software Ltd Registered in England and Wales. Company No. 07295698. Registered office: Unit 632 37 Westminster Buildings Theatre Square Nottingham NG1 6LG United Kingdom +44 (0) 330 8080702 sales

Setting and Tuning of JPA Queries

): For the entire persistence unit - using a persistence .xml  property:      ... supports the following query hints: "javax. persistence .query.timeout" - sets maximum query execution time ... . persistence .lock.timeout" - sets maximum waiting time for pessimistic locks, when pessimistic locking

Locking in JPA

;The hint can be set in several scopes: For the entire persistence unit - using a persistence .xml   ... occurs a LockTimeoutException is thrown immediately. The "javax. persistence .lock.timeout"  hint ... ; properties.put("javax. persistence .lock.timeout", 2000);   EntityManagerFactory emf =  

JPA Lifecycle Events

explicitly in the persistence unit definition (in persistence .xml ). Default listeners are applied by default ... is invoked: @PrePersist - before a new entity is persisted (added to the EntityManager

Strings in JPQL and Criteria Queries

navigation to persistent string fields. as results of predefined JPQL string manipulation functions ... returns the number of characters in the argument string as an int . For example: LENGTH(' United

ClassRef jakarta.persistence.Persistence

;configuration) Create and return an EntityManagerFactory for the named persistence unit , using the given properties. Parameters: configuration - configuration of the persistence unit Return: the factory that creates {@link EntityManager} s configured according to the specified persistence unit

InterfaceRef jakarta.persistence.PersistenceUnitUtil

the application and the persistence provider managing the persistence unit . The methods ... for this persistence unit or on new entity instances. Since: JPA 2.0 Public Methods Class getClass (T entity) Return the concrete entity class if the given entity belonging to the persistence unit

InterfaceRef jakarta.persistence.EntityManagerFactory

with the persistence unit , and to create new instances of EntityManager . A persistence unit defines ... , then they must belong to the same persistence unit . A persistence unit may be defined by a persistence .xml file, or it may be defined at runtime via the PersistenceConfiguration API. Every persistence unit

InterfaceRef jakarta.persistence.spi.PersistenceUnitInfo

classloading scope, regardless of how many persistence units they may be a part of. Parameters ... : whether classes in the root of the persistence unit that have not been explicitly listed are to be included ... must examine for managed classes of the persistence unit . Each URL corresponds to a jar-file

ClassRef jakarta.persistence.PersistenceConfiguration

.PersistenceConfiguration Represents a configuration of a persistence unit , allowing programmatic creation ... persistence unit . That is, the configured persistence unit should be considered a Java SE persistence unit ... - the name of the persistence unit , which may be used by the persistence provider for logging

InterfaceRef jakarta.persistence.EntityManager

, and is only able to manage persistence of entities belonging to the associated persistence unit ... ;) EntityManager entityManager; } If the persistence unit has plain transaction management ... to the persistence unit , or if the second argument is not a valid non-null instance of the entity primary key type

InterfaceRef jakarta.persistence.spi.PersistenceProvider

.bean.manager"} . Return: {@link EntityManagerFactory} for the persistence unit specified by ... : configuration - the configuration of the persistence unit Return: EntityManagerFactory for the persistence unit , or null if the provider is not the right provider Throws: IllegalStateException

InterfaceRef jakarta.persistence.SchemaManager

belonging to a certain persistence unit . Properties are inherited from the EntityManagerFactory ... objects mapped by entities belonging to the persistence unit . If a DDL operation fails, the behavior ... entities belonging to the persistence unit , undoing the effects of the plain. If a DDL operation fails

Persistence.createEntityManagerFactory(persistenceUnitName,properties) - JPA Static Method

and return an EntityManagerFactory for the named persistence unit using the given properties. Parameters: persistenceUnitName the - name of the persistence unit properties Additional - properties to use ... : the factory that creates EntityManagers configured according to the specified persistence unit . Since: JPA 1.0

Persistence.createEntityManagerFactory(persistenceUnitName) - JPA Static Method

for the named persistence unit . Parameters: persistenceUnitName - the name of the persistence unit Return: the factory that creates {@link EntityManager} s configured according to the specified persistence unit Since: JPA 1.0 ... JPA Static Method in jakarta. persistence . Persistence EntityManagerFactory

Persistence.createEntityManagerFactory(configuration) - JPA Static Method

an EntityManagerFactory for the named persistence unit , using the given properties. Parameters: configuration - configuration of the persistence unit Return: the factory that creates {@link EntityManager} s configured according to the specified persistence unit Since: JPA 3.2

Persistence.createEntityManagerFactory(persistenceUnitName,properties) - JPA Static Method

and return an EntityManagerFactory for the named persistence unit , using the given properties. Parameters: persistenceUnitName - the name of the persistence unit properties - additional properties ... : the factory that creates {@link EntityManager} s configured according to the specified persistence unit Since: JPA 1.0

AnnotationRef jakarta.persistence.PersistenceUnit

Expresses a dependency on an EntityManagerFactory and its associated persistence unit . Since: JPA 1.0 ... is used. Since: JPA 1.0 String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If specified, the persistence unit for the entity manager

AnnotationRef jakarta.persistence.PersistenceContext

of the persistence unit as defined in the persistence .xml file. If the unitName element is specified, the persistence unit for the entity manager that is accessible in JNDI must have the same name. Since: JPA 1.0 ... Expresses a dependency on a container-managed EntityManager and its associated persistence context

AnnotationAttrRef jakarta.persistence.PersistenceUnit.unitName

JPA Annotation Attribute in jakarta. persistence .PersistenceUnit String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If specified, the persistence unit for the entity manager factory that is accessible in JNDI must have the same name. Since: JPA 1.0

EnumRef jakarta.persistence.SharedCacheMode

JPA Enum SharedCacheMode java.lang.Object ∟  java.lang.Enum ∟  jakarta. persistence .SharedCacheMode Specifies how the provider must use a second-level cache for the persistence unit ... . All other entities are not cached. Since: JPA 2.0 NONE Caching is disabled for the persistence unit

AnnotationAttrRef jakarta.persistence.PersistenceContext.unitName

JPA Annotation Attribute in jakarta. persistence .PersistenceContext String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If the unitName element is specified, the persistence unit for the entity manager that is accessible in JNDI must have the same name. Since: JPA 1.0

AnnotationRef jakarta.persistence.NamedQuery

written in the Jakarta Persistence query language. Query names are scoped to the persistence unit ... of the definition of a named query written in the Jakarta Persistence query language: @NamedQuery( name = " ... and the persistence context joined to the transaction. Since: JPA 2.0 String name default null (Required

EnumRef jakarta.persistence.ValidationMode

JPA Enum ValidationMode java.lang.Object ∟  java.lang.Enum ∟  jakarta. persistence .ValidationMode The validation mode to be used by the provider for the persistence unit . Since: JPA 2.0 Enum Constants AUTO If a Bean Validation provider is present in the environment, the persistence

InterfaceRef jakarta.persistence.metamodel.Metamodel

JPA Interface Metamodel Provides access to the metamodel of persistent entities in the persistence unit . Since: JPA 2.0 Public Methods EmbeddableType embeddable (Class  cls) Return ... : IllegalArgumentException - if not an entity See Also: jakarta. persistence .Entity.name Since: JPA 3.2 Set

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

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

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

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

AnnotationRef jakarta.persistence.NamedQueries

JPA Annotation NamedQueries Target: TYPE Implemented Interfaces: Annotation Declares multiple named Jakarta Persistence query language queries. Query names are scoped to the persistence unit . The NamedQueries annotation can be applied to an entity or mapped superclass. See Also: NamedQuery

AnnotationRef jakarta.persistence.TableGenerator

on the primary key field or property. The scope of the generator name is global to the persistence unit (across all generator types). If no name is explicitly specified, and the annotation occurs ... to a name chosen by persistence provider. Since: JPA 1.0 UniqueConstraint [] uniqueConstraints default

EnumConstRef jakarta.persistence.SharedCacheMode.NONE

JPA Enum Constant in jakarta. persistence .SharedCacheMode NONE Caching is disabled for the persistence unit . Since: JPA 2.0

Step 2: Define a JPA Entity Class

class. The warning that NetBeans displays on the Guest class indicates that a persistence unit ... code: package guest; import java.io.Serializable; import java.sql.Date; import javax. persistence .Entity; import javax. persistence .GeneratedValue; import javax. persistence .Id; @Entity public class Guest

Step 2: Define a JPA Entity Class

indicates that a persistence unit definition in an XML file is missing. This is discussed in the ObjectDB ... .Serializable; import javax. persistence .*; @Entity public class Point implements Serializable { private