Package org.hibernate

Class Hibernate.CollectionInterface<C>

  • Type Parameters:
    C - the type of collection, for example, List&lt;User&gt;
    Enclosing class:

    public static final class Hibernate.CollectionInterface<C>
    extends Object
    Operations for obtaining references to persistent collections of a certain type.
    • Method Detail

      • createDetachedInstance

        public C 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.
        an uninitialized persistent collection
      • createNewInstance

        public C createNewInstance()
        Instantiate an empty collection of the type represented by this object.
        a newly-instantiated empty collection