7.3.3. Functional Comparison Between Universal DAO and JSR317 (JPA2.0)

This section compares the following functions:

Important

Universal DAO supports only those annotations listed in JPA annotation that can be used for Entity among the annotations defined in JPA. Functions related to annotations not described here cannot be used.

Function comparison (A: Provided B: Partially provided C: Not provided D: Not applicable)
Function Universal DAO JSR317
Supports relationship
C [1] A
CRUD can be executed based on Entity
CRUD SQL can be executed without writing SQL
A
To the manual
A
Search results can be acquired as Java Beans objects A
To the manual
A
An arbitrary SQL statement can be executed A
To the manual
A
SQL can be dynamically assembled B [2]
To the manual
A
Can be executed in a batch A
To the manual
C
Allows deferred loading
when fetching large amounts of data
(can process large amounts
of data without squeezing the heap)
A
To the manual
C
Can search using range for paging. A
To the manual
A
Can number surrogate key values A
To the manual
A
Can execute Bean Validation
when the Entity status is incorporated in the database
C [3] A
Can execute arbitrary processing (callback call)
before and after database access
C [4] A
Exclusive control is possible B [5]
To the manual(optimistic lock)
To the manual(pessimistic lock)
A
[1]Searching for tables with relationships can be supported by creating SQL. Registration, update and deletion are handled by calling the necessary function for each table.
[2]Universal DAO can perform dynamic processing only for conditions and sort items. For details, see SQL dynamic assembly
[3]Nablarch performs validation when data is received from the outside, and converts to Entity and saves to database only when there is no validation error.
[4]If an arbitrary process is required, it is handled by the process that calls the universal DAO.
[5]Universal DAO only supports optimistic locking. Pessimistic lock or lock mode specification at the time of search defined in JSR are not supported. (Pessimistic lock can be realized by using select for update .)