/// <summary>
        /// Factory method. Loads a <see cref="FolderStatusNVL"/> object.
        /// </summary>
        /// <returns>A reference to the fetched <see cref="FolderStatusNVL"/> object.</returns>
        public static FolderStatusNVL GetFolderStatusNVL()
        {
            if (_list == null)
            {
                _list = DataPortal.Fetch <FolderStatusNVL>();
            }

            return(_list);
        }
 /// <summary>
 /// Factory method. Asynchronously loads a <see cref="FolderStatusNVL"/> object.
 /// </summary>
 /// <param name="callback">The completion callback method.</param>
 public static void GetFolderStatusNVL(EventHandler <DataPortalResult <FolderStatusNVL> > callback)
 {
     if (_list == null)
     {
         DataPortal.BeginFetch <FolderStatusNVL>((o, e) =>
         {
             _list = e.Object;
             callback(o, e);
         });
     }
     else
     {
         callback(null, new DataPortalResult <FolderStatusNVL>(_list, null, null));
     }
 }
        /// <summary>
        /// Loads a <see cref="FolderStatusNVL"/> collection from the database or from the cache.
        /// </summary>
        protected void DataPortal_Fetch()
        {
            if (IsCached)
            {
                LoadCachedList();
                return;
            }

            using (var cn = new SqlConnection(Database.DocStoreConnection))
            {
                using (var cmd = new SqlCommand("GetFolderStatusNVL", cn))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cn.Open();
                    var args = new DataPortalHookArgs(cmd);
                    OnFetchPre(args);
                    LoadCollection(cmd);
                    OnFetchPost(args);
                }
            }
            _list = this;
        }
 /// <summary>
 /// Used by async loaders to load the cache.
 /// </summary>
 /// <param name="list">The list to cache.</param>
 internal static void SetCache(FolderStatusNVL list)
 {
     _list = list;
 }
 /// <summary>
 /// Clears the in-memory FolderStatusNVL cache so it is reloaded on the next request.
 /// </summary>
 public static void InvalidateCache()
 {
     _list = null;
 }