ObjectDB Database Search

51-100 of 200 results

JPA Criteria Query Expressions

how whitespace should be trimmed ( LEADING , TRAILING , or BOTH ). For more details and examples , see the Query Expressions section in the ObjectDB manual.

JPA Lifecycle Events

Callback methods are user-defined methods that are attached to entity lifecycle events. JPA invokes these methods automatically when the corresponding events occur. Internal callback methods Internal callback methods are defined within an entity class. For example , the following entity class

Apache License, Version 2.0, January 2004

indicated by a copyright notice that is included in or attached to the work (an example is provided

Server Configuration

the connection URL is resolved relative to the data path. For example , objectdb://localhost/my/db

JPA Named Queries Annotations

, cache usage, or fetch graphs. For details and examples , see the JPA Named Queries section

Logical Operators in JPQL and Criteria API

, Boolean expressions are represented by the Expression interface and its descendants. For example

JPA Metamodel Attributes

. For more information on the hierarchy and usage examples , see the Metamodel Attribute Interface Hierarchy section.

JPA Metamodel Types

explanation of the type interface hierarchy and examples , see the Metamodel Type Interface Hierarchy section.

JPA Criteria Queries

: Represents a query embedded within another query (for example , inside a WHERE clause). Unlike a top-level

JPA Metamodel and Graphs

and properties), covering singular, plural (collection), and map attributes. For detailed examples

CRUD Database Operations with JPA

} } em. getTransaction (). commit (); In the preceding example , all the Point objects whose x coordinate

Chapter 6 - Configuration

subdirectory. However, moving objectdb.jar changes the value of $objectdb . For example , in a web application

Entity Management Settings

method for instances of serializable types that are otherwise non-persistable (for example , a user

Posting Sample Code

and runnable). You may use the following example as an initial template for your test case: package

Managing JPA Entities

, represents entities that have been disconnected from an EntityManager . For example , all the managed

JPA Criteria FROM and JOIN

and other Fetch instances. For more details and an example , see the FROM in Criteria Queries section.

JPA Exceptions

when an optimistic locking conflict occurs (for example , a version mismatch). This indicates

SSL Configuration

the example , SSL is disabled by default. Enable SSL when accessing remote ObjectDB databases

JPA Listeners & Callbacks Annotations

(for example , PrePersist and PostLoad ). Specifies that the default listeners defined for the persistence

jakarta.persistence.MapKeyClass

is not used when MapKeyClass is specified and vice versa. Example 1: @Entity public class Item { @Id int ... ; // map from image name to image filename ... } Example 2: // MapKeyClass and target type of relationship ... ; ... } Example 3: @Entity public class Company { @Id int id; ... @OneToMany(targetEntity = com. example

jakarta.persistence.Column

field. If no Column annotation is explicitly specified, the default values apply. Example 1: @Column ... ; } Example 2: @Column(name = "DESC", columnDefinition = "CLOB NOT NULL", table = "EMP_DETAIL") @Lob public String getDescription() { return description; } Example 3: @Column(name = "ORDER_COST", updatable

jakarta.persistence.MapKeyJoinColumn

and the default values apply. Example 1: @Entity public class Company { @Id int id; ... @OneToMany ... ") Map organization; } Example 2: @Entity public class VideoStore { @Id int id; String name; Address ... ; ... } Example 3: @Entity public class Student { @Id int studentId; ... @ManyToMany // students and courses

jakarta.persistence.ManyToMany

notation is the name of the respective embedded field or property. Example 1: // In Customer class ... PhoneNumber class: @ManyToMany(mappedBy = "phones") public Set getCustomers() { return customers; } Example ... , mappedBy = "phones") public Set getCustomers() { return customers; } Example 3: // In Customer class

jakarta.persistence.Embeddable

or property of an embeddable class which is not persistent. Example 1: @Embeddable public class ... ; ... } Example 2: @Embeddable public class PhoneNumber { protected String areaCode; protected String ... PhoneServiceProvider { @Id protected String name; ... } Example 3: @Embeddable public class Address { protected

jakarta.persistence.AttributeOverride

the same as in the original mapping. Example 1: @MappedSuperclass public class Employee { @Id protected ... ) { ... } } Example 2: @Embeddable public class Address { protected String street; protected String city ... protected Address address; ... } Example 3: @Entity public class PropertyRecord { @EmbeddedId protected

jakarta.persistence.OneToOne

property. Example 1: One-to-one association that maps a foreign key column // On Customer class: @OneToOne ... customer; } Example 2: One-to-one association that assumes both the source and target share the same ... Integer id; ... } Example 3: One-to-one association from an embeddable class to another entity. @Entity

jakarta.persistence.OneToMany

, the cascade element and the orphanRemoval element apply to the map value. Example 1: One-to-Many ... ", nullable = false) public Customer getCustomer() { return customer; } Example 2: One-to-Many association ... ; } Example 3: Unidirectional One-to-Many association using a foreign key mapping // In Customer class

jakarta.persistence.OrderBy

. Example 1: @Entity public class Course { ... @ManyToMany @OrderBy("lastname ASC") public List getStudents() { ... } ... } Example 2: @Entity public class Student { ... @ManyToMany(mappedBy = "students") @OrderBy // ordering by primary key is assumed public List getCourses() { ... } ... } Example 3

jakarta.persistence.GeneratedValue

primary keys is not supported. Example 1: @Id @GeneratedValue(strategy = SEQUENCE, generator = "CUST_SEQ") @Column(name = "CUST_ID") public Long getId() { return id; } Example 2: @Id @GeneratedValue

jakarta.persistence.Lob

it defaults to CLOB ; for all other types it defaults to BLOB . Example 1: @Lob @Basic(fetch = LAZY) @Column(name = "REPORT") protected String report; Example 2: @Lob @Basic(fetch = LAZY) @Column(name

jakarta.persistence.JoinColumn

and the default values apply. Example : @ManyToOne @JoinColumn(name = "ADDR_ID") public Address getAddress() { return address; } Example : unidirectional one-to-many association using a foreign key mapping // In

jakarta.persistence.MapKeyColumn

of the following: the name of the referencing relationship field or property; " _ "; " KEY ". Example : @Entity ... is parameterized by length, for example , varchar or varbinary types. Default: 255 Since: Jakarta

jakarta.persistence.MapKey

when MapKey is specified and vice versa. Example 1: @Entity public class Department { ... @OneToMany ... ") public Department getDepartment() { ... } ... } Example 2: @Entity public class Department

jakarta.persistence.ManyToOne

with the dot notation is the name of the respective embedded field or property. Example 1: @ManyToOne(optional ... getCustomer() { return customer; } Example 2: @Entity public class Employee { @Id int id; @Embedded JobInfo

jakarta.persistence.EmbeddedId

. Relationship mappings defined within an embedded primary key type are not supported. Example 1: @Entity public ... empName, Date birthDay) {} Example 2: @Embeddable public class DependentId { String name; EmployeeId

jakarta.persistence.Basic

annotation. Example 1: @Basic protected String name; Example 2: @Basic(fetch = LAZY) protected String

jakarta.persistence.AssociationOverride

its join columns. Example 1: Overriding the mapping of a relationship defined by a mapped superclass ... { ... } Example 2: Overriding the mapping for phoneNumbers defined in the ContactInfo class @Entity public class

jakarta.persistence.SecondaryTables

Jakarta Persistence (JPA) Annotation Type jakarta.persistence.SecondaryTables Implemented Interfaces: Annotation Target: Type Specifies multiple secondary tables for an entity. Example 1: Multiple ... _HIST")}) public class Employee { ... } Example 2: Multiple secondary tables with differently named

jakarta.persistence.SecondaryTable

, and have the same names and types as the referenced primary key columns of the primary table. Example 1: Single ... { ... } Example 2: Single secondary table with multiple primary key columns. @Entity @Table(name

jakarta.persistence.TableGenerator

annotation. Example 1: @Entity public class Employee { ... @TableGenerator( name = "empGen", table ... ", allocationSize = 1) @Id @GeneratedValue(strategy = TABLE, generator = "empGen") int id; ... } Example 2

jakarta.persistence.Id

or field. Example : @Id public Long getId() { return id; } See Also: Column GeneratedValue

jakarta.persistence.IdClass

to be annotated. Example : @IdClass(EmployeePK.class) @Entity public class Employee { @Id String empName; @Id

jakarta.persistence.ForeignKey

the target database for foreign key constraint creation. For example , it might be similar to the following

jakarta.persistence.JoinTable

) using an underscore. Example : @JoinTable( name = "CUST_PHONE", joinColumns = @JoinColumn(name = "CUST_ID

jakarta.persistence.Inheritance

is used. Example : @Entity @Inheritance(strategy = JOINED) public class Customer { ... } @Entity public

jakarta.persistence.JoinColumns

specify both name and referencedColumnName . Example : @ManyToOne @JoinColumns({ @JoinColumn(name

jakarta.persistence.MapKeyEnumerated

, the enumerated type is assumed to be ORDINAL . Example : public enum ProjectStatus {COMPLETE, DELAYED, CANCELLED

jakarta.persistence.MapKeyTemporal

with the ElementCollection , OneToMany , or ManyToMany annotation. Example : @OneToMany @MapKeyTemporal(DATE

Step 3: Define a Spring DAO Component

the application to the Spring Framework. For instance, in this example the Spring container: Manages

Step 3: Define a Spring DAO Component

the application to the Spring Framework. For instance, in this example the Spring container: Manages