1717import org .hibernate .Incubating ;
1818import org .hibernate .Internal ;
1919import org .hibernate .LockMode ;
20- import org .hibernate .query .Query ;
2120import org .hibernate .collection .spi .PersistentCollection ;
2221import org .hibernate .internal .util .MarkerObject ;
2322import org .hibernate .persister .collection .CollectionPersister ;
@@ -272,6 +271,10 @@ EntityEntry addEntry(
272271 final EntityPersister persister ,
273272 final boolean disableVersionIncrement );
274273
274+ EntityEntry addReferenceEntry (
275+ final Object entity ,
276+ final Status status );
277+
275278 /**
276279 * Is the given collection associated with this persistence context?
277280 */
@@ -354,16 +357,6 @@ EntityEntry addEntry(
354357 */
355358 Object proxyFor (EntityHolder holder , EntityPersister persister );
356359
357- /**
358- * Return the existing {@linkplain EntityHolder#getProxy() proxy} associated with
359- * the given {@link EntityHolder}, or the {@linkplain EntityHolder#getEntity() entity}
360- * if it contains no proxy.
361- *
362- * @deprecated Use {@link #proxyFor(EntityHolder, EntityPersister)} instead.
363- */
364- @ Deprecated ( forRemoval = true )
365- Object proxyFor (EntityHolder holder );
366-
367360 /**
368361 * Cross between {@link #addEntity(EntityKey, Object)} and {@link #addProxy(EntityKey, Object)}
369362 * for use with enhancement-as-proxy
@@ -498,13 +491,6 @@ CollectionEntry addInitializedCollection(
498491 */
499492 Object removeProxy (EntityKey key );
500493
501- // /**
502- // * Retrieve the set of EntityKeys representing nullifiable references
503- // * @deprecated Use {@link #containsNullifiableEntityKey(Supplier)} or {@link #registerNullifiableEntityKey(EntityKey)} or {@link #isNullifiableEntityKeysEmpty()}
504- // */
505- // @Deprecated
506- // HashSet getNullifiableEntityKeys();
507-
508494 /**
509495 * Return an existing entity holder for the entity key, possibly creating one if necessary.
510496 * Will claim the entity holder by registering the given entity initializer, if it isn't claimed yet.
@@ -675,45 +661,41 @@ EntityHolder claimEntityHolderIfPossible(
675661 /**
676662 * Will entities and proxies that are loaded into this persistence
677663 * context be made read-only by default?
678- *
679- * To determine the read-only/modifiable setting for a particular entity
680- * or proxy:
681- * @see PersistenceContext#isReadOnly(Object)
682- * @see org.hibernate.Session#isReadOnly(Object)
664+ * <p>
665+ * To determine the read-only/modifiable setting for a particular
666+ * entity or proxy, call {@link #isReadOnly(Object)}.
683667 *
684668 * @return true, loaded entities/proxies will be made read-only by default;
685669 * false, loaded entities/proxies will be made modifiable by default.
686670 *
687671 * @see org.hibernate.Session#isDefaultReadOnly()
672+ * @see org.hibernate.Session#isReadOnly(Object)
688673 */
689674 boolean isDefaultReadOnly ();
690675
691676 /**
692677 * Change the default for entities and proxies loaded into this persistence
693678 * context from modifiable to read-only mode, or from read-only mode to
694679 * modifiable.
695- *
680+ * <p>
696681 * Read-only entities are not dirty-checked and snapshots of persistent
697682 * state are not maintained. Read-only entities can be modified, but
698683 * changes are not persisted.
699- *
684+ * <p>
700685 * When a proxy is initialized, the loaded entity will have the same
701686 * read-only/modifiable setting as the uninitialized
702687 * proxy has, regardless of the persistence context's current setting.
703- *
688+ * <p>
704689 * To change the read-only/modifiable setting for a particular entity
705- * or proxy that is already in this session:
706- + * @see PersistenceContext#setReadOnly(Object,boolean)
707- * @see org.hibernate.Session#setReadOnly(Object, boolean)
708- *
709- * To override this session's read-only/modifiable setting for entities
710- * and proxies loaded by a Query:
711- * @see Query#setReadOnly(boolean)
690+ * or proxy that is already in this session, call
691+ * {@link #setReadOnly(Object,boolean)}.
712692 *
713693 * @param readOnly true, the default for loaded entities/proxies is read-only;
714694 * false, the default for loaded entities/proxies is modifiable
715695 *
716696 * @see org.hibernate.Session#setDefaultReadOnly(boolean)
697+ * @see org.hibernate.query.Query#setReadOnly(boolean)
698+ * @see org.hibernate.Session#isReadOnly(Object)
717699 */
718700 void setDefaultReadOnly (boolean readOnly );
719701
@@ -733,25 +715,25 @@ EntityHolder claimEntityHolderIfPossible(
733715 /**
734716 * Set an unmodified persistent object to read-only mode, or a read-only
735717 * object to modifiable mode.
736- *
718+ * <p>
737719 * Read-only entities are not dirty-checked and snapshots of persistent
738720 * state are not maintained. Read-only entities can be modified, but
739721 * changes are not persisted.
740- *
722+ * <p>
741723 * When a proxy is initialized, the loaded entity will have the same
742724 * read-only/modifiable setting as the uninitialized
743725 * proxy has, regardless of the session's current setting.
744- *
726+ * <p>
745727 * If the entity or proxy already has the specified read-only/modifiable
746728 * setting, then this method does nothing.
747729 *
748730 * @param entityOrProxy an entity or proxy
749- * @param readOnly if {@code true}, the entity or proxy is made read-only; otherwise, the entity or proxy is made
750- * modifiable.
731+ * @param readOnly if {@code true}, the entity or proxy is made read-only;
732+ * otherwise, the entity or proxy is made modifiable.
751733 *
752734 * @see org.hibernate.Session#setDefaultReadOnly
753735 * @see org.hibernate.Session#setReadOnly
754- * @see Query#setReadOnly
736+ * @see org.hibernate.query. Query#setReadOnly
755737 */
756738 void setReadOnly (Object entityOrProxy , boolean readOnly );
757739
0 commit comments