All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.ReadOnlyMode Maven / Gradle / Ivy

There is a newer version: 7.0.0.Beta3
Show newest version
/*
 * 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