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

supports all JPA persistable types, which include: User-defined classes : Entity classes , mapped superclasses, and embeddable classes . Simple Java data types: Primitive types, wrapper classes , `String ... types and serializable types (user-defined or system-defined). Note : Only instances of entity classes

JPA Entity Fields

The 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 be used only in entity classes . Primary key

SELECT clause (JPQL / Criteria API)

query = em. createQuery ("SELECT c FROM Country c", Country. class ); List results = query ... c.name FROM Country AS c", String. class ); List results = query. getResultList (); You can use ... .name, c.capital.name FROM Country AS c", Object[]. class ); List results = query. getResultList

JPA Persistence Unit

A JPA persistence unit is a logical grouping of user-defined persistable classes (entity classes , embeddable classes , and mapped superclasses) and their related settings. Defining a persistence unit ... . class ) .managedClass(sample.MyEntity2. class ); // Instantiate the EntityManagerFactory using

JPA Primary Key

entity class . Instances of different entity classes , however, may share the same primary key value ... value by declaring a primary key field: @Entity public class Project { @Id @GeneratedValue long id ... public class Project { @Id long id; // must be initialized by the application : } An application-set

JPA Metamodel API

about managed classes , persistent fields, and properties, similar to how Java reflection provides ... retrieve sets of types: // Get all the managed classes : // (entity classes , embeddable classes , mapped super classes ) Set allManagedTypes = metamodel. getManagedTypes (); // Get all the entity classes

JPA Lifecycle Events

Internal callback methods are defined within an entity class . For example, the following entity class defines all supported callback methods with empty implementations: @Entity public static class ... the database (during a commit or flush operation). An entity class can define callback methods for any

JPA Shared (L2) Entity Cache

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

FROM clause (JPQL / Criteria API)

that iterate over all the database objects of a specific entity class hierarchy, which includes an entity class and all its descendant entity classes . Identification variables are always polymorphic (you can use type expression to exclude descendant classes from iteration). For example, in

Retrieving JPA Entities

the no-argument constructors of entity classes and keep them as simple as possible. Retrieval by class and primary key Every entity can be uniquely identified and retrieved by the combination of its class ... object with a primary key of 1: Employee employee = em. find (Employee. class , 1); You do not need

JPA Named Queries

methods. Each @NamedQuery annotation is attached to exactly one entity class or mapped superclass, usually ... a prefix. For example, you can add the preceding @NamedQuery to the Country entity class : @Entity @NamedQuery ( name ="Country.findAll", query ="SELECT c FROM Country c") public class Country

Paths and Types in JPQL and Criteria API

Instances of user-defined persistent classes (entity classes , mapped superclasses, and embeddable classes ) are represented in JPQL by the following types of expressions: Variables : FROM identification variables and SELECT result variables. Parameters : Instances of these classes that are assigned

Schema Update

The configuration element supports renaming packages, classes , and fields in ObjectDB databases ... when you rename or move persistable classes to another package. If you run the application with persistable classes that have been renamed or moved in the IDE without a matching schema configuration, ObjectDB

Index Definition

class EntityWithSimpleIndex { @Index String indexedField1; @Index ( unique ="true") int indexedField2 ... , long , float , double Equivalent wrapper classes from the java.lang package: Byte , Short , Character ... ={"lastName","firstName"}) public class EntityWithCompositeIndex { String firstName; String

JPA Components Annotations

You can use Jakarta Persistence (JPA) annotations to mark classes as persistent and to configure ... class : Marks the class as an entity. Entities are persistent domain objects with a unique identity (primary key) and their own lifecycle. Marks the class as embeddable. Instances are stored as

Database Explorer

(entity and embeddable classes ) in the database and their persistent fields and indexes. The Query ... , either write a query in the Query window or select an element to view (such as an entity class in the Schema ... the Edit New Entities... 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 ... to the persistent fields of an entity class . New entities must be stored using the new class schema, and old entities, which were stored using the old class schema, must be converted to the new schema. Note

Storing JPA Entities

code stores an Employee entity class instance in the database: Employee employee = new Employee ... class instance. Only entity class instances can be stored in the database independently. Objects ... of persistable types other than entity classes are automatically stored as embedded objects in

Entity Management Settings

attribute specifies how non-enhanced classes are handled. ObjectDB can manage non-enhanced classes by ... represent different policies: "error" - All persistable classes must be enhanced; otherwise, ObjectDB throws an exception. "warning" - ObjectDB logs a warning for every non-enhanced class . "ignore

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 jakarta.persistence.*; public final class MyTestCase {   

[ODB1] Chapter 4 - JDO Metadata

more persistent classes . All the persistent classes , and only them, have to be declared in a metadata ... system. Therefore, at deployment, .jdo metadata files must be packaged with an application's . class files ... at runtime, ObjectDB determines whether or not each class is persistent. It searches for JDO metadata

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

[ODB1] Chapter 7 - JDOQL Queries

. An Extent , for instance, can be used to retrieve all the instances of a specified persistent class ... three components: A candidate collection containing persistent objects (usually an Extent ) A candidate class (usually a persistent class ) A filter, which is a boolean expression in a Java like syntax The query

[ODB1] Chapter 2 - A Quick Tour

of a single source file, HelloWorld.java , containing a single class : 1 // A simple program that manages ... .objectdb.Utilities; 6 7 public class HelloWorld { 8 9 public static void main(String[] args) { 10 11 ... , including exceptions.   ObjectDB Extensions The com.objectdb.Utilities class implements

[ODB1] Chapter 9 - ObjectDB Explorer

when a database is open. The " Class " window shows all the persistent classes in the database. You can select a class from the list of classes at the top of this window and see all its persistent fields ... a new viewer window, first select a target element: Select a persistent class in the " Class " tabbed

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

[ODB1] Chapter 6 - Persistent Objects

of its type. Instances of persistent classes can become persistent later, as demonstrated by ... to makePersistent( ... ) is not an instance of a persistent class (as defined in chapter 3 ... ( ... ) to instances of user defined persistent classes . However, persistence by reachability