Internal Website Search

51-100 of 200 results

javax.persistence.AccessType.FIELD

JPA Enum Constant in javax.persistence.AccessType FIELD Field -based access is used. Since: JPA 2.0

javax.persistence.EntityResult.fields

JPA Annotation Attribute in javax.persistence.EntityResult FieldResult [] fields default {} Maps the columns specified in the SELECT list of the query to the properties or fields of the entity class. Since: JPA 1.0

Deleting JPA Entity Objects

the database require an active transaction. Cascading Remove Marking a reference field with CascadeType ... should be cascaded automatically to entity objects that are referenced by that field (multiple entity objects can be referenced by a collection field ): @Entity class Employee { : @OneToOne ( cascade

JPA Class Enhancer

through methods) persistent fields of enhanced classes must also be enhanced. It is a good practice (and actually required by JPA but not enforced by ObjectDB) to avoid accessing persistent fields ... efficient tracking of persistent field modifications, avoiding the need for snapshot comparison of entities

Storing JPA Entity Objects

of other persistable types can only be stored in the database embedded in containing entities (as field ... of entity objects that are reachable from that object by navigation through persistent reference fields ... field with CascadeType . PERSIST (or CascadeType . ALL  that also covers PERSIST ) indicates

Paths and Types in JPQL and Criteria API

expression) and uses the dot ( . ) operator to navigate through persistent fields to other objects ... persistent field in the Country class to navigate to the associated Capital entity object. Path expression ... to its name field . A path expression can be extended further only if its type is also a user defined

Schema Update

The configuration element supports renaming packages, classes and fields in ObjectDB databases as ... and fields in that package. The elements above specify renaming of the com.example.old1 and com ... attribute is specified a element serves as a container of subelements for renaming fields in that class

GROUP BY and HAVING clauses

properties of generated groups instead of individual objects and fields . The position of a GROUP BY ... can be applied to entity objects directly. Other aggregate functions are applied to fields of objects in ... grouping queries also apply to the HAVING clause, which means that individual object fields

JPA Query Structure (JPQL / Criteria)

is that SQL works with relational database tables, records and fields , whereas JPQL works with Java ... rather than just field values from database tables, as with SQL. That makes JPQL more object oriented friendly ... elements such as names of entity classes and persistent fields , which are case sensitive. In addition

JPA Annotations for Value Generation

Automatically generated values are mainly useful for primary key fields , but are supported by ObjectDB also for regular (non primary key) persistent fields . At the field level, the @GeneratedValue with an optional GenerationType strategy is specified: The @GeneratedValue annotation

Collections in JPQL and Criteria Queries

. as  path expressions - in navigation to persistent collection fields . IS [NOT] EMPTY ... if a specified element is contained in a specified persistent collection field . For example: 'English' MEMBER ... distinguishes between the MEMBER OF operator, which should be used for checking a collection field

UPDATE SET Queries in JPA/JPQL

the entity objects into an EntityManager . Updating the relevant entity object fields   ... supported. The SET clause defines one or more field update expressions (using the range variable name - if defined). Multiple field update expressions, separated by commas, are also allowed

Locking in JPA

a version field . During commit (and flush ), ObjectDB checks every database object that has to be updated ... is completely automatic and enabled by default in ObjectDB, regardless if a version field

JPA Metamodel API

The JPA Metamodel API, which is introduced in JPA 2.0, enables examining the classes, fields and properties of the persistent object model, similarly to the Java reflection API. The main interface of the JPA Metamodel API is: Types (mainly classes) and attributes (persistent field and properties

JPA Annotations for Access Modes

Persistence fields can either be accessed by JPA directly (as fields ) or indirectly (as properties and get/set methods). JPA 2 provides an annotation and an enum for setting the access mode: More details are provided in chapter 2 of the ObjectDB manual.

SELECT clause (JPQL / Criteria API)

path expressions , such as c.name , in query results is referred to as projection. The field values ... value path expressions can be used in the SELECT clause. Collection and map fields cannot be included

Query Parameters in JPA

). getSingleResult (); } The WHERE clause reduces the query results to Country objects whose name field value ... , a comparison of :name to a field whose type is String indicates that the type of :name itself is String

JPA Criteria API Queries

;the criteria API may be preferred. For example, building a dynamic query based on fields that a user fills at runtime in a form that contains many optional fields - is expected to be cleaner when using

Updating JPA Entity Objects

by fields that are marked with CascadeType . PERSIST or CascadeType . ALL are also persisted

What are the main benefits of using ObjectDB?

fields can be stored by ObjectDB simply as part of the containing object. Relational databases lack

JPA Annotations for Relationships

Relationships are persistent fields in persistable classes that reference other entity objects. The four relationship modes are represented by the following annotations: Unlike ORM JPA implementations, ObjectDB does not enforce specifying any of the annotations above. Specifying a relationship

JPA Annotations

JPA defines dozens of annotations that can be divided into the following groups: Annotations for JPA aware classes: Annotations for fields in JPA persistable classes: Annotations for additional JPA configuration: Annotations for JPA lifecycle event callbacks: Java EE container annotations: Many

JPA Metamodel API Attributes

The following interfaces and enum types represent attributes (persistent fields and properties) in the JPA Metamodel API: See the Metamodel Attribute Interface Hierarchy section for more details and examples.

JPA Queries

that is known only at runtime (e.g. depending on which fields are filled by a user in a form

StateManager.replacingBooleanField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager boolean replacingBooleanField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingCharField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager char replacingCharField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingByteField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager byte replacingByteField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingShortField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager short replacingShortField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingIntField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager int replacingIntField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingLongField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager long replacingLongField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingFloatField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager float replacingFloatField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingDoubleField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager double replacingDoubleField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingStringField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager String replacingStringField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

StateManager.replacingObjectField(pc,field) - JDO Method

JDO Method in javax.jdo.spi.StateManager Object replacingObjectField (   PersistenceCapable pc,    int  field ) The replacement value of the field in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: the new value for the field Since: JDO 1.0

javax.jdo.FetchPlan.DETACH_UNLOAD_FIELDS

JDO Static Field in javax.jdo.FetchPlan DETACH_UNLOAD_ FIELDS For use with PersistenceManager.detachCopy and setDetachmentOptions . Specifies that fields that are loaded but not in the current fetch plan should be unloaded prior to detachment. Since: JDO 2.0

javax.jdo.FetchPlan.DETACH_LOAD_FIELDS

JDO Static Field in javax.jdo.FetchPlan DETACH_LOAD_ FIELDS For use with PersistenceManager.detachCopy and setDetachmentOptions . Specifies that fields that are not loaded but are in the current fetch plan should be loaded prior to detachment. Since: JDO 2.0

Step 2: Define a JPA Entity Class

implements Serializable { private static final long serialVersionUID = 1L; // Persistent Fields : @Id ... . Besides the @Entity annotation and the id field (and its annotations) - the Guest class is an ordinary Java

Step 2: Define a JPA Entity Class

static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private ... and the id field (and its annotations) - the Guest class is an ordinary Java class. The next step is adding

Step 4: Add a Servlet Class

; guestDao field automatically (since the field is marked with the  @EJB annotation). The next step

Step 2: Entity Class and Persistence Unit

fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private String

Step 4: Add a Servlet Class

the application server into the guestDao field automatically (since the field is marked with the @EJB

Step 2: Entity Class and Persistence Unit

fill the fields with arbitrary values to enable it. A new entity class that should represent Guest ... final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private String

Step 1: Install BIRT and ObjectDB Driver

selecting Help Install New Software... In the [Work with] field enter the BIRT update site url. http ... ] dialog box by selecting Help Install New Software... In the [Work with] field enter the ObjectDB

Step 2: Define a JPA Entity Class

should represent Point objects in the database. Apart from the @Entity annotation and the id field

JDO Predefined ID Classes

for persistence capable classes with a simple single field primary key: Object IDs are used in many ... but should not be used as the type of a primary key field in a persistence capable class. For example, to use a String primary key define a primary key field of type String : @PersistenceCapable public

[ODB1] Chapter 2 - A Quick Tour

collections) can be stored only as fields of persistent classes. In addition, objects are stored ... . Predefined Java types like ArrayList , String and Date can be stored in the database only as fields ... public class Person { 4 5 // Persistent Fields : 6 private String firstName; 7 private String lastName; 8

javax.jdo.spi.StateManager

boolean getBooleanField (PersistenceCapable pc, int  field , boolean currentValue) Return the value for the field . Parameters: pc - the calling PersistenceCapable instance field - the field number currentValue - the current value of the field Return: the new value for the field

[ODB1] Chapter 5 - JDO Connections

. The default in ObjectDB is true , indicating that persistent object fields are the same before ... fields to be assigned default values. The content of a hollow object is automatically reread from

JDO Annotations for Index Definition

The following annotations are used to define indexes on persistent fields : The Index Definition section of the ObjectDB manual explains these annotations in details.

JDO Annotations for Classes

JDO supports two modes of persistable classes that can be set by the following annotations: Non persistable classes that should be enhanced (because of accessing persistent fields of other classes directly) can be marked with: The identity mode of persistence capable classes can be specified by using: