SaaS CMS has officially launched! Learn more now.

Class BatchActivator

Represents MetaObject batch activator information.

Inheritance
System.Object
BatchActivator
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
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 11.8.3
Syntax
public class BatchActivator
Remarks

The BatchActivator class contains information about meta objects (meta class and primary key). Optimizes multi meta object load.

Constructors

BatchActivator()

Initializes a new instance of the BatchActivator class.

Declaration
public BatchActivator()

BatchActivator(MetaClass, Int32[])

Initializes a new instance of the BatchActivator class.

Declaration
public BatchActivator(MetaClass metaClass, params int[] primaryKeyIds)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

System.Int32[] primaryKeyIds

The primary key ids.

BatchActivator(String, Int32[])

Initializes a new instance of the BatchActivator class.

Declaration
public BatchActivator(string metaClassName, params int[] primaryKeyIds)
Parameters
Type Name Description
System.String metaClassName

Name of the meta class.

System.Int32[] primaryKeyIds

The primary key ids.

Properties

BuildRequired

Declaration
public bool BuildRequired { get; protected set; }
Property Value
Type Description
System.Boolean

IsEmpty

Gets a value indicating whether this instance is empty.

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
System.Boolean

true if this instance is empty; otherwise, false.

Items

Gets the items.

Declaration
protected Dictionary<MetaClass, List<int>> Items { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<MetaClass, System.Collections.Generic.List<System.Int32>>

The items.

Script

Gets or sets the script.

Declaration
public SqlScript Script { get; protected set; }
Property Value
Type Description
SqlScript

The script.

Methods

AddItem(MetaClass, Int32)

Adds the item.

Declaration
public void AddItem(MetaClass metaClass, int primaryKeyId)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

System.Int32 primaryKeyId

The primary key id.

AddItem(String, Int32)

Adds the item.

Declaration
public void AddItem(string metaClassName, int primaryKeyId)
Parameters
Type Name Description
System.String metaClassName

Name of the meta class.

System.Int32 primaryKeyId

The primary key id.

AddItems(MetaClass, Int32[])

Adds the items.

Declaration
public void AddItems(MetaClass metaClass, params int[] primaryKeyIds)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

System.Int32[] primaryKeyIds

The primary key ids.

AddItems(String, Int32[])

Adds the items.

Declaration
public void AddItems(string metaClassName, params int[] primaryKeyIds)
Parameters
Type Name Description
System.String metaClassName

Name of the meta class.

System.Int32[] primaryKeyIds

The primary key ids.

Build()

Creates the SQL query.

Declaration
public void Build()

RemoveAllItems()

Clears this instance.

Declaration
public void RemoveAllItems()

RemoveItem(MetaClass, Int32)

Removes the item.

Declaration
public void RemoveItem(MetaClass metaClass, int primaryKeyId)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

System.Int32 primaryKeyId

The primary key id.

RemoveItem(String, Int32)

Declaration
public void RemoveItem(string metaClassName, int primaryKeyId)
Parameters
Type Name Description
System.String metaClassName
System.Int32 primaryKeyId

RemoveItems(MetaClass)

Clears the specified meta class.

Declaration
public void RemoveItems(MetaClass metaClass)
Parameters
Type Name Description
MetaClass metaClass

The meta class.

RemoveItems(String)

Removes the items.

Declaration
public void RemoveItems(string metaClassName)
Parameters
Type Name Description
System.String metaClassName

Name of the meta class.