Class DbMetadata
A DbMetadata contains the value of a MetadataDefinition for a specific DbMediaItem and Language
Inheritance
Inherited Members
Namespace: ImageVault.Core.Common.DbEntities
Assembly: ImageVault.Core.dll
Syntax
public abstract class DbMetadata
Constructors
DbMetadata()
Initializes a new instance of the DbMetadata class.
Declaration
protected DbMetadata()
DbMetadata(DbMetadataDefinition, DbLanguage)
Initializes a new instance of the DbMetadata class.
Declaration
protected DbMetadata(DbMetadataDefinition md, DbLanguage language)
Parameters
Type | Name | Description |
---|---|---|
DbMetadataDefinition | md | |
DbLanguage | language |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Properties
Language
Get/Sets the Language of the DbMetadata
Declaration
public DbLanguage Language { get; set; }
Property Value
Type | Description |
---|---|
DbLanguage |
LanguageId
Get/Sets the LanguageId of the DbMetadata
Declaration
public int? LanguageId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
MetadataDefinition
Get/Sets the DbMetadataDefinition of the DbMetadata
Declaration
public DbMetadataDefinition MetadataDefinition { get; set; }
Property Value
Type | Description |
---|---|
DbMetadataDefinition |
MetadataDefinitionId
Get/Sets the MetadataDefinitionId of the DbMetadata
Declaration
public int MetadataDefinitionId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MetadataId
Get/Sets the MetadataId of the DbMetadata
Declaration
public int MetadataId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StringValue
Get/Sets the StringValue of the DbMetadata
Declaration
public string StringValue { get; set; }
Property Value
Type | Description |
---|---|
System.String | This value is a 250 characters unicode string that is used for freetext searches |
Value
Get/Sets the Value of the DbMetadata
Declaration
public abstract object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | Override this in each subclass and return the real value for each instance |
VersionId
Gets the version id that this metadata is connected to
Declaration
public int VersionId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
CreateMetadataInstance(Metadata)
Creates DbMetadata from the supplied metadata
Declaration
public static DbMetadata CreateMetadataInstance(Metadata metadata)
Parameters
Type | Name | Description |
---|---|---|
Metadata | metadata |
Returns
Type | Description |
---|---|
DbMetadata |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.NotImplementedException | If cannot create DbMetadata from Metadata of type . |
ToString()
Returns a System.String that represents the current DbMetadata.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current DbMetadata. |
Overrides
UpdateStringValue()
Sets the StringValue to the first 250 characters of the ToString evaluation. If Value is null, StringValue is set to null.
Declaration
protected void UpdateStringValue()
Remarks
This method should be called whenever the Value changes to update the StringValue field.