public override object ReadFrom(DbDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
        {
            object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
            object index   = role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

            AddDuringInitialize(index, element);
            return(element);
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="rs"></param>
        /// <param name="persister"></param>
        /// <param name="owner"></param>
        /// <returns></returns>
        public override object ReadFrom(IDataReader rs, ICollectionPersister persister, object owner)
        {
            object element = persister.ReadElement(rs, owner, Session);
            object index   = persister.ReadIndex(rs, Session);

            map[index] = element;
            return(element);
        }
        public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
        {
            object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
            object index   = role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

            if (element != null)
            {
                map[index] = element;
            }
            return(element);
        }
Beispiel #4
0
        public override object ReadFrom(DbDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
        {
            object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
            int    index   = (int)role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

            for (int i = tempList.Count; i <= index; i++)
            {
                tempList.Add(null);
            }
            tempList[index] = element;
            return(element);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="rs"></param>
        /// <param name="persister"></param>
        /// <param name="owner"></param>
        /// <returns></returns>
        public override object ReadFrom(IDataReader rs, ICollectionPersister persister, object owner)
        {
            object element = persister.ReadElement(rs, owner, Session);
            int    index   = ( int )persister.ReadIndex(rs, Session);

            for (int i = tempList.Count; i <= index; i++)
            {
                tempList.Insert(i, null);
            }
            tempList[index] = element;
            return(element);
        }
Beispiel #6
0
		public override object ReadFrom(DbDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
		{
			var element = (T)role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
			int index = (int)role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

			//pad with nulls from the current last element up to the new index
			for (int i = WrappedList.Count; i <= index; i++)
			{
				WrappedList.Insert(i, DefaultForType);
			}

			WrappedList[index] = element;
			return element;
		}
		public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
		{
			object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
			int index = (int) role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);
			for (int i = tempList.Count; i <= index; i++)
			{
				tempList.Add(null);
			}
			tempList[index] = element;
			return element;
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="rs"></param>
		/// <param name="persister"></param>
		/// <param name="owner"></param>
		/// <returns></returns>
		public override object ReadFrom( IDataReader rs, ICollectionPersister persister, object owner )
		{
			object element = persister.ReadElement(rs, owner, Session);
			int index = (int)persister.ReadIndex( rs, Session );

			for( int i=list.Count; i<=index; i++ )
			{
				list.Insert( i, null );
			}

			list[ index ] = element;
			return element;
		}
Beispiel #9
0
        public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
        {
            object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
            object index = role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

            map[index] = element;
            return element;
        }
		public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner)
		{
			object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
			int index = (int) role.ReadIndex(rs, descriptor.SuffixedIndexAliases, Session);

			//pad with nulls from the current last element up to the new index
			for (int i = list.Count; i <= index; i++)
			{
				list.Insert(i, DefaultForType);
			}

			list[index] = element;
			return element;
		}