NPersistence Reference Guide
Overload List
Name | Description |
---|---|
Find<(Of <<'(T>)>>)(Type, Object) | 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. |
Find<(Of <<'(T>)>>)(Type, Object, LockModeType) | 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 the persistence context,
it is returned from there, and the effect of this method is
the same as if the lock method had been called on the entity.
If the entity is found within the persistence context and the
lock mode type is pessimistic and the entity has a version
attribute, the persistence provider must perform optimistic
version checks when obtaining the database lock. If these
checks fail, the OptimisticLockException will be thrown.
If the lock mode type is pessimistic and the entity instance
is found but cannot be locked:
|
Find<(Of <<'(T>)>>)(Type, Object, Dictionary<(Of <<'(String, Object>)>>)) | 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
context, it is returned from there.
If a vendor-specific property or hint is not recognized,
it is silently ignored. |
Find<(Of <<'(T>)>>)(Type, Object, LockModeType, Dictionary<(Of <<'(String, Object>)>>)) | 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 to the specified lock type.
If the entity instance is contained in the persistence context,
it is returned from there.
If the entity is found
within the persistence context and the lock mode type
is pessimistic and the entity has a version attribute, the
persistence provider must perform optimistic version checks
when obtaining the database lock. If these checks fail,
the OptimisticLockException will be thrown.
If the lock mode type is pessimistic and the entity instance
is found but cannot be locked:
|