forked from jakartaee/persistence
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finally addresses issue jakartaee#62 Signed-off-by: Gavin King <[email protected]>
- Loading branch information
Showing
7 changed files
with
126 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
api/src/main/java/jakarta/persistence/ManagedEntityMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (c) 2008, 2024 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
// Contributors: | ||
// Gavin King - 4.0 | ||
|
||
package jakarta.persistence; | ||
|
||
/** | ||
* A {@link FindOption} which specifies whether entities are | ||
* to be loaded in {@linkplain #READ_ONLY read only} mode or | ||
* in regular {@linkplain #READ_WRITE modifiable} mode. | ||
* | ||
* @since 4.0 | ||
*/ | ||
public enum ManagedEntityMode implements FindOption { | ||
/** | ||
* Specifies that an entity should be loaded in read-only mode. | ||
* <p> | ||
* Read-only entities can be modified, but changes are not | ||
* synchronized with the database. | ||
*/ | ||
READ_ONLY, | ||
/** | ||
* Specifies that an entity should be loaded in the default | ||
* modifiable mode. | ||
* <p> | ||
* Changes made to modifiable entities are synchronized to | ||
* with the database when the persistence context is flushed. | ||
*/ | ||
READ_WRITE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters