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

org.hibernate.engine.internal.ImmutableEntityEntryFactory Maven / Gradle / Ivy

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

import java.io.Serializable;
import java.util.Set;

import org.hibernate.LockMode;
import org.hibernate.engine.spi.EntityEntry;
import org.hibernate.engine.spi.EntityEntryFactory;
import org.hibernate.engine.spi.PersistenceContext;
import org.hibernate.engine.spi.Status;
import org.hibernate.persister.entity.EntityPersister;

/**
 * Factory for the safe approach implementation of {@link org.hibernate.engine.spi.EntityEntry}.
 * 

* Smarter implementations could store less state. * * @author Emmanuel Bernard */ public class ImmutableEntityEntryFactory implements EntityEntryFactory { /** * Singleton access */ public static final ImmutableEntityEntryFactory INSTANCE = new ImmutableEntityEntryFactory(); private ImmutableEntityEntryFactory() { } @Override public EntityEntry createEntityEntry( Status status, Object[] loadedState, Object rowId, Serializable id, Object version, LockMode lockMode, boolean existsInDatabase, EntityPersister persister, boolean disableVersionIncrement, PersistenceContext persistenceContext) { return new ImmutableEntityEntry( status, loadedState, rowId, id, version, lockMode, existsInDatabase, persister, disableVersionIncrement, persistenceContext ); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy