Class ListType

    • Constructor Detail

      • ListType

        @Deprecated
        public ListType​(TypeFactory.TypeScope typeScope,
                        java.lang.String role,
                        java.lang.String propertyRef)
        Deprecated.
        Use the other constructor
      • ListType

        public ListType​(java.lang.String role,
                        java.lang.String propertyRef)
    • Method Detail

      • instantiate

        public PersistentCollection instantiate​(SharedSessionContractImplementor session,
                                                CollectionPersister persister,
                                                java.io.Serializable key)
        Description copied from class: CollectionType
        Instantiate an uninitialized collection wrapper or holder. Callers MUST add the holder to the persistence context!
        Specified by:
        instantiate in class CollectionType
        Parameters:
        session - The session from which the request is originating.
        persister - The underlying collection persister (metadata)
        key - The owner key.
        Returns:
        The instantiated collection.
      • wrap

        public PersistentCollection wrap​(SharedSessionContractImplementor session,
                                         java.lang.Object collection)
        Description copied from class: CollectionType
        Wrap the naked collection instance in a wrapper, or instantiate a holder. Callers MUST add the holder to the persistence context!
        Specified by:
        wrap in class CollectionType
        Parameters:
        session - The session from which the request is originating.
        collection - The bare collection to be wrapped.
        Returns:
        The wrapped collection.
      • instantiate

        public java.lang.Object instantiate​(int anticipatedSize)
        Description copied from class: CollectionType
        Instantiate an empty instance of the "underlying" collection (not a wrapper), but with the given anticipated size (i.e. accounting for initial capacity and perhaps load factor).
        Specified by:
        instantiate in class CollectionType
        Parameters:
        anticipatedSize - The anticipated size of the instantiated collection after we are done populating it.
        Returns:
        A newly instantiated collection to be wrapped.
      • indexOf

        public java.lang.Object indexOf​(java.lang.Object collection,
                                        java.lang.Object element)
        Overrides:
        indexOf in class CollectionType