Internal Website Search

51-100 of 200 results

Detached Entity Objects

). Retrieval by navigation from detached objects is not supported, so only persistent fields ... . Cascading Detach Marking a reference field with CascadeType . DETACH (or CascadeType ... objects that are referenced by that field (multiple entity objects can be referenced by a collection

Auto Generated Values

Marking a field with the @GeneratedValue annotation specifies that a value will be automatically generated for that field . This is primarily intended for primary key fields but ObjectDB also supports this annotation for non-key numeric persistent fields as well. Several different value generation

JPA Metamodel API

details on managed classes and persistent fields and properties, similarly to the ability ... (); The ManagedType  interface adds methods for exploring managed fields and properties (which are referred ... an ID class when using multiple ID fields or properties. Finally, the EntityType interface adds

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

javax.persistence.AccessType.FIELD

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

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

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

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

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

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

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

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

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

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

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 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.

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

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

Database Management Settings

automatic and enabled by default in ObjectDB, regardless if a version field (which is required by

Strings in JPQL and Criteria Queries

String values may appear in JPQL queries in various forms: as  string literals - e.g. 'abc' , ''. as parameters - when string values are assigned as arguments. as  path expressions - in navigation to persistent string fields . as results of predefined JPQL string manipulation functions

Date and Time in JPQL and Criteria Queries

Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12-31'} , {t '23:59:59'} . as parameters - when date and time values are assigned as arguments. as  path expressions - in navigation to persistent date and time fields . as results of predefined

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.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.providedDoubleField(pc,field,currentValue) - JDO Method

 pc,    int  field ,    double currentValue ) The value of the field requested to be provided to the StateManager . Parameters: pc - the calling PersistenceCapable instance field - the field number currentValue - the current value of the field Since: JDO 1.0

StateManager.providedFloatField(pc,field,currentValue) - JDO Method

 pc,    int  field ,    float currentValue ) The value of the field requested to be provided to the StateManager . Parameters: pc - the calling PersistenceCapable instance field - the field number currentValue - the current value of the field Since: JDO 1.0

StateManager.providedObjectField(pc,field,currentValue) - JDO Method

 pc,    int  field ,    Object currentValue ) The value of the field requested to be provided to the StateManager . Parameters: pc - the calling PersistenceCapable instance field - the field number currentValue - the current value of the field Since: JDO 1.0

StateManager.providedStringField(pc,field,currentValue) - JDO Method

 pc,    int  field ,    String currentValue ) The value of the field requested to be provided to the StateManager . Parameters: pc - the calling PersistenceCapable instance field - the field number currentValue - the current value of the field Since: JDO 1.0

StateManager.isLoaded(pc,field) - JDO Method

,    int  field ) Return true if the field is cached in the calling instance. Parameters: pc - the calling PersistenceCapable instance field - the field number Return: whether the field is cached in the calling instance Since: JDO 1.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

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

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: 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 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 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: 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 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

static final long serialVersionUID = 1L; // Persistent Fields : @Id @GeneratedValue Long id; private

Step 4: Add a Controller Class

. A GuestDao component is automatically constructed and injected by Spring into the guestDao field

Step 2: Define a JPA Entity Class

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

Step 2: Define a JPA Entity Class

objects in the database. Besides the @Entity annotation and the id field (and its annotations

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: