当前位置: 首页>>代码示例>>Java>>正文


Java PersistentCollection.setSnapshot方法代码示例

本文整理汇总了Java中org.hibernate.collection.spi.PersistentCollection.setSnapshot方法的典型用法代码示例。如果您正苦于以下问题:Java PersistentCollection.setSnapshot方法的具体用法?Java PersistentCollection.setSnapshot怎么用?Java PersistentCollection.setSnapshot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.collection.spi.PersistentCollection的用法示例。


在下文中一共展示了PersistentCollection.setSnapshot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CollectionEntry

import org.hibernate.collection.spi.PersistentCollection; //导入方法依赖的package包/类
/**
 * For collections just loaded from the database
 */
public CollectionEntry(
		final PersistentCollection collection,
		final CollectionPersister loadedPersister,
		final Serializable loadedKey,
		final boolean ignore
) {
	this.ignore=ignore;

	//collection.clearDirty()

	this.loadedKey = loadedKey;
	setLoadedPersister(loadedPersister);

	collection.setSnapshot(loadedKey, role, null);

	//postInitialize() will be called after initialization
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:CollectionEntry.java

示例2: postInitialize

import org.hibernate.collection.spi.PersistentCollection; //导入方法依赖的package包/类
public void postInitialize(PersistentCollection collection) throws HibernateException {
	snapshot = getLoadedPersister().isMutable() ?
			collection.getSnapshot( getLoadedPersister() ) :
			null;
	collection.setSnapshot(loadedKey, role, snapshot);
	if (getLoadedPersister().getBatchSize() > 1) {
		((AbstractPersistentCollection) collection).getSession().getPersistenceContext().getBatchFetchQueue().removeBatchLoadableCollection(this); 
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:CollectionEntry.java

示例3: postFlush

import org.hibernate.collection.spi.PersistentCollection; //导入方法依赖的package包/类
/**
 * Called after a successful flush
 */
public void postFlush(PersistentCollection collection) throws HibernateException {
	if ( isIgnore() ) {
		ignore = false;
	}
	else if ( !isProcessed() ) {
		throw new AssertionFailure( "collection [" + collection.getRole() + "] was not processed by flush()" );
	}
	collection.setSnapshot(loadedKey, role, snapshot);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:CollectionEntry.java

示例4: resetStoredSnapshot

import org.hibernate.collection.spi.PersistentCollection; //导入方法依赖的package包/类
/**
 * Reset the stored snapshot for both the persistent collection and this collection entry. 
 * Used during the merge of detached collections.
 * 
 * @param collection the persistentcollection to be updated
 * @param storedSnapshot the new stored snapshot
 */
public void resetStoredSnapshot(PersistentCollection collection, Serializable storedSnapshot) {
	LOG.debugf("Reset storedSnapshot to %s for %s", storedSnapshot, this);

	if ( fromMerge ) {
		return; // EARLY EXIT!
	}

	snapshot = storedSnapshot;
	collection.setSnapshot( loadedKey, role, snapshot );
	fromMerge = true;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:19,代码来源:CollectionEntry.java


注:本文中的org.hibernate.collection.spi.PersistentCollection.setSnapshot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。