类 AbstractPersistentCollection

    • 字段详细资料

      • elementRemoved

        protected boolean elementRemoved
      • UNKNOWN

        protected static final Object UNKNOWN
    • 方法详细资料

      • isDirty

        public final boolean isDirty()
        从接口复制的说明: PersistentCollection
        Is the collection dirty? Note that this is only reliable during the flush cycle, after the collection elements are dirty checked against the snapshot.
        指定者:
        isDirty 在接口中 PersistentCollection
        返回:
        true if the collection is dirty
      • empty

        public abstract boolean empty()
        从接口复制的说明: PersistentCollection
        Is the collection empty? (don't try to initialize the collection)
        指定者:
        empty 在接口中 PersistentCollection
        返回:
        false if the collection is non-empty; true otherwise.
      • read

        protected final void read()
        Called by any read-only method of the collection interface
      • readIndexExistence

        protected Boolean readIndexExistence​(Object index)
      • readElementExistence

        protected Boolean readElementExistence​(Object element)
      • readElementByIndex

        protected Object readElementByIndex​(Object index)
      • getCachedSize

        protected int getCachedSize()
      • isConnectedToSession

        protected boolean isConnectedToSession()
      • isInitialized

        protected boolean isInitialized()
      • write

        protected final void write()
        Called by any writer method of the collection interface
      • isOperationQueueEnabled

        protected boolean isOperationQueueEnabled()
        Is this collection in a state that would allow us to "queue" operations?
      • isPutQueueEnabled

        protected boolean isPutQueueEnabled()
        Is this collection in a state that would allow us to "queue" puts? This is a special case, because of orphan delete.
      • isClearQueueEnabled

        protected boolean isClearQueueEnabled()
        Is this collection in a state that would allow us to "queue" clear? This is a special case, because of orphan delete.
      • isInverseCollection

        protected boolean isInverseCollection()
        Is this the "inverse" end of a bidirectional association?
      • isInverseCollectionNoOrphanDelete

        protected boolean isInverseCollectionNoOrphanDelete()
        Is this the "inverse" end of a bidirectional association with no orphan delete enabled?
      • isInverseOneToManyOrNoOrphanDelete

        protected boolean isInverseOneToManyOrNoOrphanDelete()
        Is this the "inverse" end of a bidirectional one-to-many, or of a collection with no orphan delete?
      • replaceQueuedOperationValues

        public final void replaceQueuedOperationValues​(CollectionPersister persister,
                                                       Map copyCache)
        Replace entity instances with copy in copyCache/.
        参数:
        copyCache - - mapping from entity in the process of being merged to managed copy.
      • performQueuedOperations

        protected final void performQueuedOperations()
        After reading all existing elements from the database, add the queued elements to the underlying collection.
      • postAction

        public void postAction()
        从接口复制的说明: PersistentCollection
        After flushing, clear any "queued" additions, since the database state is now synchronized with the memory state.
        指定者:
        postAction 在接口中 PersistentCollection
      • clearOperationQueue

        public final void clearOperationQueue()
      • initialize

        protected final void initialize​(boolean writing)
        Initialize the collection, if possible, wrapping any exceptions in a runtime exception
        参数:
        writing - currently obsolete
        抛出:
        LazyInitializationException - if we cannot initialize
      • setInitialized

        protected final void setInitialized()
      • setDirectlyAccessible

        protected final void setDirectlyAccessible​(boolean directlyAccessible)
      • isDirectlyAccessible

        public boolean isDirectlyAccessible()
        从接口复制的说明: PersistentCollection
        Could the application possibly have a direct reference to the underlying collection implementation?
        指定者:
        isDirectlyAccessible 在接口中 PersistentCollection
        返回:
        true indicates that the application might have access to the underlying collection/array.
      • unsetSession

        public final boolean unsetSession​(SharedSessionContractImplementor currentSession)
        从接口复制的说明: PersistentCollection
        Disassociate this collection from the given session.
        指定者:
        unsetSession 在接口中 PersistentCollection
        参数:
        currentSession - The session we are disassociating from. Used for validations.
        返回:
        true if this was currently associated with the given session
      • prepareForPossibleLoadingOutsideTransaction

        protected void prepareForPossibleLoadingOutsideTransaction()
      • getSnapshot

        protected final Serializable getSnapshot()
        Get the current snapshot from the session
      • wasInitialized

        public final boolean wasInitialized()
        从接口复制的说明: PersistentCollection
        Is this instance initialized?
        指定者:
        wasInitialized 在接口中 PersistentCollection
        返回:
        Was this collection initialized? Or is its data still not (fully) loaded?
      • isRowUpdatePossible

        public boolean isRowUpdatePossible()
        从接口复制的说明: PersistentCollection
        Can each element in the collection be mapped unequivocally to a single row in the database? Generally bags and sets are the only collections that cannot be.
        指定者:
        isRowUpdatePossible 在接口中 PersistentCollection
        返回:
        true if the row for each element is known
      • hasQueuedOperations

        public final boolean hasQueuedOperations()
        从接口复制的说明: PersistentCollection
        Does this instance have any "queued" operations?
        指定者:
        hasQueuedOperations 在接口中 PersistentCollection
        返回:
        true indicates there are pending, queued, delayed operations
      • identityRemove

        public static void identityRemove​(Collection list,
                                          Object entityInstance,
                                          String entityName,
                                          SharedSessionContractImplementor session)
        Removes entity entries that have an equal identifier with the incoming entity instance
        参数:
        list - The list containing the entity instances
        entityInstance - The entity instance to match elements.
        entityName - The entity name
        session - The session
      • getIdentifier

        public Object getIdentifier​(Object entry,
                                    int i)
        从接口复制的说明: PersistentCollection
        Get the identifier of the given collection entry. This refers to the collection identifier, not the identifier of the (possibly) entity elements. This is only valid for invocation on the idbag collection.
        指定者:
        getIdentifier 在接口中 PersistentCollection
        参数:
        entry - The collection entry/element
        i - The assumed identifier (?)
        返回:
        The identifier value
      • getOwner

        public Object getOwner()
        从接口复制的说明: PersistentCollection
        Get the owning entity. Note that the owner is only set during the flush cycle, and when a new collection wrapper is created while loading an entity.
        指定者:
        getOwner 在接口中 PersistentCollection
        返回:
        The owner