ObjectDB Database Search

1-50 of 200 results

JPA Named Queries

A named query is a statically defined query with a predefined, unchangeable query string. Using named queries instead of dynamic queries can improve code organization by separating JPQL query ... and @NamedQueries Annotations The following @NamedQuery annotation defines a query named "Country.findAll

JPA Named Queries Annotations

level, separating query logic from business code. Query definitions Declare named queries using the following annotations: Specifies a static, named query in the Jakarta Persistence Query Language (JPQL). It is defined on an entity or mapped superclass and assigned a unique name for retrieval

jakarta.persistence.JoinColumn.name

Jakarta Persistence (JPA) Method in jakarta.persistence.JoinColumn String name (Optional) The name ... ): The concatenation of the following: the name of the referencing relationship property or field of the referencing entity or embeddable class; " _ "; the name of the referenced primary key column

jakarta.persistence.NamedEntityGraph.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedEntityGraph String name (Optional) The name used to identify the entity graph in calls to EntityManager.getEntityGraph . If no name is explicitly specified, the name defaults to the entity name of the annotated root entity. Entity graph

jakarta.persistence.AttributeOverride.name

Jakarta Persistence (JPA) Method in jakarta.persistence.AttributeOverride String name (Required) The name of the property whose mapping is being overridden if property-based access is being used, or the name of the field if field-based access is used. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.UniqueConstraint.name

Jakarta Persistence (JPA) Method in jakarta.persistence.UniqueConstraint String name (Optional) The name of the constraint. Defaults to a provider-generated name . Default: "" Since: Jakarta Persistence (JPA) 2.0

jakarta.persistence.Table.name

Jakarta Persistence (JPA) Method in jakarta.persistence.Table String name (Optional) The name of the table. Defaults to the entity name . Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.TableGenerator.name

Jakarta Persistence (JPA) Method in jakarta.persistence.TableGenerator String name (optional) A unique generator name that can be referenced by one or more classes to be the generator for id values. Defaults to the name of the entity when the annotation occurs on an entity class or primary key

jakarta.persistence.Index.name

Jakarta Persistence (JPA) Method in jakarta.persistence.Index String name (Optional) The name of the index. Defaults to a provider-generated name . Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.ForeignKey.name

Jakarta Persistence (JPA) Method in jakarta.persistence.ForeignKey String name (Optional) The name of the foreign key constraint. Defaults to a provider-generated name . Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.OrderColumn.name

Jakarta Persistence (JPA) Method in jakarta.persistence.OrderColumn String name (Optional) The name of the ordering column. Defaults to the concatenation of the name of the referencing property or field; " _ "; " ORDER ". Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceConfiguration.name()

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceConfiguration String name () The name of the persistence unit, which may be used by the persistence provider for logging and error reporting. Returns: the name of the persistence unit.. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.MapKeyColumn.name

Jakarta Persistence (JPA) Method in jakarta.persistence.MapKeyColumn String name (Optional) The name of the map key column. The table in which it is found depends upon the context. If the map key ... that is the value of the map. Defaults to the concatenation of the following: the name of the referencing

jakarta.persistence.MapKey.name

Jakarta Persistence (JPA) Method in jakarta.persistence.MapKey String name (Optional) The name of the persistent field or property of the associated entity that is used as the map key. Default: If the name element is not specified, the primary key of the associated entity is used as the map key

jakarta.persistence.PersistenceProperty.name

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceProperty String name The name of the property Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceContext.name

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceContext String name (Optional) The name by which the entity manager is to be accessed in the environment referencing context; not needed when dependency injection is used. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.PersistenceUnit.name

Jakarta Persistence (JPA) Method in jakarta.persistence.PersistenceUnit String name (Optional) The name by which the entity manager factory is to be accessed in the environment referencing context; not needed when dependency injection is used. Default: "" Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.FieldResult.name

Jakarta Persistence (JPA) Method in jakarta.persistence.FieldResult String name Name of the persistent field or property of the class. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.NamedNativeQuery.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedNativeQuery String name The name used to identify the query in calls to EntityManager.createNamedQuery . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.NamedStoredProcedureQuery.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedStoredProcedureQuery String name The name used to refer to the query with the EntityManager methods that create stored procedure query objects. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.NamedQuery.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedQuery String name (Required) The name used to identify the query in calls to EntityManager.createNamedQuery . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.NamedSubgraph.name

Jakarta Persistence (JPA) Method in jakarta.persistence.NamedSubgraph String name (Required) The name of the subgraph as referenced from a NamedAttributeNode element. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.LocalDateField.name

Jakarta Persistence (JPA) Field in jakarta.persistence.criteria.LocalDateField name Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.LocalDateTimeField.name

Jakarta Persistence (JPA) Field in jakarta.persistence.criteria.LocalDateTimeField name Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.LocalTimeField.name

Jakarta Persistence (JPA) Field in jakarta.persistence.criteria.LocalTimeField name Since: Jakarta Persistence (JPA) 1.0

SELECT clause (JPQL / Criteria API)

, the following query returns country names as String instances, rather than Country objects: SELECT c. name FROM Country AS c Using path expressions , such as c. name , in query results is called ... c. name FROM Country AS c", String.class); List results = query. getResultList (); You can use

Query Parameters in JPA

because it eliminates repeated query compilations. Named Parameters (: name ) The following method retrieves a Country object from the database by its name : public Country getCountryByName( EntityManager em, String name ) { TypedQuery query = em. createQuery ( "SELECT c FROM Country c WHERE c. name = : name

Schema Update

... ... A element has two roles: If you specify the optional new- name attribute, the package name changes from the original name (specified by the required name attribute) to the new name . All classes in that package are moved to the new package. Additionally, regardless of whether a new- name attribute

FROM clause (JPQL / Criteria API)

By default, the name of an entity class in a JPQL query is the unqualified name of the class (for example, Country with no package name ). The default name can be overridden by specifying another name explicitly in the name element of the @Entity annotation. Multiple range variables are allowed

JPA Persistable Types

, package, or private ), and it can be either concrete or abstract. Entity class names Entity classes are represented in queries by entity names . By default, the entity name is the unqualified name of the entity class (that is, the short class name without the package name ). A different entity name

jakarta.persistence.metamodel.EntityType

Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws: IllegalArgumentException - if attribute

jakarta.persistence.metamodel.IdentifiableType

Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws

jakarta.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 Returns: attribute with given name . Throws: IllegalArgumentException - if attribute of the given name is not present in

jakarta.persistence.metamodel.EmbeddableType

Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws: IllegalArgumentException - if attribute of the given name

jakarta.persistence.metamodel.MappedSuperclassType

Persistence (JPA) 2.0 Public Instance Methods Attribute getAttribute ( String name ) Return the attribute of the managed type that corresponds to the specified name . Inherited from ManagedType Parameters: name - the name of the represented attribute Returns: attribute with given name . Throws

JPA Connections and Transactions

a persistence unit name as an argument. As an extension, ObjectDB lets you specify a database URL or path ... rather than a persistence unit name . To use ObjectDB embedded directly in your application (embedded mode ... : protocol prefix is optional if the database file name extension is .odb or .objectdb

Database Transaction Replayer

When recording is enabled , ObjectDB maintains a recording directory for each database file. The name of the recording directory is the database file name with the .odr (ObjectDB Recording) suffix. By ... of files: Backup files, with names in the format .odb Recording files, with names in the format .odr

Literals in JPQL and Criteria Queries

syntax for enum values, but you must specify the fully qualified name of the enum type. For example ... literal is the name of the entity class (for example, Country ). This is equivalent to Country.class in Java code. The name of the entity class is not enclosed in quotation marks because type literals

JPA Entity Fields

{ String name ; @ManyToOne Department department; } @Entity public class Department { @OneToMany ... public class Department { @OneToMany ( mappedBy ="department") @OrderBy (" name ") List employees; } In ... Employee e WHERE e.department = :d ORDER BY e. name The specified field ( " name " ) must be a sortable

Step 2: Entity Class and Persistence Unit

, enter src/main/java as Folder Name and click Finish . Open the [New Java Class] dialog box, e.g. by ... ; New Class . Enter  guest as the package name - use  exactly that case sensitive package name . Enter  Guest as the class name - use  exactly that case sensitive class name . Click

Step 2: Entity Class and Persistence Unit

) and selecting  New Class . Enter  guest as the package name - use  exactly that case sensitive package name . Enter  Guest as the class name - use  exactly that case sensitive class name . Click  Finish to create the new class. A new class that should represent Guest

Step 2: Entity Class and Persistence Unit

Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Next to create the new entity class. In ... name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Entity Class and Persistence Unit

  Next ). Enter Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Next to create the new ... name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Define a JPA Entity Class

) and selecting New Class . Enter guest as the package name - use exactly that case sensitive package name . Enter Guest as the class name - use exactly that case sensitive class name . Click Finish ... String name ; private Date signingDate; // Constructors: public Guest() { } public Guest(String name

Step 2: Define a JPA Entity Class

) and selecting New Java Class ... Enter Guest as the class name - use exactly that case sensitive class name . Enter guest as the package name - use exactly that case sensitive package name . Click Finish ... @GeneratedValue Long id; private String name ; private Date signingDate; // Constructors: public

Step 4: Add a Controller Class

) and selecting  New Class . The package name should be  guest . Enter  GuestController as the class name - use  exactly that case sensitive class name . Click  Finish to create ... name = request.getParameter(" name "); if ( name != null) guestDao.persist(new Guest( name

Step 4: Add a Servlet Class

... Enter GuestServlet as the class name - use exactly that case sensitive class name . The Java package name should be guest. Click Finish to create the new servlet class. Now replace the content ... .http.HttpServletResponse; @WebServlet( name ="GuestServlet", urlPatterns={"/guest"}) public class

[ODB1] Chapter 6 - Persistent Objects

, Utilities.bind( ... ) . This method (discussed in the next section) enables the assignment of names ... ; Object IDs and Names Identifying database objects by unique IDs and by names is useful in object ... names , is not supported by JDO, but ObjectDB supports it as an extension because of its popularity in

[ODB1] Chapter 2 - A Quick Tour

ArrayList list; 18 try { 19 // Retrieve the list from the database by its name : 20 list = (ArrayList ... the database by its name "Hello World" using the getObjectById( ... ) method (line 20 ... to the database with the name "Hello World", using the Utilities.bind( ... ) static method (line 25

[ODB1] Chapter 8 - ObjectDB Server

configuration file. ObjectDB is shipped with a default server configuration file named default.xml ... com.objectdb.Server -conf config.xml start If you name your configuration file server.xml ... element. The required name and password attributes specify a username and a password to be used