Internal Website Search

1-50 of 168 results

Annotate a Map field with @ElementCollection or @Basic

with @ElementCollection, in the other case with @ Basic . Is @ Basic also a valid annotation for a Map field? And when it is valid why @ Basic is faster at runtime. @Entity public class TestEntity { @ElementCollection private Map values = new HashMap (); @ Basic private Map values = new HashMap (); } best regards

javax.persistence.Basic

JPA Annotation Basic Target: METHOD, FIELD Implemented Interfaces: Annotation The simplest type of mapping to a database column. The Basic annotation can be applied to a persistent property or ... other type that implements java.io.Serializable . The use of the Basic annotation is optional

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with  @ Basic (fetch = FetchType.LAZY ... the problem: import javax.persistence.*; @Entity public class Sample { private String title; @ Basic (fetch = FetchType.LAZY) private String description; @ Basic (fetch = FetchType.LAZY) private String code

@Lob @Basic(fetch = FetchType.LAZY) is loaded when it's not needed

Hello. I have a class Thing that contains OneToMany list of classes Photo. Photo contains  @Lob @ Basic (fetch = FetchType.LAZY) private byte[] content; And after some queries with Thing ... ObjectDB always loads basic types eagerly. Consider replacing byte[] with a wrapper entity (e.g. Data

javax.persistence.metamodel.Attribute$PersistentAttributeType.BASIC

JPA Enum Constant in javax.persistence.metamodel.Attribute $PersistentAttributeType BASIC Basic attribute Since: JPA 2.0

javax.persistence.metamodel.Type$PersistenceType.BASIC

JPA Enum Constant in javax.persistence.metamodel.Type $PersistenceType BASIC Basic type Since: JPA 2.0

javax.persistence.Basic.fetch

JPA Annotation Attribute in javax.persistence. Basic FetchType fetch default EAGER (Optional) Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly

javax.persistence.Basic.optional

JPA Annotation Attribute in javax.persistence. Basic boolean optional default true (Optional) Defines whether the value of the field or property may be null. This is a hint and is disregarded for primitive types; it may be used in schema generation. If not specified, defaults to true . Since: JPA 1.0

JPA Entity Fields

. Basic - for any other persistable type. In JPA only Basic is optional while the other annotations ... { @ Basic ( optional =false) Integer field1; @OneToOne ( cascade = CascadeType . ALL ) MyEntity field2

Chapter 1 - Quick Tour

This chapter demonstrates basic ObjectDB and JPA concepts by introducing a simple example program. After reading this chapter you should be able to write basic programs that create, open and close ObjectDB databases and perform basic CRUD operations (Create/Store, Retrieve, Update and Delete

What's next?

This chapter introduced the basic principles of JPA using ObjectDB. You can go into details by reading the other chapters of this manual. If you prefer to get started with ObjectDB right away you can follow one of the following tutorials to create and run the example program that was described in

Chapter 3 - Using JPA

This chapter explains how to manage ObjectDB databases using the Java Persistence API (JPA). The first two pages introduce basic JPA interfaces and concepts: The next section explains how to use JPA for database CRUD operations: More advanced topics (e.g. locking and events) are discussed in the last section:

ObjectDB 2.9 Developer's Guide

;Demonstrates basic database programming using ObjectDB and JPA.       

JPA Metamodel API

: // Get the underlying Java representation of the type: Class cls = type. getJavaType (); // Get one of BASIC

Paths and Types in JPQL and Criteria API

are considered as basic paths and also serve as a starting point for building more complex paths

javax.persistence.Convert

the conversion of a Basic field or property. It is not necessary to use the Basic annotation or corresponding XML element to specify the Basic type. The Convert annotation should not be used to specify ... will not be portable. The Convert annotation may be applied to a basic attribute or to an element

JPA Tutorials

Tutorial Only basic Java experience is required in order to follow this tutorial. Web Application ... these tutorials requires some familiarity with basic concepts and principles of web applications in

javax.jdo.FetchGroup.BASIC

JDO Static Field in javax.jdo.FetchGroup BASIC For use with addCategory and removeCategory calls. This category includes members of all primitive and immutable object class types as defined in section 6.4 of the specification, including String, Locale, Currency, BigDecimal, and BigInteger; as

javax.persistence.Lob

. The Lob annotation may be used in conjunction with the Basic annotation or the ElementCollection annotation when the element collection value is of basic type. A Lob may be either a binary or character type ... and character-based types defaults to Blob. Example 1: @Lob @ Basic (fetch=LAZY) @Column(name="REPORT

javax.persistence.CollectionTable

the table that is used for the mapping of collections of basic or embeddable types. Applied ... to the embeddable class or basic type are derived from the attributes of the embeddable class or from the basic type according to the default values of the Column annotation. In the case of a basic

Eclipse/JPA Spring MVC Web Tutorial

a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors

Spring MVC and JPA Tutorial

This tutorial demonstrates how to create and run a full Java Spring MVC (Model View Controller) web application using Tomcat (or GlassFish), JPA, ObjectDB and Maven. The demo web application manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. All visitors

Report Generation with BIRT and JPA

This tutorial demonstrates how to create reports based on data in an ObjectDB database using the popular open source Business Intelligence and Reporting Tools (BIRT). In order to keep things as simple as possible - we will use the basic   points.odb ObjectDB database file from the Getting

NetBeans/JPA Web Application Tutorial

application manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple

Java EE Web Tutorial

) see the JPA Web App Tutorial . The demo web application manages a basic guestbook page. Every visitor

NetBeans/JPA Spring MVC Web Tutorial

manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple form

Eclipse/JPA Java EE Tutorial

This is the Eclipse version of the Java EE JPA tutorial. It demonstrates how to create and run a full Java EE 6 MVC (Model View Controller) web application in Eclipse - using GlassFish, ObjectDB and JPA. The demo web application manages a basic guestbook page. Every visitor

Eclipse/JPA Web Application Tutorial

This is the Eclipse version of the JPA Web App tutorial. It demonstrates how to create and run a database driven Java web application in Eclipse - using Tomcat 6, ObjectDB and JPA. The demo web application manages a basic guestbook page. Every visitor can sign the guestbook by

JPA Web Application Tutorial

This tutorial demonstrates how to create and run a database driven Java web application using Tomcat 6, ObjectDB and JPA. The demo web application manages a basic guestbook page. Every visitor can sign the guestbook by filling a simple form. The visitors that have already signed are listed

NetBeans/JPA Java EE Tutorial

This is the NetBeans version of the  Java EE JPA tutorial. It demonstrates how to create and run a full Java EE 6 MVC (Model View Controller) web application in NetBeans - using GlassFish, ObjectDB and JPA. The demo web application manages a basic guestbook page

javax.persistence.Enumerated

may be used in conjunction with the Basic annotation, or in conjunction with the ElementCollection annotation when the element collection value is of basic type. If the enumerated type is not specified ... () {...} ... @Enumerated(STRING) public SalaryRate getPayScale() {...} ... } See Also: Basic ElementCollection

javax.persistence.ElementCollection

JPA Annotation ElementCollection Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies a collection of instances of a basic type or embeddable class. Must be specified if the collection ... void.class (Optional) The basic or embeddable class that is the element type of the collection

javax.persistence.metamodel.BasicType

JPA Interface BasicType Type Parameters: - The type of the represented basic type Super Interfaces: Type Instances of the type BasicType represent basic types (including temporal and enumerated types). Since: JPA 2.0 Public Methods Class getJavaType () Return the represented Java type. Return

javax.persistence.metamodel.Attribute$PersistentAttributeType

JPA Enum PersistentAttributeType java.lang.Object ∟  java.lang.Enum ∟  javax.persistence.metamodel.Attribute $PersistentAttributeType Since: JPA 2.0 Enum Constants BASIC Basic attribute Since: JPA 2.0 ELEMENT_COLLECTION Element collection Since: JPA 2.0 EMBEDDED Embeddable class

javax.persistence.OrderBy

may be applied to an element collection. When OrderBy is applied to an element collection of basic type, the ordering will be by value of the basic objects and the property or field name is not used

javax.persistence.AttributeOverride

JPA Annotation AttributeOverride Target: TYPE, METHOD, FIELD Implemented Interfaces: Annotation Used to override the mapping of a Basic (whether explicit or default) property or field or Id property ... property to override a basic mapping or id mapping defined by the mapped superclass or embeddable

javax.persistence.FetchType

: @ Basic (fetch=LAZY) protected String getName() { return name; } See Also: Basic ElementCollection

javax.persistence.Convert.attributeName

JPA Annotation Attribute in javax.persistence.Convert String attributeName default "" The attributeName element must be specified unless the Convert annotation is on an attribute of basic type or on an element collection of basic type. In these cases, the attributeName element must not be specified. Since: JPA 2.1

javax.persistence.metamodel.Type$PersistenceType

JPA Enum PersistenceType java.lang.Object ∟  java.lang.Enum ∟  javax.persistence.metamodel.Type $PersistenceType Since: JPA 2.0 Enum Constants BASIC Basic type Since: JPA 2.0 EMBEDDABLE Embeddable class Since: JPA 2.0 ENTITY Entity Since: JPA 2.0 MAPPED_SUPERCLASS Mapped superclass

javax.persistence.ElementCollection.targetClass

JPA Annotation Attribute in javax.persistence.ElementCollection Class targetClass default void.class (Optional) The basic or embeddable class that is the element type of the collection. This element is optional only if the collection field or property is defined using Java generics

Path.get(attributeName) - JPA Method

that corresponds to a basic type IllegalArgumentException - if attribute of the given name does not otherwise exist Since: JPA 2.0

javax.persistence.MapKeyEnumerated

JPA Annotation MapKeyEnumerated Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies the enum type for a map key whose basic type is an enumerated type. The MapKeyEnumerated annotation can be applied to an element collection or relationship of type java.util.Map , in conjunction

javax.persistence.MapKeyColumn

JPA Annotation MapKeyColumn Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies the mapping for the key column of a map whose map key is a basic type. If the name element is not specified, it defaults to the concatenation of the following: the name of the referencing relationship

ObjectDB 1.0 Manual

basic database programming using ObjectDB. Subsequent chapters contain detailed instructions

[ODB1] Chapter 2 - A Quick Tour

This chapter introduces basic ObjectDB and JDO concepts, using two sample programs. We start with the HelloWorld sample program, which is not JDO portable because it uses some ObjectDB extensions, but it is a good sample to start with because of its simplicity.  We then proceed with the JDO

[ODB1] Chapter 9 - ObjectDB Explorer

a basic file manager. Using the toolbar and the context menus of this dialog box (right click

JDO Reference (JavaDoc)

This reference contains the API documentation (similar to JavaDoc) of JDO 2.2. The content is derived from the original JDO documentation with some additions and notes. The most basic JDO types are: All the other JDO types are organized into the following sections:

[ODB1] Chapter 7 - JDOQL Queries

a specified order. 7.1  Introduction to JDOQL A basic JDOQL query has the following

[ODB1] Chapter 4 - JDO Metadata

;Metadata for Classes We start with a basic JDO metadata file: A JDO metadata file is an XML file

javax.jdo.FetchGroup

. Since: JDO 2.2 BASIC For use with addCategory and removeCategory calls. This category includes members ... types, including Collection, array, and Map types of basic and relationship types. Since: JDO 2.2