HHH-9204 HHH-9205 : Restore AbstractCollectionPersister.doProcessQueuedOps() removed by HHH-9078; deprecate method added by HHH-9078

This commit is contained in:
Gail Badner 2014-05-19 14:55:18 -07:00
parent f549b88831
commit 420296fd26
3 changed files with 22 additions and 6 deletions

View File

@ -1708,8 +1708,25 @@ public abstract class AbstractCollectionPersister
} }
} }
protected abstract void doProcessQueuedOps(PersistentCollection collection, Serializable key, /**
* Process queued operations within the PersistentCollection.
*
* @param collection The collection
* @param key The collection key
* @param nextIndex The next index to write
* @param session The session
* @throws HibernateException
*
* @deprecated Use {@link #doProcessQueuedOps(org.hibernate.collection.spi.PersistentCollection, java.io.Serializable, org.hibernate.engine.spi.SessionImplementor)}
*/
@Deprecated
protected void doProcessQueuedOps(PersistentCollection collection, Serializable key,
int nextIndex, SessionImplementor session) int nextIndex, SessionImplementor session)
throws HibernateException {
doProcessQueuedOps( collection, key, session );
}
protected abstract void doProcessQueuedOps(PersistentCollection collection, Serializable key, SessionImplementor session)
throws HibernateException; throws HibernateException;
@Override @Override

View File

@ -155,8 +155,7 @@ public class BasicCollectionPersister extends AbstractCollectionPersister {
} }
@Override @Override
protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, SessionImplementor session)
int nextIndex, SessionImplementor session)
throws HibernateException { throws HibernateException {
// nothing to do // nothing to do
} }

View File

@ -193,9 +193,9 @@ public class OneToManyPersister extends AbstractCollectionPersister {
} }
@Override @Override
protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, protected void doProcessQueuedOps(PersistentCollection collection, Serializable id, SessionImplementor session)
int nextIndex, SessionImplementor session) throws HibernateException { throws HibernateException {
writeIndex( collection, collection.queuedAdditionIterator(), id, nextIndex, session ); writeIndex( collection, collection.queuedAdditionIterator(), id, getSize( id, session ), session );
} }
private void writeIndex(PersistentCollection collection, Iterator entries, Serializable id, private void writeIndex(PersistentCollection collection, Iterator entries, Serializable id,