ObjectDB Database Search

101-150 of 200 results

jakarta.persistence.EntityManager.createQuery(String,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createQuery (    String qlString ,    Class resultClass ) Create an instance of TypedQuery for executing a Jakarta Persistence query language statement. The select list of the query must contain

jakarta.persistence.EntityManager.createNamedQuery(String,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityManager TypedQuery createNamedQuery (    String name ,    Class resultClass ) Create an instance of TypedQuery for executing a Jakarta Persistence query language named query. The select list of the query must contain

jakarta.persistence.PersistenceUnits.class

No JavaDoc Info for jakarta.persistence.PersistenceUnits/ class

jakarta.persistence.criteria.CriteriaBuilder.nullLiteral(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression nullLiteral (    Class resultClass ) Create an expression for a null literal with the given type. Parameters: resultClass - type of the null literal Returns: null expression literal. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.NamedNativeQuery.classes

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedNativeQuery ConstructorResult[] classes Specifies the result set mapping to constructors. May not be used in combination with NamedNativeQuery.resultSetMapping . Default: {} Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.MapKeyJoinColumns.class

No JavaDoc Info for jakarta.persistence.MapKeyJoinColumns/ class

jakarta.persistence.NamedEntityGraphs.class

No JavaDoc Info for jakarta.persistence.NamedEntityGraphs/ class

jakarta.persistence.NamedNativeQueries.class

No JavaDoc Info for jakarta.persistence.NamedNativeQueries/ class

jakarta.persistence.TableGenerators.class

No JavaDoc Info for jakarta.persistence.TableGenerators/ class

jakarta.persistence.JoinColumns.class

No JavaDoc Info for jakarta.persistence.JoinColumns/ class

jakarta.persistence.SequenceGenerators.class

No JavaDoc Info for jakarta.persistence.SequenceGenerators/ class

jakarta.persistence.SqlResultSetMappings.class

No JavaDoc Info for jakarta.persistence.SqlResultSetMappings/ class

jakarta.persistence.SqlResultSetMapping.classes

Jakarta Persistence (JPA) Method in jakarta.persistence.SqlResultSetMapping ConstructorResult[] classes Specifies the result set mapping to constructors. Default: {} Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.EntityGraph.addTreatedSubgraph(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityGraph Subgraph addTreatedSubgraph (    Class type ) Add additional attributes to this entity graph that correspond to attributes of subclasses of the entity type of this EntityGraph . Subclass subgraphs automatically include

jakarta.persistence.EntityGraph.addSubclassSubgraph(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.EntityGraph Subgraph addSubclassSubgraph (    Class type ) Add additional attributes to this entity graph that correspond to attributes of subclasses of the entity type of this EntityGraph . Subclass subgraphs automatically include

jakarta.persistence.Query.getParameter(String,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.Query Parameter getParameter (    String name ,    Class type ) Get the parameter object corresponding to the declared parameter of the given name and type. This method is required to be supported for criteria queries

jakarta.persistence.Query.getParameter(int,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.Query Parameter getParameter (    int position ,    Class type ) Get the parameter object corresponding to the declared positional parameter with the given position and type. This method is not required to be supported by

jakarta.persistence.criteria.Expression.cast(Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.Expression Expression cast (    Class type ) Cast this expression to the specified type, returning a new expression object. Unlike Expression.as , this method does result in a runtime type conversion. Providers are required

jakarta.persistence.criteria.CriteriaBuilder.function(String,Class,Expression...)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression function (    String name ,    Class type ,    Expression ... args ) Create an expression for the execution of a database function. Parameters: name - function name args

jakarta.persistence.criteria.CriteriaBuilder.treat(Join,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Join treat (    Join join ,    Class type ) Downcast Join object to the specified type. Parameters: join - Join object type - type to be downcast to Returns: Join object of the specified type. Since: Jakarta Persistence (JPA) 2.1

jakarta.persistence.criteria.CriteriaBuilder.treat(CollectionJoin,Class)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder CollectionJoin treat (    CollectionJoin join ,    Class type ) Downcast CollectionJoin object to the specified type. Parameters: join - CollectionJoin object type - type to be downcast to Returns

JPA Persistable Types

. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes , Mapped superclasses, Embeddable classes . Simple Java data types: Primitive types, Wrappers, String ... types and Serializable types (user or system defined). Note : Only instances of entity classes

JPA Lifecycle Events

methods are methods that are defined within an entity class . For example, the following entity class defines all the supported callback methods with empty implementations: @Entity public static class ... - after deleting an entity from the database (during commit or flush ). An entity class may include callback

JPA Entity Fields

Fields of persistable user defined classes (entity classes , embeddable classes and mapped ... , persistent and inverse fields) can be used in both entity classes and embeddable classes . However, the last two groups (primary key and version fields) can only be used in entity classes . Primary key fields

SELECT clause (JPQL / Criteria API)

= em. createQuery ("SELECT c FROM Country c", Country. class ); List results = query. getResultList ... c.name FROM Country AS c", String. class ); List results = query. getResultList (); Only singular ... .name FROM Country AS c", Object[]. class ); List results = query. getResultList (); for (Object[] result

JPA Primary Key

and its primary key. Primary key values are unique per entity class . Instances of different entity classes , however, may share the same primary key value. Only entity objects have primary keys ... a primary key field: @Entity public class Project { @Id @GeneratedValue long id; // still set

JPA Metamodel API

details on managed  classes and persistent fields and properties, similarly to the ability ... . Three methods can be used to retrieve sets of types: // Get all the managed classes : // (entity classes , embeddable classes , mapped super classes ) Set allManagedTypes = metamodel. getManagedTypes

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 ... specify JAR files that should be searched for managed persistable classes . The class elements

Shared (L2) Entity Cache

class - using annotations. ObjectDB Configuration The shared cache size is specified in the ObjectDB ... except for selected entity classes (see below). DISABLE_SELECTIVE - cache is enabled except for selected entity classes  (see below). ALL  (the default) - cache is enabled for all the entity classes

FROM clause (JPQL / Criteria API)

class hierarchy (i.e. an entity class and all its descendant entity classes ). Identification variables are always polymorphic. JPQL does not provide a way to exclude descendant classes from iteration ... of an entity class in a JPQL query is the unqualified name of the class (e.g. just Country with no package

JPA Named Queries

to exactly one entity class or mapped superclass - usually to the most relevant entity class ... the above  @NamedQuery to the Country entity class : @Entity @NamedQuery ( name ="Country.findAll", query ="SELECT c FROM Country c") public class Country { ... } Attaching multiple named queries

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 identification variables and SELECT result variables. Parameters - when instances of these classes

Retrieving JPA Entity Objects

of entity classes and to keep them as simple as possible. Retrieval by Class and Primary Key Every entity object can be uniquely identified and retrieved by the combination of its class and its primary key ... object whose primary key is 1: Employee employee = em. find (Employee. class , 1); Casting

Schema Update

The configuration element supports renaming packages, classes and fields in ObjectDB databases as ... when persistable classes are renamed or moved to another package. Running the application with persistable classes that have been renamed or moved in the IDE, with no matching schema configuration

Index Definition

; @Entity public class EntityWithSimpleIndex { @Index String indexedField1; @Index ( unique ="true") int ... classes from package java.lang: Byte , Short , Character , Integer , Long , Float , Double. java.math ... of the @Index or @Unique annotations: @Entity @Index ( members ={"lastName","firstName"}) public class

Database Explorer

and embeddable classes ) in the database and their persistent fields and indexes. The [Query] window enables ... ] tabbed window or select an element for viewing (an entity class in the [Schema] tabbed window ... New Entity Objects...  command. In the dialog box select the entity class and specify the number

Database Schema Evolution

Modifications to entity classes that do not change their persistent field definitions ... of an entity class are detected by ObjectDB. New entity objects have to be stored in the new class schema, and old entity objects, which were stored previously in the old class schema

Entity Management Settings

, supported only on selected JVMs. The reflection attribute specifies how non enhanced classes are handled. ObjectDB can manage non enhanced classes by using reflection at the cost of performance ... classes must be enhanced - otherwise an exception is thrown. "warning" - a warning is logged

Storing JPA Entity Objects

an instance of the Employee entity class in the database: Employee employee = new Employee("Samuel ... class . Only instances of entity classes can be stored in the database independently. Objects ... (); Instances of persistable types other than entity classes are automatically stored embedded in

Posting Sample Code

. Whenever possible: Use a single Java file with one main class + static inner classes for entity / embeddable classes . Avoid dependency on external libraries . Use a console application with a main ... test; import java.util.*; import javax.persistence.*; public final class MyTestCase {   

ObjectDB Object Database Features

). Up to 2,147,483,648 entity classes per database file. Up to 2,147,483,648 indices per database file ...  and type versioning. Class hierarchy changes are handled automatically. New added fields ... automatically. Moving fields up and down in the class hierarchy is transparent. Support for renaming

Auto Generated Values

@GeneratedValue with the AUTO strategy: @Entity public class EntityWithAutoId1 { @Id @GeneratedValue ... definition is equivalent: @Entity public class EntityWithAutoId2 { @Id @GeneratedValue long id ... to the AUTO strategy: @Entity public class EntityWithIdentityId { @Id @GeneratedValue ( strategy

Literals in JPQL and Criteria Queries

.lang. Class instances in Java represent Java types. Entity type literals have been added in JPA 2 ... of the entity class (e.g. Country). That is equivalent to Country. class in Java code. Notice that the name of the entity class is not enclosed in quotes (because type literals are not string literals). By

Detached Entity Objects

field): @Entity class Employee { : @OneToOne ( cascade = CascadeType . DETACH ) private Address address; : } In the example above, the Employee entity class contains an address field that references an instance of Address , which is another entity class . Due to the CascadeType.DETACH setting

Deleting JPA Entity Objects

transaction, it can be deleted using the remove method: Employee employee = em. find (Employee. class , 1 ... is not an instance of an entity class or if it is a detached entity. A TransactionRequiredException ... can be referenced by a collection field): @Entity class Employee { : @OneToOne ( cascade

Date and Time in JPQL and Criteria Queries

. function ("year", Integer. class , date); Expression month = cb. function ("month", Integer. class , date); Expression day = cb. function ("day", Integer. class , ts);   // Create expressions that extract time parts: Expression hour = cb. function ("hour", Integer. class , time); Expression minute

Step 3: Define an EJB Session Bean

Operations on the database will be performed by an instance of a session bean (EJB) class that we will define in this step: Open the [New Java Class ] dialog box by right clicking the guest package node (in the [Package Explorer] window) and selecting New Class . The package name should be guest

Step 3: Define an EJB Session Bean

Operations on the database will be performed by an instance of a session bean (EJB) class ... Bean and clicking Next . Enter GuestDao as the EJB class name - use exactly that case sensitive class ... ) class . Now replace the content of the new source file with the following code: package guest; import

Step 3: Define a Spring DAO Component

) that we will define in this step as a Spring MVC component: Open the [New Java Class ] dialog box by right ... Java Class ... . Enter  GuestDao as the class name - use  exactly that case sensitive class name. The Package should be guest. Click Finish to create the new DAO Spring component class . Now

Step 3: Define a Spring DAO Component

) that we will define in this step as a Spring MVC component: Open the [New Java Class ] dialog box by right clicking the guest package node (in the [Package Explorer] window) and selecting  New Class . The package name should be  guest . Enter  GuestDao as the class name - use  exactly