📄 flushvisitor.java
字号:
//$Id: FlushVisitor.java,v 1.1.2.1 2003/11/27 11:57:30 oneovthafew Exp $
package net.sf.hibernate.impl;
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.collection.PersistentCollection;
import net.sf.hibernate.type.PersistentCollectionType;
/**
* Process collections reachable from an entity. This
* visitor assumes that wrap was already performed for
* the entity.
*
* @author Gavin King
*/
class FlushVisitor extends AbstractVisitor {
private Object owner;
Object processCollection(Object collection, PersistentCollectionType type)
throws HibernateException {
if (collection!=null) {
SessionImpl session = getSession();
final PersistentCollection coll;
if ( ( (PersistentCollectionType) type ).isArrayType() ) {
coll = session.getArrayHolder(collection);
}
else {
coll = (PersistentCollection) collection;
}
session.updateReachableCollection(coll, type, owner);
}
return null;
}
FlushVisitor(SessionImpl session, Object owner) {
super(session);
this.owner = owner;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -