Package org.hibernate
Class Hibernate.CollectionInterface<C>
java.lang.Object
org.hibernate.Hibernate.CollectionInterface<C>
- Type Parameters:
C- the type of collection, for example,List<User>
- Enclosing class:
Hibernate
Operations for obtaining references to persistent collections of a certain type.
- Since:
- 6.0
-
Method Summary
Modifier and TypeMethodDescriptionObtain a detached, uninitialized persistent collection of the type represented by this object.Instantiate an empty collection of the type represented by this object.
-
Method Details
-
createDetachedInstance
Obtain a detached, uninitialized persistent collection of the type represented by this object.The returned wrapper object is not associated with any session, and cannot be initialized by calling
Hibernate.initialize(Object). It can be used to represent an uninitialized collection when working with a detached object graph.- Returns:
- an uninitialized persistent collection
-
createNewInstance
Instantiate an empty collection of the type represented by this object.- Returns:
- a newly-instantiated empty collection
-