本文整理汇总了C#中IResultTransformer类的典型用法代码示例。如果您正苦于以下问题:C# IResultTransformer类的具体用法?C# IResultTransformer怎么用?C# IResultTransformer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IResultTransformer类属于命名空间,在下文中一共展示了IResultTransformer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init(ISession session, ISearchFactoryImplementor searchFactoryImplementor,
IResultTransformer transformer, string[] aliases)
{
Init(session, searchFactoryImplementor);
this.transformer = transformer;
this.aliases = aliases;
}
示例2: Session
public Session(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<LogModel> logDao, IDao<Customer> customerDao)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.logDao = logDao;
this.customerDao = customerDao;
}
示例3: GetResultColumnOrRow
protected override object GetResultColumnOrRow(object[] row, IResultTransformer resultTransformer, IDataReader rs,
ISessionImplementor session)
{
object[] result;
string[] aliases;
if (translator.HasProjection)
{
IType[] types = translator.ProjectedTypes;
result = new object[types.Length];
string[] columnAliases = translator.ProjectedColumnAliases;
for (int i = 0; i < result.Length; i++)
{
result[i] = types[i].NullSafeGet(rs, columnAliases[i], session, null);
}
aliases = translator.ProjectedAliases;
}
else
{
result = row;
aliases = userAliases;
}
return translator.RootCriteria.ResultTransformer.TransformTuple(result, aliases);
}
示例4: SetResultTransformerIfNotNull
public static void SetResultTransformerIfNotNull(this ICriteria criteria, IResultTransformer transformer)
{
if (transformer != null)
criteria.SetResultTransformer(transformer);
else
criteria.SetResultTransformer(new RootEntityResultTransformer());
}
示例5: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
return new HolderInstantiator(ResolveResultTransformer(selectNewTransformer, customTransformer),
queryReturnAliases);
}
示例6: LinqProvider
//this.Add("LinqProvider - LinQ Equals ", () => from model in accountDao.Query() where model.No == 0L select model);
//this.Add("LinqProvider - LinQ Oracle Left Join", () =>
// from model in accountDao.Query()
// from customer in bankDao.Query()
// where model.Customer.Id == customer.Id.OraclePlus()
// select model);
public LinqProvider(IResultTransformer resultTransformer, IDao<Customer> customerDao, IDao<Account> accountDao)
: base(resultTransformer)
{
this.customerDao = customerDao;
this.accountDao = accountDao;
inList = new[] {"Onur", "Oğuz"};
}
示例7: Session
public Session(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<LogModel> logDao, ISessionProviderFactory<NHibernateStatelessSession> sessionProviderFactory)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.logDao = logDao;
logSessionProvider = sessionProviderFactory.Build("LOG");
}
示例8: AutoMap
public AutoMap(IResultTransformer resultTransformer, IDao<Bank> bankDao, IDao<Account> accountDao, IDao<Customer> customerDao, IMapper mapper)
: base(resultTransformer)
{
this.bankDao = bankDao;
this.accountDao = accountDao;
this.customerDao = customerDao;
this.mapper = mapper;
}
示例9: GetCustomerOrderHistory
private static IList<CustomerOrderHistory> GetCustomerOrderHistory(string customerId, IResultTransformer transformer) {
var query =
UnitOfWork.CurrentSession.GetNamedQuery("NSoft.NFramework.Data.NHibernateEx.Domain.Northwind.GetCustomerOrderHistory",
new NHParameter("CustomerId", customerId, TypeFactory.GetStringType(255)));
query.SetResultTransformer(transformer);
return query.List<CustomerOrderHistory>();
}
示例10: HolderInstantiator
public HolderInstantiator(
IResultTransformer transformer,
string[] queryReturnAliases
)
{
this.transformer = transformer;
this.queryReturnAliases = queryReturnAliases;
}
示例11: QueryParameters
public QueryParameters(IType[] positionalParameterTypes, object[] positionalParameterValues,
IDictionary<string, LockMode> lockModes, RowSelection rowSelection, bool cacheable,
string cacheRegion, string comment, bool isLookupByNaturalKey, IResultTransformer transformer)
: this(
positionalParameterTypes, positionalParameterValues, null, lockModes, rowSelection, false, cacheable, cacheRegion,
comment, null, transformer)
{
NaturalKeyLookup = isLookupByNaturalKey;
}
示例12: QueryParameters
public QueryParameters(IDictionary<string, TypedValue> namedParameters, IDictionary<string, LockMode> lockModes, RowSelection rowSelection, bool isReadOnlyInitialized,
bool readOnly, bool cacheable, string cacheRegion, string comment, bool isLookupByNaturalKey, IResultTransformer transformer)
: this(
ArrayHelper.EmptyTypeArray, ArrayHelper.EmptyObjectArray, namedParameters, lockModes, rowSelection, isReadOnlyInitialized, readOnly, cacheable, cacheRegion, comment, null,
transformer)
{
// used by CriteriaTranslator
NaturalKeyLookup = isLookupByNaturalKey;
}
示例13: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
//todo ÐÞ¸ÄÔ´Âë
if (customTransformer != null)
return new HolderInstantiator(customTransformer, queryReturnAliases);
else
return new HolderInstantiator(selectNewTransformer, queryReturnAliases);
}
示例14: CreateClassicHolderInstantiator
public static HolderInstantiator CreateClassicHolderInstantiator(ConstructorInfo constructor,
IResultTransformer transformer)
{
if (constructor != null)
{
return new HolderInstantiator(new AliasToBeanConstructorResultTransformer(constructor), null);
}
else
{
return new HolderInstantiator(transformer, null);
}
}
示例15: GetHolderInstantiator
public static HolderInstantiator GetHolderInstantiator(IResultTransformer selectNewTransformer,
IResultTransformer customTransformer,
string[] queryReturnAliases)
{
if (selectNewTransformer != null)
{
return new HolderInstantiator(selectNewTransformer, queryReturnAliases);
}
else
{
return new HolderInstantiator(customTransformer, queryReturnAliases);
}
}