org.hibernate.loader.entity.UniqueEntityLoader 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
JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.loader.entity;
import java.io.Serializable;
import org.hibernate.HibernateException;
import org.hibernate.LockOptions;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
/**
* Loads entities for a EntityPersister
*
* @author Gavin King
* @author Steve Ebersole
*/
public interface UniqueEntityLoader {
/**
* Load an entity instance. If optionalObject is supplied,
* load the entity state into the given (uninitialized) object.
*
* @throws HibernateException indicates problem performing the load.
*
* @deprecated use {@link #load(java.io.Serializable, Object, SharedSessionContractImplementor, LockOptions)} instead.
*/
@SuppressWarnings( {"JavaDoc"})
@Deprecated
Object load(
Serializable id,
Object optionalObject,
SharedSessionContractImplementor session);
/**
* Load an entity instance by id. If optionalObject is supplied (non-null,
* the entity state is loaded into that object instance instead of instantiating a new one.
*
* @param id The id to be loaded
* @param optionalObject The (optional) entity instance in to which to load the state
* @param session The session from which the request originated
* @param lockOptions The lock options.
*
* @return The loaded entity
*
* @throws HibernateException indicates problem performing the load.
*/
Object load(
Serializable id,
Object optionalObject,
SharedSessionContractImplementor session,
LockOptions lockOptions);
default Object load(
Serializable id,
Object optionalObject,
SharedSessionContractImplementor session,
Boolean readOnly) {
return load( id, optionalObject, session );
}
default Object load(
Serializable id,
Object optionalObject,
SharedSessionContractImplementor session,
LockOptions lockOptions,
Boolean readOnly) {
return load( id, optionalObject, session, lockOptions );
}
default Object load(
Object id,
SharedSessionContractImplementor session,
LockOptions lockOptions) {
throw new UnsupportedOperationException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy