本文整理汇总了C#中ISessionImplementor.InternalLoad方法的典型用法代码示例。如果您正苦于以下问题:C# ISessionImplementor.InternalLoad方法的具体用法?C# ISessionImplementor.InternalLoad怎么用?C# ISessionImplementor.InternalLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISessionImplementor
的用法示例。
在下文中一共展示了ISessionImplementor.InternalLoad方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveIdentifier
protected override object ResolveIdentifier( object value, ISessionImplementor session )
{
System.Type clazz = AssociatedClass;
return IsNullable ?
session.InternalLoadOneToOne( clazz, value ) :
session.InternalLoad( clazz, value );
}
示例2: ResolveIdentifier
/// <summary>
/// Resolves the identifier to the actual object.
/// </summary>
protected object ResolveIdentifier(object id, ISessionImplementor session)
{
string entityName = GetAssociatedEntityName();
bool isProxyUnwrapEnabled = unwrapProxy && session.Factory
.GetEntityPersister(entityName)
.IsInstrumented(session.EntityMode);
object proxyOrEntity = session.InternalLoad(entityName, id, eager, IsNullable && !isProxyUnwrapEnabled);
if (proxyOrEntity.IsProxy())
{
INHibernateProxy proxy = (INHibernateProxy) proxyOrEntity;
proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
}
return proxyOrEntity;
}
示例3: ResolveAny
private object ResolveAny(string entityName, object id, ISessionImplementor session)
{
return entityName == null || id == null ? null : session.InternalLoad(entityName, id, false, false);
}
示例4: Assemble
public override object Assemble(object cached, ISessionImplementor session, object owner)
{
ObjectTypeCacheEntry e = cached as ObjectTypeCacheEntry;
return (e == null) ? null : session.InternalLoad(e.entityName, e.id, false, false);
}
示例5: Replace
public override object Replace(object original, object current, ISessionImplementor session, object owner,
IDictionary copiedAlready)
{
if (original == null)
{
return null;
}
else
{
string entityName = session.BestGuessEntityName(original);
object id = ForeignKeys.GetEntityIdentifierIfNotUnsaved(entityName, original, session);
return session.InternalLoad(entityName, id, false, false);
}
}
示例6: ResolveIdentifier
/// <summary>
/// Resolves the identifier to the actual object.
/// </summary>
protected object ResolveIdentifier(object id, ISessionImplementor session)
{
bool isProxyUnwrapEnabled = unwrapProxy && session.Factory
.GetEntityPersister(GetAssociatedEntityName())
.IsInstrumented(session.EntityMode);
object proxyOrEntity = session.InternalLoad(GetAssociatedEntityName(), id, eager, IsNullable && !isProxyUnwrapEnabled);
INHibernateProxy proxy = proxyOrEntity as INHibernateProxy;
if (proxy!=null)
{
proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
}
return proxyOrEntity;
}
示例7: Assemble
public object Assemble(object cached, ISessionImplementor session, Object owner)
{
if (cached == null)
{
return null;
}
object[] o = (object[]) cached;
Multiplicity m = new Multiplicity();
m.count = (int) o[0];
m.glarch = o[1] == null ?
null :
(GlarchProxy) session.InternalLoad(typeof(Glarch).FullName, o[1], false, false);
return m;
}
示例8: Resolve
private object Resolve( System.Type clazz, object id, ISessionImplementor session )
{
return (clazz == null || id == null ) ?
null :
session.InternalLoad( clazz, id );
}
示例9: ResolveIdentifier
/// <summary>
/// Resolves the identifier to the actual object.
/// </summary>
protected object ResolveIdentifier(object id, ISessionImplementor session)
{
return session.InternalLoad(AssociatedClass, id, eager, IsNullable);
}
示例10: ResolveIdentifier
/// <summary>
/// Resolves the Identifier to the actual object.
/// </summary>
/// <param name="id"></param>
/// <param name="session"></param>
/// <returns></returns>
protected override object ResolveIdentifier( object id, ISessionImplementor session )
{
return session.InternalLoad( AssociatedClass, id );
}
示例11: Replace
public override object Replace(object original, object current, ISessionImplementor session, object owner,
IDictionary copiedAlready)
{
if (original == null)
{
return null;
}
else
{
System.Type entityClass = NHibernateProxyHelper.GuessClass(original);
object id = session.GetEntityIdentifierIfNotUnsaved(original);
return session.InternalLoad(
entityClass,
id,
false,
false
);
}
}
示例12: Assemble
public override object Assemble(object cached, ISessionImplementor session, object owner)
{
ObjectTypeCacheEntry e = (ObjectTypeCacheEntry) cached;
return (cached == null) ? null : session.InternalLoad(e.clazz, e.id, false, false);
}