Home » Search

About find

1-10 of 200Refresh
Manual
63

Retrieving JPA Entity Objects

whose primary key is 1: Employee employee = em.find(Employee.class, 1); Casting of the retrieved object to Employee is not required because find is defined as returning an instance of the same class ... is returned. A similar method, getReference, can be considered the lazy version of find: Employee
Manual
59

Locking in JPA

one atomic operation. For example, the find method has a form that accepts a lock mode: Employee employee = em.find( Employee.class, 1, LockModeType.PESSIMISTIC_WRITE); Similarly, the refresh ... ", 2000); Employee employee = em.find(       Employee.class, 1, LockModeType.PESSIMISTIC_WRITE
JPA Doc
58

find(entityClass, primaryKey)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey ) Find by primary key. Search for an entity of the specified class and primary key. If the entity instance is contained in the persistence context, it is returned from there. Parameters: entityClass - entity
JPA Doc
58

find(entityClass, primaryKey, lockMode)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   LockModeType lockMode ) Find by primary key and lock. Search for an entity of the specified class and primary key and lock it with respect to the specified lock type. If the entity instance is contained in
JPA Doc
58

find(entityClass, primaryKey, lockMode, properties)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   LockModeType lockMode,   Map properties ) Find by primary key and lock, using the specified properties. Search for an entity of the specified class and primary key and lock it with respect
JPA Doc
58

find(entityClass, primaryKey, lockMode, properties)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   LockModeType lockMode,   Map properties ) Find by primary key and lock, using the specified properties. Search for an entity of the specified class and primary key and lock it with respect
JPA Doc
58

find(entityClass, primaryKey, properties)

Method javax.persistence.EntityManager T find(   Class entityClass,   Object primaryKey,   Map properties ) Find by primary key, using the specified properties. Search for an entity of the specified class and primary key. If the entity instance is contained in the persistence
Manual
44

CRUD Operations with JPA

Explains how to use JPA for CRUD database operations (persist, retrieve, update, remove).
Forum
23

find() cost unreasonable time!

, why? Result: =========== find time @ 24.125000 getSons time @ 0.000000 1 : type:Nodes, sons:2 child : 2 child : 3 Iterator time @ 0.000000 find time @ 0.000000 getSons time @ 0.000000 2 : type:Nodes, sons:2 child : 4 child : 5 Iterator time @ 0.000000 find time @ 0.000000 getSons
Forum
21

Problem to use find method on an abstract Class: AbstractMethodError is thrown

use find method mentioning SentenceStatement everything works just fine but when I use this method ... for a better ease    this is the stack trace when I try to find LogicalObject:   08:17:21,359 INFO ... -8080-1) JBAS014101: Failed to find SFSB instance with session ID {[-48, -118, 126, 59, 2, -122, 72