Class MapType

    • Constructor Detail

      • MapType

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

        public MapType​(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.
      • getElementsIterator

        public java.util.Iterator getElementsIterator​(java.lang.Object collection)
        Description copied from class: CollectionType
        Get an iterator over the element set of the collection in POJO mode
        Overrides:
        getElementsIterator in class CollectionType
        Parameters:
        collection - The collection to be iterated
        Returns:
        The iterator.
      • 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.
      • replaceElements

        public java.lang.Object replaceElements​(java.lang.Object original,
                                                java.lang.Object target,
                                                java.lang.Object owner,
                                                java.util.Map copyCache,
                                                SharedSessionContractImplementor session)
                                         throws HibernateException
        Description copied from class: CollectionType
        Replace the elements of a collection with the elements of another collection.
        Overrides:
        replaceElements in class CollectionType
        Parameters:
        original - The 'source' of the replacement elements (where we copy from)
        target - The target of the replacement elements (where we copy to)
        owner - The owner of the collection being merged
        copyCache - The map of elements already replaced.
        session - The session from which the merge event originated.
        Returns:
        The merged collection.
        Throws:
        HibernateException
      • indexOf

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