Class ContentDB

Base class for reading PageData information from SQL Server

Inheritance
System.Object
ContentDB
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public abstract class ContentDB : Object

Constructors

ContentDB(ServiceAccessor<IDatabaseExecutor>, IPermanentLinkMapper, ILanguageBranchRepository, IPropertyDataFactory, IContentTypeRepository, IPropertyDefinitionRepository, IPropertyDefinitionTypeRepository, IContentFactory, IBlobFactory, PropertyValueConverterFactory, DatabaseDateTimeHandler)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected ContentDB(ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor, IPermanentLinkMapper permanentLinkMapper, ILanguageBranchRepository languageBranchRepository, IPropertyDataFactory propertyDataFactory, IContentTypeRepository contentTypeRepository, IPropertyDefinitionRepository propertyDefinitionRepository, IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IContentFactory contentFactory, IBlobFactory blobFactory, PropertyValueConverterFactory propertyValueConverterFactory, DatabaseDateTimeHandler databaseDateTimeHandler)
Parameters
Type Name Description
ServiceAccessor<IDatabaseExecutor> databaseHandlerAccessor
IPermanentLinkMapper permanentLinkMapper
ILanguageBranchRepository languageBranchRepository
IPropertyDataFactory propertyDataFactory
IContentTypeRepository contentTypeRepository
IPropertyDefinitionRepository propertyDefinitionRepository
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository
IContentFactory contentFactory
IBlobFactory blobFactory
PropertyValueConverterFactory propertyValueConverterFactory
DatabaseDateTimeHandler databaseDateTimeHandler

Fields

DataTypeToDBName

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public static readonly string[] DataTypeToDBName
Field Value
Type Description
System.String[]

PropertyNameKey

Declaration
protected const string PropertyNameKey = "PropertyName"
Field Value
Type Description
System.String

ScopeNameKey

Declaration
protected const string ScopeNameKey = "ScopeName"
Field Value
Type Description
System.String

Properties

ContentTypeRepository

Gets or sets the content type repository.

Declaration
protected IContentTypeRepository ContentTypeRepository { get; set; }
Property Value
Type Description
IContentTypeRepository

The content type repository.

DateTimeHandler

Gets or sets the Database DateTimeHandler.

Declaration
protected DatabaseDateTimeHandler DateTimeHandler { get; set; }
Property Value
Type Description
DatabaseDateTimeHandler

LanguageBranchRepository

Gets or sets the language branch repository.

Declaration
protected ILanguageBranchRepository LanguageBranchRepository { get; set; }
Property Value
Type Description
ILanguageBranchRepository

PermanentLinkMapper

Gets the permanent link mapper.

Declaration
protected IPermanentLinkMapper PermanentLinkMapper { get; }
Property Value
Type Description
IPermanentLinkMapper

The permanent link mapper.

PropertyDataFactory

Gets or sets the language branch repository.

Declaration
protected IPropertyDataFactory PropertyDataFactory { get; set; }
Property Value
Type Description
IPropertyDataFactory

PropertyDefinitionRepository

Gets or sets the property definition repository.

Declaration
protected IPropertyDefinitionRepository PropertyDefinitionRepository { get; set; }
Property Value
Type Description
IPropertyDefinitionRepository

The property definition repository.

PropertyDefinitionTypeRepository

Gets or sets the property definition repository.

Declaration
protected IPropertyDefinitionTypeRepository PropertyDefinitionTypeRepository { get; set; }
Property Value
Type Description
IPropertyDefinitionTypeRepository

The property definition repository.

UseStartPublishForDelayedPublishUntil

Declaration
public static bool UseStartPublishForDelayedPublishUntil { get; set; }
Property Value
Type Description
System.Boolean

Methods

AssignBinaryStorable(IBinaryStorable, DbDataReader)

Declaration
protected void AssignBinaryStorable(IBinaryStorable binaryStorable, DbDataReader reader)
Parameters
Type Name Description
IBinaryStorable binaryStorable
System.Data.Common.DbDataReader reader

AssignChangeTracking(IChangeTrackable, DbDataReader)

Declaration
protected void AssignChangeTracking(IChangeTrackable changeTracking, DbDataReader reader)
Parameters
Type Name Description
IChangeTrackable changeTracking
System.Data.Common.DbDataReader reader

AssignContentLanguage(ILocale, DbDataReader)

Declaration
protected void AssignContentLanguage(ILocale languageData, DbDataReader reader)
Parameters
Type Name Description
ILocale languageData
System.Data.Common.DbDataReader reader

AssignContentMedia(IContentMedia, DbDataReader)

Declaration
protected void AssignContentMedia(IContentMedia contentMedia, DbDataReader reader)
Parameters
Type Name Description
IContentMedia contentMedia
System.Data.Common.DbDataReader reader

AssignContentResource(IContentAsset, DbDataReader)

Declaration
protected void AssignContentResource(IContentAsset contentResources, DbDataReader reader)
Parameters
Type Name Description
IContentAsset contentResources
System.Data.Common.DbDataReader reader

AssignDeleteInfo(IContent, DbDataReader)

Declaration
protected void AssignDeleteInfo(IContent content, DbDataReader reader)
Parameters
Type Name Description
IContent content
System.Data.Common.DbDataReader reader

AssignExistingLanguages(ILocalizable, IEnumerable<CultureInfo>)

Declaration
protected void AssignExistingLanguages(ILocalizable languageData, IEnumerable<CultureInfo> languages)
Parameters
Type Name Description
ILocalizable languageData
System.Collections.Generic.IEnumerable<System.Globalization.CultureInfo> languages

AssignMasterLanguage(ILocalizable, DbDataReader)

Declaration
protected void AssignMasterLanguage(ILocalizable languageData, DbDataReader reader)
Parameters
Type Name Description
ILocalizable languageData
System.Data.Common.DbDataReader reader

AssignResourceable(IResourceable, DbDataReader)

Declaration
protected void AssignResourceable(IResourceable contentResources, DbDataReader reader)
Parameters
Type Name Description
IResourceable contentResources
System.Data.Common.DbDataReader reader

AssignRoutingSegment(IRoutable, DbDataReader)

Declaration
protected void AssignRoutingSegment(IRoutable routingSegment, DbDataReader reader)
Parameters
Type Name Description
IRoutable routingSegment
System.Data.Common.DbDataReader reader

AssignValueIfNotNull(Object, Action<Object>)

Declaration
protected void AssignValueIfNotNull(object dbValue, Action<object> action)
Parameters
Type Name Description
System.Object dbValue
System.Action<System.Object> action

AssignVersionStatus(IVersionable, DbDataReader)

Declaration
protected void AssignVersionStatus(IVersionable versionStatus, DbDataReader reader)
Parameters
Type Name Description
IVersionable versionStatus
System.Data.Common.DbDataReader reader

CreateContent(ContentType)

Declaration
protected IContent CreateContent(ContentType contentType)
Parameters
Type Name Description
ContentType contentType
Returns
Type Description
IContent

CreateReference(Boolean, Int32, Int32)

Declaration
protected ContentReference CreateReference(bool isForPage, int id, int version = 0)
Parameters
Type Name Description
System.Boolean isForPage
System.Int32 id
System.Int32 version
Returns
Type Description
ContentReference

FinalizeContent(IContent)

Declaration
protected void FinalizeContent(IContent content)
Parameters
Type Name Description
IContent content

GetBlockProperty(String[], ref PropertyDataCollection, Boolean, Boolean, ContentReference)

Declaration
protected PropertyData GetBlockProperty(string[] parts, ref PropertyDataCollection scopeCollection, bool logWarnings, bool createMissingDynamicBlocks, ContentReference contentLink)
Parameters
Type Name Description
System.String[] parts
PropertyDataCollection scopeCollection
System.Boolean logWarnings
System.Boolean createMissingDynamicBlocks
ContentReference contentLink
Returns
Type Description
PropertyData

GetDynamicScopeName(Int32, String)

Declaration
protected string GetDynamicScopeName(int blockPropertyTypeId, string propName)
Parameters
Type Name Description
System.Int32 blockPropertyTypeId
System.String propName
Returns
Type Description
System.String

GetExecutor()

Declaration
protected IDatabaseExecutor GetExecutor()
Returns
Type Description
IDatabaseExecutor

GetProperty(PropertyDataCollection, DbDataReader, ContentReference)

Declaration
protected PropertyData GetProperty(PropertyDataCollection properties, DbDataReader reader, ContentReference contentLink)
Parameters
Type Name Description
PropertyDataCollection properties
System.Data.Common.DbDataReader reader
ContentReference contentLink
Returns
Type Description
PropertyData

IsIdentityData(String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public static bool IsIdentityData(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Boolean

IsIgnoreOnImportData(String)

Checks if a property should be ignored when setting property values during an import. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public static bool IsIgnoreOnImportData(string name)
Parameters
Type Name Description
System.String name

The name of the property.

Returns
Type Description
System.Boolean

true if the property should be ignored; otherwise false.

IsMetaData(String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public static bool IsMetaData(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.Boolean

LoadACL(DbDataReader, IContentSecurityDescriptor)

Declaration
protected virtual void LoadACL(DbDataReader reader, IContentSecurityDescriptor contentSecurityDescriptor)
Parameters
Type Name Description
System.Data.Common.DbDataReader reader
IContentSecurityDescriptor contentSecurityDescriptor

LoadACLReferences(IContentSecurityDescriptor, DbDataReader)

Declaration
protected virtual void LoadACLReferences(IContentSecurityDescriptor contentSecurityDescriptor, DbDataReader reader)
Parameters
Type Name Description
IContentSecurityDescriptor contentSecurityDescriptor
System.Data.Common.DbDataReader reader

LoadIdentity(IContent, DbDataReader, Boolean)

Declaration
protected void LoadIdentity(IContent content, DbDataReader reader, bool assignContentLink)
Parameters
Type Name Description
IContent content
System.Data.Common.DbDataReader reader
System.Boolean assignContentLink

LoadSingleCategory(DbDataReader, CategoryList)

Declaration
protected void LoadSingleCategory(DbDataReader reader, CategoryList categoryList)
Parameters
Type Name Description
System.Data.Common.DbDataReader reader
CategoryList categoryList

PageGuidOrNull(PropertyData)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected object PageGuidOrNull(PropertyData prop)
Parameters
Type Name Description
PropertyData prop
Returns
Type Description
System.Object

PopulatePropertyCommand(IDatabaseExecutor, DbCommand, ContentReference, Guid, PropertyDataCollection, PropertyData, String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected bool PopulatePropertyCommand(IDatabaseExecutor executor, DbCommand cmd, ContentReference currentPage, Guid currentPageGuid, PropertyDataCollection props, PropertyData prop, string scopeName)
Parameters
Type Name Description
IDatabaseExecutor executor
System.Data.Common.DbCommand cmd
ContentReference currentPage
System.Guid currentPageGuid
PropertyDataCollection props
PropertyData prop
System.String scopeName
Returns
Type Description
System.Boolean

PopulatePropertyCommand(IDatabaseExecutor, DbCommand, PageReference, PropertyDataCollection, PropertyData)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected bool PopulatePropertyCommand(IDatabaseExecutor executor, DbCommand cmd, PageReference currentPage, PropertyDataCollection props, PropertyData prop)
Parameters
Type Name Description
IDatabaseExecutor executor
System.Data.Common.DbCommand cmd
PageReference currentPage
PropertyDataCollection props
PropertyData prop
Returns
Type Description
System.Boolean

ReadPropertyData(PropertyData, DbDataReader, ContentReference, CultureInfo)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected void ReadPropertyData(PropertyData prop, DbDataReader reader, ContentReference contentLink, CultureInfo language)
Parameters
Type Name Description
PropertyData prop
System.Data.Common.DbDataReader reader
ContentReference contentLink
System.Globalization.CultureInfo language

ThrowIfNotRequiredType(IContent, Type)

Declaration
protected static void ThrowIfNotRequiredType(IContent content, Type requiredType)
Parameters
Type Name Description
IContent content
System.Type requiredType

ThrowIfNotValidDateTime(DateTime)

Declaration
protected void ThrowIfNotValidDateTime(DateTime date)
Parameters
Type Name Description
System.DateTime date

TryToGuid(Object, out Guid)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
protected bool TryToGuid(object data, out Guid result)
Parameters
Type Name Description
System.Object data
System.Guid result
Returns
Type Description
System.Boolean

Extension Methods