1 /*
2  * Copyright (c) 2008, 2019 Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v. 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0,
7  * or the Eclipse Distribution License v. 1.0 which is available at
8  * http://www.eclipse.org/org/documents/edl-v10.php.
9  *
10  * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11  */

12
13 // Contributors:
14 //     Linda DeMichiel - 2.1
15 //     Linda DeMichiel - 2.0
16
17 package javax.persistence;
18
19 /**
20  * Used as the value of the
21  * <code>javax.persistence.cache.storeMode</code> property to specify
22  * the behavior when data is read from the database and when data is
23  * committed into the database.
24  *
25  * @since 2.0
26  */

27 public enum CacheStoreMode {
28
29     /**
30      * Insert entity data into cache when read from database
31      * and insert/update entity data when committed into database: 
32      * this is the default behavior. Does not force refresh
33      * of already cached items when reading from database.
34      */

35     USE,
36
37     /**
38      * Don't insert into cache. 
39      */

40     BYPASS,
41
42     /**
43      * Insert/update entity data into cache when read 
44      * from database and when committed into database. 
45      * Forces refresh of cache for items read from database.
46      */

47     REFRESH
48 }
49