Internal Website Search
51-100 of 200 resultsDuplicatable and Disposable JPA Repository for Unit TestingDuplicatable and Disposable JPA Repository for Unit Testing | |
javax.persistence.NamedNativeQuery JPA Annotation NamedNativeQuery Target: TYPE Implemented Interfaces: Annotation Specifies a named native SQL query. Query names are scoped to the persistence unit . The NamedNativeQuery annotation can be applied to an entity or mapped superclass. Since: JPA 1.0 Public Annotation Attributes | |
javax.persistence.SequenceGenerator on the primary key field or property. The scope of the generator name is global to the persistence unit | |
javax.persistence.NamedNativeQueries JPA Annotation NamedNativeQueries Target: TYPE Implemented Interfaces: Annotation Specifies multiple native SQL named queries. Query names are scoped to the persistence unit . The NamedNativeQueries annotation can be applied to an entity or mapped superclass. See Also: NamedNativeQuery Since: JPA 1 | |
JPA Entity Fields Fields of persistable user defined classes (entity classes, embeddable classes and mapped superclasses) can be classified into the following five groups: Transient fields Persistent fields Inverse ... , persistent and inverse fields) can be used in both entity classes and embeddable classes . However, the last | |
Retrieving JPA Entity Objects The Java Persistence API (JPA) provides various ways to retrieve objects from the database ... of the database. The persistence context serves as a cache of retrieved entity objects. If a requested entity object is not found in the persistence context a new object is constructed and filled | |
javax.persistence.Persistence.PERSISTENCE_PROVIDER JPA Static Field in javax. persistence . Persistence PERSISTENCE _PROVIDER This final String is deprecated and should be removed and is only here for TCK backward compatibility Since: JPA 1.0 | |
Database Explorer of bookmarked entity objects. The [Schema] window shows the user defined persistable types (entity and embeddable classes) in the database and their persistent fields and indexes. The [Query] window enables ... a single object, every column represents a persistent field, and the content of a cell is the value | |
Working with JPA Entity Objects Entity objects are in-memory instances of entity classes ( persistable user defined classes ... the database. An entity object becomes Managed when it is persisted to the database via an EntityManager’s persist method, which must be invoked within an active transaction. On transaction commit | |
javax.persistence.CascadeType.PERSIST JPA Enum Constant in javax. persistence .CascadeType PERSIST Cascade persist operation Since: JPA 1.0 | |
Entity Management Settings" ) specifies whether the Enhancer Agent should be loaded to enhance persistable types on the fly ... . The possible values of the reflection attribute represent different policies: "error" - all persistable ... the reference type for holding non dirty entities in the persistence context of the EntityManager | |
Defining a JPA Entity Class Point objects from the database: package com.objectdb.tutorial; import javax. persistence .Entity; @Entity public class Point { // Persistent Fields: private int x; private int y; // Constructor: Point ... an entity class. An attempt to persist Point objects in the database without marking the Point class | |
JPA Exceptions.Throwable java.lang.Exception java.lang.RuntimeException javax. persistence .PersistenceException javax. persistence .EntityExistsException javax. persistence .EntityNotFoundException javax. persistence .LockTimeoutException javax. persistence .NonUniqueResultException javax. persistence .NoResultException | |
Paths and Types in JPQL and Criteria API Instances of user defined persistable classes (entity classes, mapped super classes and embeddable ... defined persistable classes can participate in direct comparison using the = and operators ... expression) and uses the dot ( . ) operator to navigate through persistent fields to other objects | |
javax.persistence.Query of entities updated or deleted Throws: IllegalStateException - if called for a Java Persistence query ... - if there is no transaction or the persistence context has not been joined to the transaction QueryTimeoutException ... is found not to be a Java Persistence query language SELECT query or a Criteria API query Since: JPA 2.0 | |
javax.persistence.TypedQuery: IllegalStateException - if called for a Java Persistence query language SELECT statement or for a criteria query TransactionRequiredException - if there is no transaction or the persistence context has not ... Throws: IllegalStateException - if the query is found not to be a Java Persistence query language | |
javax.persistence.FlushModeType JPA Enum FlushModeType java.lang.Object ∟ java.lang.Enum ∟ javax. persistence ... is set on the Query or javax. persistence .TypedQuery object, or if the flush mode setting for the persistence context is AUTO (the default) and a flush mode setting has not been specified for the Query or | |
javax.persistence.StoredProcedureQuery: TransactionRequiredException - if there is no transaction or the persistence context has not ... - if the query is found not to be a Java Persistence query language SELECT query or a Criteria API ... IllegalStateException - if invoked on a native query or Java Persistence query language query when the implementation | |
javax.persistence.EntityExistsException.Exception ∟ java.lang.RuntimeException ∟ javax. persistence .PersistenceException ∟ javax. persistence .EntityExistsException Thrown by the persistence provider when EntityManager. persist (Object) is called and the entity already exists. The current transaction, if one is active | |
javax.persistence.OrderColumn a column that is used to maintain the persistent order of a list. The persistence provider is responsible for maintaining the order upon retrieval and in the database. The persistence provider ... for ordering that is visible as persistent state and maintained by the application. The OrderBy annotation | |
javax.persistence.EnumType JPA Enum EnumType java.lang.Object ∟ java.lang.Enum ∟ javax. persistence .EnumType Defines mapping for enumerated types. The constants of this enumerated type specify how a persistent property or field of an enumerated type should be persisted . Since: JPA 1.0 The JPA Persistable Types | |
javax.persistence.PessimisticLockScope JPA Enum PessimisticLockScope java.lang.Object ∟ java.lang.Enum ∟ javax. persistence .PessimisticLockScope Defines the values of the javax. persistence .lock.scope property for pessimistic ... will be locked if the javax. persistence .lock.scope property is specified with a value | |
javax.persistence.SynchronizationType JPA Enum SynchronizationType java.lang.Object ∟ java.lang.Enum ∟ javax. persistence .SynchronizationType Specifies whether the persistence context is always automatically synchronized with the current transaction or whether the persistence context must be explicitly joined to the current | |
javax.persistence.PersistenceContextType JPA Enum PersistenceContextType java.lang.Object ∟ java.lang.Enum ∟ javax. persistence .PersistenceContextType Specifies whether a transaction-scoped or extended persistence context is to be used in PersistenceContext . If not specified, a transaction-scoped persistence context is used | |
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.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.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 | |
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.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.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 | |
[ODB1] Chapter 2 - A Quick Tour.getPersistenceManager("hello.odb"); 14 pm.currentTransaction().begin(); 15 16 // Obtain a persistent list: 17 ... } 27 28 // Add a new string to the persistent list: 29 list.add("Hello World " + list.size()); 30 31 // Display the content of the persistent list: 32 Iterator itr = list.iterator(); 33 while (itr | |
[ODB1] Chapter 9 - ObjectDB Explorer is open. The "Class" window shows all the persistent classes in the database. You can select a class from the list of classes at the top of this window and see all its persistent fields ... represents a persistent field, and the content of a cell is the value of a single field in a single | |
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.JDOHelper PersistenceManagerFactory or persistence unit . See Also: getPersistenceManagerFactory Since: JDO 2.1 ... ;ClassLoader resourceLoader) Returns a named PersistenceManagerFactory or persistence unit ... the persistence unit name, in that order; if name is null, blank or whitespace, it is interpreted as | |
[ODB1] Chapter 7 - JDOQL Queries . An Extent , for instance, can be used to retrieve all the instances of a specified persistent class ... three components: A candidate collection containing persistent objects (usually an Extent ) A candidate class (usually a persistent class) A filter, which is a boolean expression in a Java like syntax The query | |
[ODB1] Chapter 5 - JDO Connections is obtained by the PersistenceManager . On every attempt to modify a persistent object, within an active ... the same persistent object at the same time, and conflicts are detected at commit time ... . javax.jdo.option.NontransactionalWrite Indicates whether or not persistent objects (i.e. objects | |
javax.jdo.annotations.Persistent JDO Annotation Persistent Target: ElementType.FIELD, ElementType.METHOD Implemented Interfaces: Annotation Annotation for defining the persistence of a member. This corresponds to the xml elements ... instances in which a member is not persistent but in the non-embedded instances the member is persistent | |
javax.jdo.annotations.Persistent.persistenceModifier JDO Annotation Attribute in javax.jdo.annotations. Persistent PersistenceModifier ... which a member is not persistent but in the non-embedded instances the member is persistent . Note that it is not portable to specify a member to be not persistent in the non-embedded case and persistent in the embedded usage. Since: JDO 2.1 |