ObjectDB Database Search

51-100 of 200 results

Defining a JPA Entity Class

String toString() { return String.format("(%d, %d)", this.x, this.y); } } As the example shows, an entity ... field that is not declared as static or transient is a persistent field. For example , the persistent

Eclipse Public License - v 1.0

responsibility to secure any other intellectual property rights needed, if any. For example ... . For example , a Contributor might include the Program in a commercial product offering, Product X

JPA Criteria API Queries

. For example , building a dynamic query based on a form with many optional fields is cleaner ... getCriteriaBuilder method or the EntityManager 's getCriteriaBuilder method. In the example

Server User List

to connect to the server only from the specified IP addresses. For example , "127.0.0.1" (the local computer ... addresses in a comma-separated list and use a hyphen (-) to specify a range. For example , a value

Chapter 1 - Quick Tour

This chapter demonstrates basic ObjectDB and JPA concepts by introducing a simple example program. After reading this chapter, you will be able to write basic programs that create, open, and close ... . The example program in this chapter manages a simple database that contains points in the plane. Each point

jakarta.persistence.Convert

to prefix the name of the attribute of the key or value type that is converted. Example 1: Convert ... ) boolean fullTime; ... } Example 2: Auto-apply conversion of a basic attribute @Converter(autoApply ... ; } Example 3: Disable conversion in the presence of an autoapply converter @Convert

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

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

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

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

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

used when MapKey is specified and vice versa. Example 1: @Entity public class Department ... = "dept_id") 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 ... empName, Date birthDay) {} Example 2: @Embeddable public class DependentId { String name

jakarta.persistence.Basic

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

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

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

[ODB1] Chapter 8 - ObjectDB Server

and the restart server commands). For example : server.exe -client -Xmx256m -port 6666 The specified arguments ... can also be specified in a comma separated list and using a hyphen (-) to indicate a range. For example , a value

[ODB1] Chapter 1 - About ObjectDB

database (for example , as a result of special customer needs or requests) can be done without modifying