Internal Website Search

51-100 of 200 results

javax.persistence.GenerationType

JPA Enum GenerationType java.lang.Object ∟  java.lang.Enum ∟  javax. persistence ... Indicates that the persistence provider should pick an appropriate strategy for the particular database ... Indicates that the persistence provider must assign primary keys for the entity using a database

ObjectDB Object Database Features

database files (the ObjectDB Doctor ). Standard Persistence APIs ObjectDB is the only Object-Oriented Database with built in support for  JPA 2 . Java Persistence API (JPA) Most features of JPA 2 ... to ObjectDB. Persistence is set using JPA/JDO annotations (e.g. @Entity , @Id , @Index ). Transparent

javax.persistence.PersistenceUtil

JPA Interface PersistenceUtil Utility interface between the application and the persistence provider(s). The PersistenceUtil interface instance obtained from the Persistence class is used to determine the load state of an entity or entity attribute regardless of which persistence provider in

javax.persistence.EntityNotFoundException

.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .EntityNotFoundException Thrown by the persistence provider when an entity ... . The current transaction, if one is active and the persistence context has been joined

javax.persistence.PersistenceUnit

Expresses a dependency on an EntityManagerFactory and its associated persistence unit. Since: JPA 1.0 ... is used. Since: JPA 1.0 String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If specified, the persistence unit for the entity manager

javax.persistence.LockModeType

JPA Enum LockModeType java.lang.Object ∟  java.lang.Enum ∟  javax. persistence ... . persistence .EntityManager methods that take locks ( lock , find , or refresh ) or to the Query ... (increment) to the entity's version column. The persistence implementation is not required to support

javax.persistence.PersistenceUnit.unitName

JPA Annotation Attribute in javax. persistence .PersistenceUnit String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If specified, the persistence unit for the entity manager factory that is accessible in JNDI must have the same name. Since: JPA 1.0

javax.persistence.CascadeType

JPA Enum CascadeType java.lang.Object ∟  java.lang.Enum ∟  javax. persistence .CascadeType ... cascade=ALL is equivalent to cascade={ PERSIST , MERGE, REMOVE, REFRESH, DETACH} . Since: JPA 1.0 Enum ... MERGE Cascade merge operation Since: JPA 1.0 PERSIST Cascade persist operation Since: JPA 1.0 REFRESH

javax.persistence.SharedCacheMode

JPA Enum SharedCacheMode java.lang.Object ∟  java.lang.Enum ∟  javax. persistence .SharedCacheMode Specifies how the provider must use a second-level cache for the persistence unit. Corresponds to the value of the persistence .xml shared-cache-mode element, and returned as the result

EntityManager.persist(entity) - JPA Method

JPA Method in javax. persistence .EntityManager void persist (   Object entity ) Make an instance managed and persistent . Parameters: entity - entity instance Throws ... may be thrown when the persist operation is invoked, or the EntityExistsException or

javax.persistence.Basic

of mapping to a database column. The Basic annotation can be applied to a persistent property or ... for persistent fields and properties of these types. If the Basic annotation is not specified ... is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY

javax.persistence.PersistenceContext.unitName

JPA Annotation Attribute in javax. persistence .PersistenceContext String unitName default "" (Optional) The name of the persistence unit as defined in the persistence .xml file. If the unitName element is specified, the persistence unit for the entity manager that is accessible in JNDI must have the same name. Since: JPA 1.0

javax.persistence.RollbackException

.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .RollbackException Thrown by the persistence provider when () EntityTransaction.commit() fails. See Also: javax. persistence .EntityTransaction.commit () Since: JPA 1.0 Public Constructors

javax.persistence.PessimisticLockScope.NORMAL

JPA Enum Constant in javax. persistence .PessimisticLockScope NORMAL This value defines the default behavior for pessimistic locking. The persistence provider must lock the database row(s) that correspond to the non-collection-valued persistent state of that instance. If a joined inheritance

javax.persistence.LockTimeoutException

JPA Exception LockTimeoutException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .LockTimeoutException Thrown by the persistence provider when an pessimistic

javax.persistence.PessimisticLockException

JPA Exception PessimisticLockException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .PessimisticLockException Thrown by the persistence provider

javax.persistence.Lob

JPA Annotation Lob Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies that a persistent property or field should be persisted as a large object to a database-supported large object ... . The Lob type is inferred from the type of the persistent field or property, and except for string

javax.persistence.EntityManagerFactory

for the persistence unit. When the application has finished using the entity manager factory, and/or ... () Return an instance of Metamodel interface for access to the metamodel of the persistence unit. Return ... methods for the persistence unit. Return: PersistenceUnitUtil interface Throws

javax.persistence.OptimisticLockException

JPA Exception OptimisticLockException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .OptimisticLockException Thrown by the persistence provider when an optimistic

javax.persistence.MapKeyJoinColumn

key constraint when table generation is in effect. If this element is not specified, the persistence ... (Optional) Whether the column is included in SQL INSERT statements generated by the persistence ... boolean updatable default true (Optional) Whether the column is included in SQL UPDATE statements generated by the persistence provider. Since: JPA 2.0

javax.persistence.OneToOne.fetch

JPA Annotation Attribute in javax. persistence .OneToOne FetchType fetch default EAGER (Optional ... is a requirement on the persistence provider runtime that the associated entity must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 1.0

javax.persistence.NonUniqueResultException

JPA Exception NonUniqueResultException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .NonUniqueResultException Thrown by the persistence provider when Query

javax.persistence.OneToMany.fetch

JPA Annotation Attribute in javax. persistence .OneToMany FetchType fetch default LAZY (Optional ... is a requirement on the persistence provider runtime that the associated entities must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 1.0

javax.persistence.MapKey

key for associations of type java.util.Map when the map key is itself the primary key or a persistent field or property of the entity that is the value of the map. If a persistent field or property ... of the persistent field or property of the associated entity that is used as the map key. Default

javax.persistence.ManyToMany.fetch

JPA Annotation Attribute in javax. persistence .ManyToMany FetchType fetch default LAZY (Optional ... is a requirement on the persistence provider runtime that the associated entities must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 1.0

javax.persistence.ManyToOne.fetch

JPA Annotation Attribute in javax. persistence .ManyToOne FetchType fetch default EAGER (Optional ... is a requirement on the persistence provider runtime that the associated entity must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 1.0

javax.persistence.NoResultException

JPA Exception NoResultException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .NoResultException Thrown by the persistence provider when Query.getSingleResult() or

javax.persistence.PersistenceException

.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException Thrown by the persistence provider when a problem occurs. All instances of PersistenceException ... , and QueryTimeoutException will cause the current transaction, if one is active and the persistence context

Persistence.generateSchema(persistenceUnitName,map) - JPA Static Method

JPA Static Method in javax. persistence . Persistence void generateSchema (   String persistenceUnitName,    Map map ) Create database schemas and/or tables and/or ... - the name of the persistence unit map - properties for schema generation; these may also contain

javax.persistence.TransactionRequiredException

JPA Exception TransactionRequiredException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .TransactionRequiredException Thrown by the persistence provider

javax.persistence.PersistenceContext.type

JPA Annotation Attribute in javax. persistence .PersistenceContext PersistenceContextType type default PersistenceContextType.TRANSACTION (Optional) Specifies whether a transaction-scoped persistence context or an extended persistence context is to be used. Since: JPA 1.0

javax.persistence.PersistenceContext.synchronization

JPA Annotation Attribute in javax. persistence .PersistenceContext SynchronizationType synchronization default SynchronizationType.SYNCHRONIZED (Optional) Specifies whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context

javax.persistence.Basic.fetch

JPA Annotation Attribute in javax. persistence .Basic FetchType fetch default EAGER (Optional ... . The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. If not specified, defaults to EAGER . Since: JPA 1.0

javax.persistence.QueryTimeoutException

JPA Exception QueryTimeoutException java.lang.Object ∟  java.lang.Throwable ∟  java.lang.Exception ∟  java.lang.RuntimeException ∟  javax. persistence .PersistenceException ∟  javax. persistence .QueryTimeoutException Thrown by the persistence provider when a query times

javax.persistence.Column

the mapped column for a persistent property or field. If no Column annotation is specified, the default ... is included in SQL INSERT statements generated by the persistence provider. Since: JPA 1.0 int ... in SQL UPDATE statements generated by the persistence provider. Since: JPA 1.0

javax.persistence.Enumerated

JPA Annotation Enumerated Target: METHOD, FIELD Implemented Interfaces: Annotation Specifies that a persistent property or field should be persisted as a enumerated type. The Enumerated annotation ... Since: JPA 1.0 The JPA Persistable Types article explains how to use Enumerated . Public Annotation

javax.persistence.FetchType

JPA Enum FetchType java.lang.Object ∟  java.lang.Enum ∟  javax. persistence .FetchType ... on the persistence provider runtime that data must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime that data should be fetched lazily when it is first accessed

javax.persistence.JoinColumn

, the persistence provider's default foreign key strategy will apply. Since: JPA 2.1 boolean insertable default true (Optional) Whether the column is included in SQL INSERT statements generated by the persistence ... ) Whether the column is included in SQL UPDATE statements generated by the persistence provider. Since: JPA 1.0

javax.persistence.Embeddable

. Each of the persistent properties or fields of the embedded object is mapped to the database table for the entity. Note that the Transient annotation may be used to designate the non- persistent state ... String zip; protected String plusFour; } Since: JPA 1.0 The JPA Persistable Types article explains

javax.persistence.ElementCollection.fetch

JPA Annotation Attribute in javax. persistence .ElementCollection FetchType fetch default LAZY ... is a requirement on the persistence provider runtime that the collection elements must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 2.0

javax.persistence.metamodel.Type

JPA Interface Type Type Parameters: - The type of the represented object or attribute Instances of the type Type represent persistent object or attribute types. Since: JPA 2.0 Public Methods Class ... .PersistenceType getPersistenceType () Return the persistence type. Return: persistence type Since: JPA 2.0

javax.persistence.ManyToMany

should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider ... to the persistence provider runtime. Since: JPA 1.0 String mappedBy default "" The field that owns

javax.persistence.ElementCollection

is a requirement on the persistence provider runtime that the collection elements must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. Since: JPA 2.0 Class targetClass default

javax.persistence.PessimisticLockScope.EXTENDED

JPA Enum Constant in javax. persistence .PessimisticLockScope EXTENDED In addition to the behavior for PessimisticLockScope.NORMAL , element collections and relationships owned by the entity that are contained in join tables will be locked if the javax. persistence .lock.scope property is specified

javax.persistence.metamodel.Metamodel

JPA Interface Metamodel Provides access to the metamodel of persistent entities in the persistence unit. Since: JPA 2.0 Public Methods EmbeddableType embeddable (Class  cls) Return the metamodel embeddable type representing the embeddable class. Parameters: cls - the type of the represented

Step 3: Define an EJB Session Bean

java.util.List; import javax.ejb.Stateless; import javax. persistence .EntityManager; import javax. persistence .PersistenceContext; import javax. persistence .TypedQuery; @Stateless public class GuestDao ... : public void persist (Guest guest) { em. persist (guest); } // Retrieves all the guests: public List

Step 3: Define a Spring DAO Component

; import javax. persistence .EntityManager; import javax. persistence .PersistenceContext; import javax. persistence .TypedQuery; import org.springframework.stereotype.Component; import org.springframework ... void persist (Guest guest) { em. persist (guest); } // Retrieves all the guests: public List getAllGuests

Step 3: Define a Spring DAO Component

.List; import javax. persistence .EntityManager; import javax. persistence .PersistenceContext; import javax. persistence .TypedQuery; import org.springframework.stereotype.Component; import org ... void persist (Guest guest) { em. persist (guest); } // Retrieves all the guests: public List

Step 3: Define an EJB Session Bean

with the following code: package guest; import java.util.List; import javax.ejb.Stateless; import javax. persistence .EntityManager; import javax. persistence .PersistenceContext; import javax. persistence .TypedQuery ... EntityManager em; // Stores a new guest: public void persist (Guest guest) { em. persist (guest

javax.jdo.annotations.Persistent.types

JDO Annotation Attribute in javax.jdo.annotations. Persistent Class[] types default {} Types of the member. Used when the declared member type is a supertype of the actual type that is stored in the member. For example, the declared member type might be an interface type that must contain an object of a concrete type when used for persistence . Since: JDO 2.1