17
17
import org .hibernate .Incubating ;
18
18
import org .hibernate .Internal ;
19
19
import org .hibernate .LockMode ;
20
- import org .hibernate .query .Query ;
21
20
import org .hibernate .collection .spi .PersistentCollection ;
22
21
import org .hibernate .internal .util .MarkerObject ;
23
22
import org .hibernate .persister .collection .CollectionPersister ;
@@ -272,6 +271,10 @@ EntityEntry addEntry(
272
271
final EntityPersister persister ,
273
272
final boolean disableVersionIncrement );
274
273
274
+ EntityEntry addReferenceEntry (
275
+ final Object entity ,
276
+ final Status status );
277
+
275
278
/**
276
279
* Is the given collection associated with this persistence context?
277
280
*/
@@ -354,16 +357,6 @@ EntityEntry addEntry(
354
357
*/
355
358
Object proxyFor (EntityHolder holder , EntityPersister persister );
356
359
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
-
367
360
/**
368
361
* Cross between {@link #addEntity(EntityKey, Object)} and {@link #addProxy(EntityKey, Object)}
369
362
* for use with enhancement-as-proxy
@@ -498,13 +491,6 @@ CollectionEntry addInitializedCollection(
498
491
*/
499
492
Object removeProxy (EntityKey key );
500
493
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
-
508
494
/**
509
495
* Return an existing entity holder for the entity key, possibly creating one if necessary.
510
496
* Will claim the entity holder by registering the given entity initializer, if it isn't claimed yet.
@@ -675,45 +661,41 @@ EntityHolder claimEntityHolderIfPossible(
675
661
/**
676
662
* Will entities and proxies that are loaded into this persistence
677
663
* 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)}.
683
667
*
684
668
* @return true, loaded entities/proxies will be made read-only by default;
685
669
* false, loaded entities/proxies will be made modifiable by default.
686
670
*
687
671
* @see org.hibernate.Session#isDefaultReadOnly()
672
+ * @see org.hibernate.Session#isReadOnly(Object)
688
673
*/
689
674
boolean isDefaultReadOnly ();
690
675
691
676
/**
692
677
* Change the default for entities and proxies loaded into this persistence
693
678
* context from modifiable to read-only mode, or from read-only mode to
694
679
* modifiable.
695
- *
680
+ * <p>
696
681
* Read-only entities are not dirty-checked and snapshots of persistent
697
682
* state are not maintained. Read-only entities can be modified, but
698
683
* changes are not persisted.
699
- *
684
+ * <p>
700
685
* When a proxy is initialized, the loaded entity will have the same
701
686
* read-only/modifiable setting as the uninitialized
702
687
* proxy has, regardless of the persistence context's current setting.
703
- *
688
+ * <p>
704
689
* 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)}.
712
692
*
713
693
* @param readOnly true, the default for loaded entities/proxies is read-only;
714
694
* false, the default for loaded entities/proxies is modifiable
715
695
*
716
696
* @see org.hibernate.Session#setDefaultReadOnly(boolean)
697
+ * @see org.hibernate.query.Query#setReadOnly(boolean)
698
+ * @see org.hibernate.Session#isReadOnly(Object)
717
699
*/
718
700
void setDefaultReadOnly (boolean readOnly );
719
701
@@ -733,25 +715,25 @@ EntityHolder claimEntityHolderIfPossible(
733
715
/**
734
716
* Set an unmodified persistent object to read-only mode, or a read-only
735
717
* object to modifiable mode.
736
- *
718
+ * <p>
737
719
* Read-only entities are not dirty-checked and snapshots of persistent
738
720
* state are not maintained. Read-only entities can be modified, but
739
721
* changes are not persisted.
740
- *
722
+ * <p>
741
723
* When a proxy is initialized, the loaded entity will have the same
742
724
* read-only/modifiable setting as the uninitialized
743
725
* proxy has, regardless of the session's current setting.
744
- *
726
+ * <p>
745
727
* If the entity or proxy already has the specified read-only/modifiable
746
728
* setting, then this method does nothing.
747
729
*
748
730
* @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.
751
733
*
752
734
* @see org.hibernate.Session#setDefaultReadOnly
753
735
* @see org.hibernate.Session#setReadOnly
754
- * @see Query#setReadOnly
736
+ * @see org.hibernate.query. Query#setReadOnly
755
737
*/
756
738
void setReadOnly (Object entityOrProxy , boolean readOnly );
757
739
0 commit comments