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


Java SessionImplementor.internalLoad方法代码示例

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


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

示例1: replace

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
public Object replace(
		Object original, 
		Object target,
		SessionImplementor session, 
		Object owner, 
		Map copyCache)
throws HibernateException {
	if (original==null) {
		return null;
	}
	else {
		String entityName = session.bestGuessEntityName(original);
		Serializable id = ForeignKeys.getEntityIdentifierIfNotUnsaved( 
				entityName, 
				original, 
				session 
			);
		return session.internalLoad( 
				entityName, 
				id, 
				false, 
				false
			);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:26,代码来源:AnyType.java

示例2: resolveIdentifier

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
/**
 * Resolve an identifier via a load.
 *
 * @param id The entity id to resolve
 * @param session The orginating session.
 * @return The resolved identifier (i.e., loaded entity).
 * @throws org.hibernate.HibernateException Indicates problems performing the load.
 */
protected final Object resolveIdentifier(Serializable id, SessionImplementor session) throws HibernateException {
	boolean isProxyUnwrapEnabled = unwrapProxy &&
			session.getFactory()
					.getEntityPersister( getAssociatedEntityName() )
					.isInstrumented( session.getEntityMode() );

	Object proxyOrEntity = session.internalLoad(
			getAssociatedEntityName(),
			id,
			eager,
			isNullable() && !isProxyUnwrapEnabled
	);

	if ( proxyOrEntity instanceof HibernateProxy ) {
		( ( HibernateProxy ) proxyOrEntity ).getHibernateLazyInitializer()
				.setUnwrap( isProxyUnwrapEnabled );
	}

	return proxyOrEntity;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:29,代码来源:EntityType.java

示例3: assemble

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
public Object assemble(
	Serializable cached,
	SessionImplementor session,
	Object owner)
throws HibernateException {

	ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
	return e==null ? null : session.internalLoad(e.entityName, e.id, false, false);
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:10,代码来源:AnyType.java

示例4: assemble

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
public Object assemble(
	Serializable cached,
	SessionImplementor session,
	Object owner) throws HibernateException {
	if (cached==null) return null;
	Serializable[] o = (Serializable[]) cached;
	Multiplicity m = new Multiplicity();
	m.count = ( (Integer) o[0] ).intValue();
	m.glarch = o[1]==null ? 
		null : 
		(GlarchProxy) session.internalLoad( Glarch.class.getName(), o[1], false, false );
	return m;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:14,代码来源:MultiplicityType.java

示例5: resolveAny

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
private Object resolveAny(String entityName, Serializable id, SessionImplementor session)
throws HibernateException {
	return entityName==null || id==null ?
			null : session.internalLoad( entityName, id, false, false );
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:6,代码来源:AnyType.java


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