类org.hibernate.persister.collection.BasicCollectionPersister源码实例Demo

下面列出了怎么用org.hibernate.persister.collection.BasicCollectionPersister的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: PersistentSortedSet.java
@SuppressWarnings({"unchecked", "UnusedParameters"})
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode)
		throws HibernateException {
	final TreeMap clonedSet = new TreeMap( comparator );
	for ( Object setElement : set ) {
		final Object copy = persister.getElementType().deepCopy( setElement, persister.getFactory() );
		clonedSet.put( copy, copy );
	}
	return clonedSet;
}
 
源代码2 项目: lams   文件: PersistentSortedMap.java
@SuppressWarnings({"unchecked", "UnusedParameters"})
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException {
	final TreeMap clonedMap = new TreeMap( comparator );
	for ( Object o : map.entrySet() ) {
		final Entry e = (Entry) o;
		clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), persister.getFactory() ) );
	}
	return clonedMap;
}
 
源代码3 项目: cacheonix-core   文件: PersisterFactory.java
public static CollectionPersister createCollectionPersister(Configuration cfg, Collection model, CacheConcurrencyStrategy cache, SessionFactoryImplementor factory)
throws HibernateException {
	Class persisterClass = model.getCollectionPersisterClass();
	if(persisterClass==null) { // default behavior
		return model.isOneToMany() ?
			(CollectionPersister) new OneToManyPersister(model, cache, cfg, factory) :
			(CollectionPersister) new BasicCollectionPersister(model, cache, cfg, factory);
	}
	else {
		return create(persisterClass, cfg, model, cache, factory);
	}

}
 
源代码4 项目: cacheonix-core   文件: PersistentSortedSet.java
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) 
throws HibernateException {
	//if (set==null) return new Set(session);
	TreeMap clonedSet = new TreeMap(comparator);
	Iterator iter = set.iterator();
	while ( iter.hasNext() ) {
		Object copy = persister.getElementType().deepCopy( iter.next(), entityMode, persister.getFactory() );
		clonedSet.put(copy, copy);
	}
	return clonedSet;
}
 
源代码5 项目: cacheonix-core   文件: PersistentSortedMap.java
protected Serializable snapshot(BasicCollectionPersister persister, EntityMode entityMode) throws HibernateException {
	TreeMap clonedMap = new TreeMap(comparator);
	Iterator iter = map.entrySet().iterator();
	while ( iter.hasNext() ) {
		Map.Entry e = (Map.Entry) iter.next();
		clonedMap.put( e.getKey(), persister.getElementType().deepCopy( e.getValue(), entityMode, persister.getFactory() ) );
	}
	return clonedMap;
}
 
源代码6 项目: lams   文件: StandardPersisterClassResolver.java
private Class<BasicCollectionPersister> basicCollectionPersister() {
	return BasicCollectionPersister.class;
}
 
 类所在包
 类方法
 同包方法