Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | PointedEar | 1 | //$Id: FlushModeType.java 11282 2007-03-14 22:05:59Z epbernard $ |
2 | package javax.persistence; |
||
3 | |||
4 | /** |
||
5 | * Flush mode setting. |
||
6 | * |
||
7 | * When queries are executed within a transaction, if FlushModeType.AUTO is set on the Query object, |
||
8 | * or if the flush mode setting for the persistence context is AUTO (the default) and a flush mode |
||
9 | * setting has not been specified for the Query object, the persistence provider is responsible for |
||
10 | * ensuring that all updates to the state of all entities in the persistence context which could |
||
11 | * potentially affect the result of the query are visible to the processing of the query. |
||
12 | * The persistence provider implementation may achieve this by flushing those entities to the database |
||
13 | * or by some other means. If FlushModeType.COMMIT is set, the effect of updates made to entities in the |
||
14 | * persistence context upon queries is unspecified. |
||
15 | * |
||
16 | * If there is no transaction active, the persistence provider must not flush to the database. |
||
17 | * |
||
18 | * @author Gavin King |
||
19 | */ |
||
20 | public enum FlushModeType { |
||
21 | /** |
||
22 | * Flushing must occur only at transaction commit |
||
23 | */ |
||
24 | COMMIT, |
||
25 | /** |
||
26 | * (Default) Flushing to occur at query execution |
||
27 | */ |
||
28 | AUTO |
||
29 | } |