SaaS CMS has officially launched! Learn more now.

Class MetaClassManager

Represents meta model manager.

Inheritance
System.Object
MetaClassManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data.Meta.Management
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 11.8.3
Syntax
public class MetaClassManager
Remarks

Allows to enum available meta classes, types, enums, views, field maps. Allows to create (remove) meta class, type, enum, views, field map. Raises meta modeld events.

Constructors

MetaClassManager()

Initializes a new instance of the Manager class.

Declaration
public MetaClassManager()

MetaClassManager(Guid)

Initializes a new instance of the MetaClassManager class.

Declaration
[Obsolete("This constructor is no longer used. Using the parameterless contructor instead. Will remain at least until August 2018.")]
public MetaClassManager(Guid versionId)
Parameters
Type Name Description
System.Guid versionId

The version id.

Properties

MetaClasses

Gets the meta classes.

Declaration
public MetaClassCollection MetaClasses { get; }
Property Value
Type Description
MetaClassCollection

The meta classes.

MetaFieldMaps

Gets the meta field maps.

Declaration
public MetaFieldMapCollection MetaFieldMaps { get; }
Property Value
Type Description
MetaFieldMapCollection

The meta field maps.

MetaViews

Gets the meta views.

Declaration
public MetaViewCollection MetaViews { get; }
Property Value
Type Description
MetaViewCollection

The meta views.

ModuleDataStorages

Gets the module data storages.

Declaration
public ModuleDataStorageCollection ModuleDataStorages { get; }
Property Value
Type Description
ModuleDataStorageCollection

The module data storages.

RegisteredTypes

Gets the registered types.

Declaration
public MetaFieldTypeCollection RegisteredTypes { get; }
Property Value
Type Description
MetaFieldTypeCollection

The registered types.

VersionId

Gets the version id.

Declaration
[Obsolete("This property is no longer used. Will remain at least until August 2018.")]
public Guid VersionId { get; }
Property Value
Type Description
System.Guid

The version id.

Methods

BeginEdit()

Begins the edit.

Declaration
public MetaClassManagerEditScope BeginEdit()
Returns
Type Description
MetaClassManagerEditScope

BeginEdit(String)

Begins the edit.

Declaration
public MetaClassManagerEditScope BeginEdit(string owner)
Parameters
Type Name Description
System.String owner

The owner.

Returns
Type Description
MetaClassManagerEditScope

BeginEdit(String, AccessLevel)

Begins the edit.

Declaration
public MetaClassManagerEditScope BeginEdit(string owner, AccessLevel level)
Parameters
Type Name Description
System.String owner

The owner.

AccessLevel level

The level.

Returns
Type Description
MetaClassManagerEditScope

CreateBridgeMetaClass(String, String, String, String, String, String, String, Boolean, Boolean, String, String, String, Boolean, Boolean)

Creates the bridge meta class.

Declaration
public MetaClass CreateBridgeMetaClass(string name, string friendlyName, string pluralName, string primaryTableName, string metaClass1Name, string ref1Name, string ref1FriendlyName, bool isRef1Nullable, bool isRef1CascadeDelete, string metaClass2Name, string ref2Name, string ref2FriendlyName, bool isRef2Nullable, bool isRef2CascadeDelete)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String pluralName

Name of the plural.

System.String primaryTableName

Name of the primary table.

System.String metaClass1Name

Name of the meta class1.

System.String ref1Name

Name of the ref1.

System.String ref1FriendlyName

Name of the ref1 friendly.

System.Boolean isRef1Nullable

if set to true [is ref1 nullable].

System.Boolean isRef1CascadeDelete

if set to true [is ref1 cascade delete].

System.String metaClass2Name

Name of the meta class2.

System.String ref2Name

Name of the ref2.

System.String ref2FriendlyName

Name of the ref2 friendly.

System.Boolean isRef2Nullable

if set to true [is ref2 nullable].

System.Boolean isRef2CascadeDelete

if set to true [is ref2 cascade delete].

Returns
Type Description
MetaClass

CreateBridgeMetaClass(String, String, String, String, String, String, String, Boolean, String, String, String, Boolean)

Creates the bridge meta class.

Declaration
public MetaClass CreateBridgeMetaClass(string name, string friendlyName, string pluralName, string primaryTableName, string metaClass1Name, string ref1Name, string ref1FriendlyName, bool isRef1Nullable, string metaClass2Name, string ref2Name, string ref2FriendlyName, bool isRef2Nullable)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String pluralName

Name of the plural.

System.String primaryTableName

Name of the primary table.

System.String metaClass1Name

Name of the meta class1.

System.String ref1Name

Name of the ref1.

System.String ref1FriendlyName

Name of the ref1 friendly.

System.Boolean isRef1Nullable

if set to true [is ref1 nullable].

System.String metaClass2Name

Name of the meta class2.

System.String ref2Name

Name of the ref2.

System.String ref2FriendlyName

Name of the ref2 friendly.

System.Boolean isRef2Nullable

if set to true [is ref2 nullable].

Returns
Type Description
MetaClass

CreateCardMetaClass(MetaClass, String, String, String, String)

Creates the card meta class.

Declaration
public MetaClass CreateCardMetaClass(MetaClass ownerClass, string name, string friendlyName, string pluralName, string primaryTableName)
Parameters
Type Name Description
MetaClass ownerClass

The owner class.

System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String pluralName

Name of the plural.

System.String primaryTableName

Name of the primary table.

Returns
Type Description
MetaClass

CreateMetaClass(String, String)

Creates the meta class.

Declaration
public MetaClass CreateMetaClass(string name, string friendlyName)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

Returns
Type Description
MetaClass

A new meta class.

CreateMetaClass(String, String, String)

Creates the meta class.

Declaration
public MetaClass CreateMetaClass(string name, string friendlyName, string primaryTableName)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String primaryTableName

Name of the primary table.

Returns
Type Description
MetaClass

CreateMetaClass(String, String, String, String)

Creates the meta class.

Declaration
public MetaClass CreateMetaClass(string name, string friendlyName, string pluralName, string primaryTableName)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String pluralName

Name of the plural.

System.String primaryTableName

Name of the primary table.

Returns
Type Description
MetaClass

CreateMetaClass(String, String, String, String, PrimaryKeyIdValueType)

Creates the meta class.

Declaration
public MetaClass CreateMetaClass(string name, string friendlyName, string pluralName, string primaryTableName, PrimaryKeyIdValueType primaryKeyType)
Parameters
Type Name Description
System.String name

The name.

System.String friendlyName

Name of the friendly.

System.String pluralName

Name of the plural.

System.String primaryTableName

Name of the primary table.

PrimaryKeyIdValueType primaryKeyType

Type of the primary key.

Returns
Type Description
MetaClass

A new meta class.

CreateMetaFieldMap(String, MetaClass, MetaClass, MetaField[])

Creates the meta field map.

Declaration
public MetaFieldMap CreateMetaFieldMap(string name, MetaClass srcMetaClass, MetaClass destMetaClass, params MetaField[] references)
Parameters
Type Name Description
System.String name

The name.

MetaClass srcMetaClass

The source meta class.

MetaClass destMetaClass

The destination meta class.

MetaField[] references

The references.

Returns
Type Description
MetaFieldMap

CreateMetaFieldMap(String, String, String, MetaField[])

Creates the meta field map.

Declaration
public MetaFieldMap CreateMetaFieldMap(string name, string srcMetaClassName, string destMetaClassName, params MetaField[] references)
Parameters
Type Name Description
System.String name

The name.

System.String srcMetaClassName

Name of the SRC meta class.

System.String destMetaClassName

Name of the dest meta class.

MetaField[] references

The references.

Returns
Type Description
MetaFieldMap

CreateMetaView(MetaClass, MetaClass, String, String, MetaField[])

Creates the meta view.

Declaration
public MetaView CreateMetaView(MetaClass MetaClass, MetaClass Card, string Name, string FriendlyName, MetaField[] AvailableFields)
Parameters
Type Name Description
MetaClass MetaClass

The meta class.

MetaClass Card

The card.

System.String Name

The name.

System.String FriendlyName

Name of the friendly.

MetaField[] AvailableFields

The available fields.

Returns
Type Description
MetaView

CreateMetaView(MetaClass, MetaClass, String, String, MetaField[], FilterElementCollection, SortingElementCollection)

Creates the meta view.

Declaration
public MetaView CreateMetaView(MetaClass MetaClass, MetaClass Card, string Name, string FriendlyName, MetaField[] AvailableFields, FilterElementCollection Filters, SortingElementCollection Sorting)
Parameters
Type Name Description
MetaClass MetaClass

The meta class.

MetaClass Card

The card.

System.String Name

The name.

System.String FriendlyName

Name of the friendly.

MetaField[] AvailableFields

The available fields.

FilterElementCollection Filters

The filters.

SortingElementCollection Sorting

The sorting.

Returns
Type Description
MetaView

The new meta view.

CreateMetaView(MetaClass, String, String, MetaField[])

Creates the meta view.

Declaration
public MetaView CreateMetaView(MetaClass MetaClass, string Name, string FriendlyName, MetaField[] AvailableFields)
Parameters
Type Name Description
MetaClass MetaClass

The meta class.

System.String Name

The name.

System.String FriendlyName

Name of the friendly.

MetaField[] AvailableFields

The available fields.

Returns
Type Description
MetaView

CreateMetaView(String, String, String, String, String[])

Creates the meta view.

Declaration
public MetaView CreateMetaView(string MetaClass, string Card, string Name, string FriendlyName, string[] AvailableFields)
Parameters
Type Name Description
System.String MetaClass

The meta class.

System.String Card

The card.

System.String Name

The name.

System.String FriendlyName

Name of the friendly.

System.String[] AvailableFields

The available fields.

Returns
Type Description
MetaView

CreateMetaView(String, String, String, String[])

Creates the meta view.

Declaration
public MetaView CreateMetaView(string MetaClass, string Name, string FriendlyName, string[] AvailableFields)
Parameters
Type Name Description
System.String MetaClass

The meta class.

System.String Name

The name.

System.String FriendlyName

Name of the friendly.

System.String[] AvailableFields

The available fields.

Returns
Type Description
MetaView

DeleteMetaClass(MetaClass)

Deletes the meta class.

Declaration
public void DeleteMetaClass(MetaClass metaclass)
Parameters
Type Name Description
MetaClass metaclass

The metaclass.

DeleteMetaClass(String)

Deletes the meta class.

Declaration
public void DeleteMetaClass(string metaclassName)
Parameters
Type Name Description
System.String metaclassName

Name of the metaclass.

DeleteMetaFieldMap(MetaFieldMap)

Deletes the meta field map.

Declaration
public void DeleteMetaFieldMap(MetaFieldMap map)
Parameters
Type Name Description
MetaFieldMap map

The map.

DeleteMetaFieldMap(Int32)

Deletes the meta field map.

Declaration
public void DeleteMetaFieldMap(int index)
Parameters
Type Name Description
System.Int32 index

The index.

DeleteMetaFieldMap(String)

Deletes the meta field map.

Declaration
public void DeleteMetaFieldMap(string mapName)
Parameters
Type Name Description
System.String mapName

Name of the map.

DeleteMetaView(MetaView)

Declaration
public void DeleteMetaView(MetaView MetaView)
Parameters
Type Name Description
MetaView MetaView

DeleteMetaView(String)

Declaration
public void DeleteMetaView(string MetaViewName)
Parameters
Type Name Description
System.String MetaViewName

GetBridgesReferencedToClass(MetaClass)

Gets the bridges referenced to class.

Declaration
public MetaClass[] GetBridgesReferencedToClass(MetaClass metaClass)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

Returns
Type Description
MetaClass[]

GetBridgesReferencedToClass(String)

Gets the bridges referenced to class.

Declaration
public MetaClass[] GetBridgesReferencedToClass(string metaClassName)
Parameters
Type Name Description
System.String metaClassName

Name of the meta class.

Returns
Type Description
MetaClass[]

GetMetaClassSupportedCard()

Gets the meta class supported card.

Declaration
public MetaClass[] GetMetaClassSupportedCard()
Returns
Type Description
MetaClass[]

GetMetaViews(MetaClass)

Gets the meta views.

Declaration
public MetaView[] GetMetaViews(MetaClass MetaClass)
Parameters
Type Name Description
MetaClass MetaClass

The meta class.

Returns
Type Description
MetaView[]

GetMetaViews(String)

Gets the meta views.

Declaration
public MetaView[] GetMetaViews(string MetaClassName)
Parameters
Type Name Description
System.String MetaClassName

Name of the meta class.

Returns
Type Description
MetaView[]

GetPrimaryKeyName(String)

Declaration
public static string GetPrimaryKeyName(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
System.String

GetRegisteredTypes(McDataType)

Gets the registered types.

Declaration
public MetaFieldType[] GetRegisteredTypes(McDataType dataType)
Parameters
Type Name Description
McDataType dataType

Type of the data.

Returns
Type Description
MetaFieldType[]

OnMetaClassCreated(MetaClass)

Declaration
protected virtual void OnMetaClassCreated(MetaClass mc)
Parameters
Type Name Description
MetaClass mc

OnMetaClassCreating(MetaClass)

Declaration
protected virtual void OnMetaClassCreating(MetaClass mc)
Parameters
Type Name Description
MetaClass mc

OnMetaClassDeleted(MetaClass)

Declaration
protected virtual void OnMetaClassDeleted(MetaClass mc)
Parameters
Type Name Description
MetaClass mc

OnMetaClassDeleting(MetaClass)

Declaration
protected virtual void OnMetaClassDeleting(MetaClass mc)
Parameters
Type Name Description
MetaClass mc

OnMetaFieldCreated(MetaClass, MetaField)

Declaration
protected virtual void OnMetaFieldCreated(MetaClass mc, MetaField mf)
Parameters
Type Name Description
MetaClass mc
MetaField mf

OnMetaFieldCreating(MetaClass, MetaField)

Declaration
protected virtual void OnMetaFieldCreating(MetaClass mc, MetaField mf)
Parameters
Type Name Description
MetaClass mc
MetaField mf

OnMetaFieldDeleted(MetaClass, MetaField)

Declaration
protected virtual void OnMetaFieldDeleted(MetaClass mc, MetaField mf)
Parameters
Type Name Description
MetaClass mc
MetaField mf

OnMetaFieldDeleting(MetaClass, MetaField)

Declaration
protected virtual void OnMetaFieldDeleting(MetaClass mc, MetaField mf)
Parameters
Type Name Description
MetaClass mc
MetaField mf

Events

MetaClassCreated

Declaration
public static event EventHandler<MetaClassEventArgs> MetaClassCreated
Event Type
Type Description
System.EventHandler<MetaClassEventArgs>

MetaClassCreating

Declaration
public static event EventHandler<MetaClassEventArgs> MetaClassCreating
Event Type
Type Description
System.EventHandler<MetaClassEventArgs>

MetaClassDeleted

Declaration
public static event EventHandler<MetaClassEventArgs> MetaClassDeleted
Event Type
Type Description
System.EventHandler<MetaClassEventArgs>

MetaClassDeleting

Declaration
public static event EventHandler<MetaClassEventArgs> MetaClassDeleting
Event Type
Type Description
System.EventHandler<MetaClassEventArgs>

MetaFieldCreated

Declaration
public static event EventHandler<MetaFieldEventArgs> MetaFieldCreated
Event Type
Type Description
System.EventHandler<MetaFieldEventArgs>

MetaFieldCreating

Declaration
public static event EventHandler<MetaFieldEventArgs> MetaFieldCreating
Event Type
Type Description
System.EventHandler<MetaFieldEventArgs>

MetaFieldDeleted

Declaration
public static event EventHandler<MetaFieldEventArgs> MetaFieldDeleted
Event Type
Type Description
System.EventHandler<MetaFieldEventArgs>

MetaFieldDeleting

Declaration
public static event EventHandler<MetaFieldEventArgs> MetaFieldDeleting
Event Type
Type Description
System.EventHandler<MetaFieldEventArgs>