下面列出了怎么用org.hibernate.collection.internal.PersistentList的API类实例代码及写法,或者点击链接到github查看源代码。
@Override
public PersistentCollection instantiate(SharedSessionContractImplementor session, CollectionPersister persister, Serializable key) {
return new PersistentList( session );
}
@Override
public PersistentCollection wrap(SharedSessionContractImplementor session, Object collection) {
return new PersistentList( session, (List) collection );
}
@Override
public boolean canConvert(final Class type) {
return PersistentBag.class == type || PersistentList.class == type || PersistentSet.class == type;
}