C# Класс Subtext.Framework.Data.DatabaseObjectProvider

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClearBlogContent ( int blogId ) : void
Create ( Enclosure enclosure ) : int
Create ( Entry entry, int categoryIds ) : int

Creates the specified entry in the back end data store attaching the specified category ids.

Create ( FeedbackItem feedbackItem ) : int
Create ( MetaTag metaTag ) : int
CreateBlog ( string title, string userName, string password, string host, string subfolder ) : bool

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.

CreateBlog ( string title, string userName, string password, string host, string subfolder, int blogGroupId ) : bool

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.

CreateBlogAlias ( BlogAlias alias ) : bool
CreateLink ( Link link ) : int
CreateLinkCategory ( LinkCategory lc ) : int
Delete ( int entryId ) : bool

Deletes the specified entry.

DeleteBlogAlias ( BlogAlias alias ) : bool
DeleteEnclosure ( int enclosureId ) : bool
DeleteImage ( int ImageID ) : bool
DeleteKeyWord ( int id ) : bool
DeleteLink ( int LinkID ) : bool
DeleteLinkCategory ( int CategoryID ) : bool
DeleteMetaTag ( int metaTagId ) : bool
DestroyFeedback ( FeedbackStatusFlag status ) : void
DestroyFeedback ( int id ) : void

Completely deletes the feedback from the system.

GetActiveCategories ( ) : IList
GetBlogAliasById ( int aliasId ) : BlogAlias
GetBlogByDomainAlias ( string host, string subfolder, bool strict ) : BlogInfo
GetBlogById ( int blogId ) : BlogInfo

Gets the blog by id.

GetBlogGroup ( int id, bool activeOnly ) : BlogGroup

Gets the blog group.

GetBlogInfo ( string hostname, string subfolder, bool strict ) : BlogInfo

Returns a BlogInfo instance containing the configuration settings for the blog specified by the Hostname and Application.

Until Subtext supports multiple blogs again (if ever), this will always return the same instance.

GetBlogPosts ( int itemCount, PostConfig pc ) : IList

Returns blog posts that meet the criteria specified in the PostConfig flags.

GetCategories ( CategoryType catType, bool activeOnly ) : IList

Gets the categories for the specified category type.

GetCommentByChecksumHash ( string checksumHash ) : Entry

Searches the data store for the first comment with a matching checksum hash.

GetConditionalEntries ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList

Gets the entries that meet the specific PostType and the PostConfig flags.

This is called to get the main syndicated entries.

GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
GetEntriesByTag ( int itemCount, string tagName ) : IList
GetEntry ( int id, bool includeCategories ) : Entry

Returns an active Entry by the id regardless of which blog it is located in.

GetEntry ( int id, bool activeOnly, bool includeCategories ) : Entry

Returns an Entry with the specified id.

GetEntry ( string entryName, bool activeOnly, bool includeCategories ) : Entry

Returns an Entry with the specified entry name.

GetEntryDay ( DateTime dt ) : EntryDay
GetFeedback ( int id ) : FeedbackItem

Returns the feedback by id.

GetFeedbackCounts ( int &approved, int &needsModeration, int &flaggedAsSpam, int &deleted ) : void

Gets the feedback counts for the various top level statuses.

GetFeedbackForEntry ( Entry parentEntry ) : IList

Returns all the active entries for the specified post.

GetImage ( int imageID, bool activeOnly ) : Image
GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
GetKeyWord ( int KeyWordID ) : KeyWord
GetKeyWords ( ) : IList
GetLink ( int linkID ) : Link
GetLinkCategory ( int categoryId, bool activeOnly ) : LinkCategory

Gets the link category for the specified category id.

GetLinkCategory ( string categoryName, bool activeOnly ) : LinkCategory

Gets the link category for the specified category name.

GetLinkCollectionByPostID ( int PostID ) : IList
GetMetaTagsForBlog ( BlogInfo blog, int pageIndex, int pageSize ) : IPagedCollection
GetMetaTagsForEntry ( Entry entry, int pageIndex, int pageSize ) : IPagedCollection
GetPagedBlogDomainAlias ( BlogInfo blog, int pageIndex, int pageSize ) : PagedCollection
GetPagedBlogs ( string host, int pageIndex, int pageSize, ConfigurationFlags flags ) : PagedCollection

Gets a pageable IList of BlogInfo instances.

GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection

Returns a pageable collection of entries ordered by the id descending. This is used in the admin section.

GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection

Gets the paged feedback.

GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
GetPagedLinks ( int categoryTypeID, int pageIndex, int pageSize, bool sortDescending ) : IPagedCollection
GetPagedReferrers ( int pageIndex, int pageSize, int entryId ) : IPagedCollection
GetPagedViewStats ( int pageIndex, int pageSize, DateTime beginDate, DateTime endDate ) : IPagedCollection
GetPostCollectionByMonth ( int month, int year ) : IList
GetPostsByCategoryArchive ( ) : IList
GetPostsByCategoryID ( int itemCount, int catID ) : IList
GetPostsByDayRange ( DateTime start, DateTime stop, PostType postType, bool activeOnly ) : IList
GetPostsByMonth ( int month, int year ) : IList
GetPostsByMonthArchive ( ) : IList
GetPostsByYearArchive ( ) : IList
GetPreviousAndNextEntries ( int entryId, PostType postType ) : IList

Returns the previous and next entry to the specified entry.

GetTopTags ( int ItemCount ) : int>.IDictionary
InsertImage ( Image _image ) : int
InsertKeyWord ( KeyWord keyWord ) : int
ListBlogGroups ( bool activeOnly ) : IList

Lists the blog groups.

LoadHostInfo ( HostInfo hostInfo ) : HostInfo

Returns the HostInfo for the Subtext installation.

SetEntryCategoryList ( int entryId, int categoryIds ) : bool
SetEntryTagList ( int entryId, IList tags ) : bool
TrackEntry ( EntryView ev ) : bool
TrackEntry ( IEnumerable evc ) : bool
Update ( Enclosure enclosure ) : bool
Update ( Entry entry ) : bool

Saves changes to the specified entry attaching the specified categories.

Update ( FeedbackItem feedbackItem ) : bool

Saves changes to the specified feedback.

Update ( MetaTag metaTag ) : bool
UpdateBlog ( BlogInfo info ) : bool
UpdateBlogAlias ( BlogAlias alias ) : bool
UpdateHost ( HostInfo host ) : bool

Updates the HostInfo instance. If the host record is not in the database, one is created. There should only be one host record.

UpdateImage ( Image image ) : bool
UpdateKeyWord ( KeyWord keyWord ) : bool
UpdateLink ( Link link ) : bool
UpdateLinkCategory ( LinkCategory lc ) : bool

Приватные методы

Метод Описание
FormatEntry ( Entry e, bool UseKeyWords ) : bool
LoadLinkCategoryFromReader ( IDataReader reader ) : LinkCategory
LoadPagedReferrersCollection ( IDataReader reader ) : IPagedCollection

Описание методов

ClearBlogContent() публичный Метод

public ClearBlogContent ( int blogId ) : void
blogId int
Результат void

Create() публичный Метод

public Create ( Enclosure enclosure ) : int
enclosure Subtext.Framework.Components.Enclosure
Результат int

Create() публичный Метод

Creates the specified entry in the back end data store attaching the specified category ids.
public Create ( Entry entry, int categoryIds ) : int
entry Subtext.Framework.Components.Entry Entry.
categoryIds int Category I ds.
Результат int

Create() публичный Метод

public Create ( FeedbackItem feedbackItem ) : int
feedbackItem Subtext.Framework.Components.FeedbackItem
Результат int

Create() публичный Метод

public Create ( MetaTag metaTag ) : int
metaTag Subtext.Framework.Components.MetaTag
Результат int

CreateBlog() публичный Метод

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.
public CreateBlog ( string title, string userName, string password, string host, string subfolder ) : bool
title string
userName string Name of the user.
password string Password.
host string
subfolder string
Результат bool

CreateBlog() публичный Метод

Adds the initial blog configuration. This is a convenience method for allowing a user with a freshly installed blog to immediately gain access to the admin section to edit the blog.
public CreateBlog ( string title, string userName, string password, string host, string subfolder, int blogGroupId ) : bool
title string
userName string Name of the user.
password string Password.
host string
subfolder string
blogGroupId int
Результат bool

CreateBlogAlias() публичный Метод

public CreateBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
Результат bool

CreateLink() публичный Метод

public CreateLink ( Link link ) : int
link Subtext.Framework.Components.Link
Результат int

CreateLinkCategory() публичный Метод

public CreateLinkCategory ( LinkCategory lc ) : int
lc Subtext.Framework.Components.LinkCategory
Результат int

Delete() публичный Метод

Deletes the specified entry.
public Delete ( int entryId ) : bool
entryId int The entry id.
Результат bool

DeleteBlogAlias() публичный Метод

public DeleteBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
Результат bool

DeleteEnclosure() публичный Метод

public DeleteEnclosure ( int enclosureId ) : bool
enclosureId int
Результат bool

DeleteImage() публичный Метод

public DeleteImage ( int ImageID ) : bool
ImageID int
Результат bool

DeleteKeyWord() публичный Метод

public DeleteKeyWord ( int id ) : bool
id int
Результат bool

DeleteLink() публичный Метод

public DeleteLink ( int LinkID ) : bool
LinkID int
Результат bool

DeleteLinkCategory() публичный Метод

public DeleteLinkCategory ( int CategoryID ) : bool
CategoryID int
Результат bool

DeleteMetaTag() публичный Метод

public DeleteMetaTag ( int metaTagId ) : bool
metaTagId int
Результат bool

DestroyFeedback() публичный Метод

public DestroyFeedback ( FeedbackStatusFlag status ) : void
status FeedbackStatusFlag
Результат void

DestroyFeedback() публичный Метод

Completely deletes the feedback from the system.
public DestroyFeedback ( int id ) : void
id int The id.
Результат void

GetActiveCategories() публичный Метод

public GetActiveCategories ( ) : IList
Результат IList

GetBlogAliasById() публичный Метод

public GetBlogAliasById ( int aliasId ) : BlogAlias
aliasId int
Результат BlogAlias

GetBlogByDomainAlias() публичный Метод

public GetBlogByDomainAlias ( string host, string subfolder, bool strict ) : BlogInfo
host string
subfolder string
strict bool
Результат BlogInfo

GetBlogById() публичный Метод

Gets the blog by id.
public GetBlogById ( int blogId ) : BlogInfo
blogId int Blog id.
Результат BlogInfo

GetBlogGroup() публичный Метод

Gets the blog group.
public GetBlogGroup ( int id, bool activeOnly ) : BlogGroup
id int The id.
activeOnly bool if set to true [active only].
Результат Subtext.Framework.Components.BlogGroup

GetBlogInfo() публичный Метод

Returns a BlogInfo instance containing the configuration settings for the blog specified by the Hostname and Application.
Until Subtext supports multiple blogs again (if ever), this will always return the same instance.
public GetBlogInfo ( string hostname, string subfolder, bool strict ) : BlogInfo
hostname string Hostname.
subfolder string Subfolder.
strict bool If false, then this will return a blog record if /// there is only one blog record, regardless if the subfolder and hostname match.
Результат BlogInfo

GetBlogPosts() публичный Метод

Returns blog posts that meet the criteria specified in the PostConfig flags.
public GetBlogPosts ( int itemCount, PostConfig pc ) : IList
itemCount int Item count.
pc PostConfig Pc.
Результат IList

GetCategories() публичный Метод

Gets the categories for the specified category type.
public GetCategories ( CategoryType catType, bool activeOnly ) : IList
catType CategoryType Type of the cat.
activeOnly bool if set to true [active only].
Результат IList

GetCommentByChecksumHash() публичный Метод

Searches the data store for the first comment with a matching checksum hash.
public GetCommentByChecksumHash ( string checksumHash ) : Entry
checksumHash string Checksum hash.
Результат Subtext.Framework.Components.Entry

GetConditionalEntries() публичный Метод

Gets the entries that meet the specific PostType and the PostConfig flags.
This is called to get the main syndicated entries.
public GetConditionalEntries ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList
itemCount int Item count.
postType PostType The type of post to retrieve.
postConfig PostConfig Post configuration options.
includeCategories bool Whether or not to include categories
Результат IList

GetEntriesByCategory() публичный Метод

public GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
itemCount int
catID int
activeOnly bool
Результат IList

GetEntriesByTag() публичный Метод

public GetEntriesByTag ( int itemCount, string tagName ) : IList
itemCount int
tagName string
Результат IList

GetEntry() публичный Метод

Returns an active Entry by the id regardless of which blog it is located in.
public GetEntry ( int id, bool includeCategories ) : Entry
id int Id of the entry
includeCategories bool Whether the entry should have its Categories property populated
Результат Subtext.Framework.Components.Entry

GetEntry() публичный Метод

Returns an Entry with the specified id.
public GetEntry ( int id, bool activeOnly, bool includeCategories ) : Entry
id int Id of the entry
activeOnly bool Whether or not to only return the entry if it is active.
includeCategories bool Whether the entry should have its Categories property populated
Результат Subtext.Framework.Components.Entry

GetEntry() публичный Метод

Returns an Entry with the specified entry name.
public GetEntry ( string entryName, bool activeOnly, bool includeCategories ) : Entry
entryName string Url friendly entry name.
activeOnly bool Whether or not to only return the entry if it is active.
includeCategories bool Whether the entry should have its Categories property populated
Результат Subtext.Framework.Components.Entry

GetEntryDay() публичный Метод

public GetEntryDay ( DateTime dt ) : EntryDay
dt DateTime
Результат EntryDay

GetFeedback() публичный Метод

Returns the feedback by id.
public GetFeedback ( int id ) : FeedbackItem
id int
Результат Subtext.Framework.Components.FeedbackItem

GetFeedbackCounts() публичный Метод

Gets the feedback counts for the various top level statuses.
public GetFeedbackCounts ( int &approved, int &needsModeration, int &flaggedAsSpam, int &deleted ) : void
approved int The approved.
needsModeration int The needs moderation.
flaggedAsSpam int The flagged as spam.
deleted int The deleted.
Результат void

GetFeedbackForEntry() публичный Метод

Returns all the active entries for the specified post.
public GetFeedbackForEntry ( Entry parentEntry ) : IList
parentEntry Subtext.Framework.Components.Entry
Результат IList

GetImage() публичный Метод

public GetImage ( int imageID, bool activeOnly ) : Image
imageID int
activeOnly bool
Результат Subtext.Framework.Components.Image

GetImagesByCategoryID() публичный Метод

public GetImagesByCategoryID ( int catID, bool activeOnly ) : ImageCollection
catID int
activeOnly bool
Результат ImageCollection

GetKeyWord() публичный Метод

public GetKeyWord ( int KeyWordID ) : KeyWord
KeyWordID int
Результат Subtext.Framework.Components.KeyWord

GetKeyWords() публичный Метод

public GetKeyWords ( ) : IList
Результат IList

GetLink() публичный Метод

public GetLink ( int linkID ) : Link
linkID int
Результат Subtext.Framework.Components.Link

GetLinkCategory() публичный Метод

Gets the link category for the specified category id.
public GetLinkCategory ( int categoryId, bool activeOnly ) : LinkCategory
categoryId int The category id.
activeOnly bool if set to true [active only].
Результат Subtext.Framework.Components.LinkCategory

GetLinkCategory() публичный Метод

Gets the link category for the specified category name.
public GetLinkCategory ( string categoryName, bool activeOnly ) : LinkCategory
categoryName string The category name.
activeOnly bool if set to true [active only].
Результат Subtext.Framework.Components.LinkCategory

GetLinkCollectionByPostID() публичный Метод

public GetLinkCollectionByPostID ( int PostID ) : IList
PostID int
Результат IList

GetMetaTagsForBlog() публичный Метод

public GetMetaTagsForBlog ( BlogInfo blog, int pageIndex, int pageSize ) : IPagedCollection
blog BlogInfo
pageIndex int
pageSize int
Результат IPagedCollection

GetMetaTagsForEntry() публичный Метод

public GetMetaTagsForEntry ( Entry entry, int pageIndex, int pageSize ) : IPagedCollection
entry Subtext.Framework.Components.Entry
pageIndex int
pageSize int
Результат IPagedCollection

GetPagedBlogDomainAlias() публичный Метод

public GetPagedBlogDomainAlias ( BlogInfo blog, int pageIndex, int pageSize ) : PagedCollection
blog BlogInfo
pageIndex int
pageSize int
Результат PagedCollection

GetPagedBlogs() публичный Метод

Gets a pageable IList of BlogInfo instances.
public GetPagedBlogs ( string host, int pageIndex, int pageSize, ConfigurationFlags flags ) : PagedCollection
host string The host filter. Set to null to return all blogs.
pageIndex int Page index.
pageSize int Size of the page.
flags ConfigurationFlags
Результат PagedCollection

GetPagedEntries() публичный Метод

Returns a pageable collection of entries ordered by the id descending. This is used in the admin section.
public GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection
postType PostType Type of the post.
categoryID int The category ID.
pageIndex int Index of the page.
pageSize int Size of the page.
Результат IPagedCollection

GetPagedFeedback() публичный Метод

Gets the paged feedback.
public GetPagedFeedback ( int pageIndex, int pageSize, FeedbackStatusFlag status, FeedbackStatusFlag excludeStatusMask, FeedbackType type ) : IPagedCollection
pageIndex int Index of the page.
pageSize int Size of the page.
status FeedbackStatusFlag A flag for the status types to return.
excludeStatusMask FeedbackStatusFlag A flag for the statuses to exclude.
type FeedbackType The type of feedback to return.
Результат IPagedCollection

GetPagedKeyWords() публичный Метод

public GetPagedKeyWords ( int pageIndex, int pageSize ) : IPagedCollection
pageIndex int
pageSize int
Результат IPagedCollection

GetPagedLinks() публичный Метод

public GetPagedLinks ( int categoryTypeID, int pageIndex, int pageSize, bool sortDescending ) : IPagedCollection
categoryTypeID int
pageIndex int
pageSize int
sortDescending bool
Результат IPagedCollection

GetPagedReferrers() публичный Метод

public GetPagedReferrers ( int pageIndex, int pageSize, int entryId ) : IPagedCollection
pageIndex int
pageSize int
entryId int
Результат IPagedCollection

GetPagedViewStats() публичный Метод

public GetPagedViewStats ( int pageIndex, int pageSize, DateTime beginDate, DateTime endDate ) : IPagedCollection
pageIndex int
pageSize int
beginDate DateTime
endDate DateTime
Результат IPagedCollection

GetPostCollectionByMonth() публичный Метод

public GetPostCollectionByMonth ( int month, int year ) : IList
month int
year int
Результат IList

GetPostsByCategoryArchive() публичный Метод

public GetPostsByCategoryArchive ( ) : IList
Результат IList

GetPostsByCategoryID() публичный Метод

public GetPostsByCategoryID ( int itemCount, int catID ) : IList
itemCount int
catID int
Результат IList

GetPostsByDayRange() публичный Метод

public GetPostsByDayRange ( DateTime start, DateTime stop, PostType postType, bool activeOnly ) : IList
start DateTime
stop DateTime
postType PostType
activeOnly bool
Результат IList

GetPostsByMonth() публичный Метод

public GetPostsByMonth ( int month, int year ) : IList
month int
year int
Результат IList

GetPostsByMonthArchive() публичный Метод

public GetPostsByMonthArchive ( ) : IList
Результат IList

GetPostsByYearArchive() публичный Метод

public GetPostsByYearArchive ( ) : IList
Результат IList

GetPreviousAndNextEntries() публичный Метод

Returns the previous and next entry to the specified entry.
public GetPreviousAndNextEntries ( int entryId, PostType postType ) : IList
entryId int
postType PostType
Результат IList

GetTopTags() публичный Метод

public GetTopTags ( int ItemCount ) : int>.IDictionary
ItemCount int
Результат int>.IDictionary

InsertImage() публичный Метод

public InsertImage ( Image _image ) : int
_image Subtext.Framework.Components.Image
Результат int

InsertKeyWord() публичный Метод

public InsertKeyWord ( KeyWord keyWord ) : int
keyWord Subtext.Framework.Components.KeyWord
Результат int

ListBlogGroups() публичный Метод

Lists the blog groups.
public ListBlogGroups ( bool activeOnly ) : IList
activeOnly bool if set to true [active only].
Результат IList

LoadHostInfo() публичный Метод

Returns the HostInfo for the Subtext installation.
public LoadHostInfo ( HostInfo hostInfo ) : HostInfo
hostInfo HostInfo
Результат HostInfo

SetEntryCategoryList() публичный Метод

public SetEntryCategoryList ( int entryId, int categoryIds ) : bool
entryId int
categoryIds int
Результат bool

SetEntryTagList() публичный Метод

public SetEntryTagList ( int entryId, IList tags ) : bool
entryId int
tags IList
Результат bool

TrackEntry() публичный Метод

public TrackEntry ( EntryView ev ) : bool
ev Subtext.Framework.Components.EntryView
Результат bool

TrackEntry() публичный Метод

public TrackEntry ( IEnumerable evc ) : bool
evc IEnumerable
Результат bool

Update() публичный Метод

public Update ( Enclosure enclosure ) : bool
enclosure Subtext.Framework.Components.Enclosure
Результат bool

Update() публичный Метод

Saves changes to the specified entry attaching the specified categories.
public Update ( Entry entry ) : bool
entry Subtext.Framework.Components.Entry Entry.
Результат bool

Update() публичный Метод

Saves changes to the specified feedback.
public Update ( FeedbackItem feedbackItem ) : bool
feedbackItem Subtext.Framework.Components.FeedbackItem The feedback item.
Результат bool

Update() публичный Метод

public Update ( MetaTag metaTag ) : bool
metaTag Subtext.Framework.Components.MetaTag
Результат bool

UpdateBlog() публичный Метод

public UpdateBlog ( BlogInfo info ) : bool
info BlogInfo
Результат bool

UpdateBlogAlias() публичный Метод

public UpdateBlogAlias ( BlogAlias alias ) : bool
alias BlogAlias
Результат bool

UpdateHost() публичный Метод

Updates the HostInfo instance. If the host record is not in the database, one is created. There should only be one host record.
public UpdateHost ( HostInfo host ) : bool
host HostInfo The host information.
Результат bool

UpdateImage() публичный Метод

public UpdateImage ( Image image ) : bool
image Subtext.Framework.Components.Image
Результат bool

UpdateKeyWord() публичный Метод

public UpdateKeyWord ( KeyWord keyWord ) : bool
keyWord Subtext.Framework.Components.KeyWord
Результат bool

UpdateLink() публичный Метод

public UpdateLink ( Link link ) : bool
link Subtext.Framework.Components.Link
Результат bool

UpdateLinkCategory() публичный Метод

public UpdateLinkCategory ( LinkCategory lc ) : bool
lc Subtext.Framework.Components.LinkCategory
Результат bool