org.hibernate.ReadOnlyMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* SPDX-License-Identifier: LGPL-2.1-or-later
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate;
import jakarta.persistence.FindOption;
/**
* A {@link jakarta.persistence.FindOption} which requests that
* entities be loaded in {@link #READ_ONLY} mode or in regular
* {@link #READ_WRITE} mode.
*
* @since 7.0
*
* @see Session#setDefaultReadOnly(boolean)
* @see Session#find(Class, Object, FindOption...)
*
* @author Gavin King
*/
public enum ReadOnlyMode implements FindOption {
/**
* Specifies that an entity should be loaded in read-only mode.
*
* Read-only entities are not dirty-checked and snapshots of
* persistent state are not maintained. Read-only entities can
* be modified, but changes are not persisted.
*/
READ_ONLY,
/**
* Specifies that an entity should be loaded in the default
* modifiable mode, regardless of the default mode of the
* session.
*/
READ_WRITE
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy