Class MetaFieldBuilder
Represents meta field builder.
Inheritance
Implements
Inherited Members
Namespace: Mediachase.BusinessFoundation.Data.Meta.Management
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2Syntax
public class MetaFieldBuilder : IDisposable
Constructors
MetaFieldBuilder(MetaClass)
Initializes a new instance of the MetaFieldBuilder class.
Declaration
public MetaFieldBuilder(MetaClass metaClass)
Parameters
Type | Name | Description |
---|---|---|
MetaClass | metaClass | The meta class. |
Properties
MetaClass
Gets the meta class.
Declaration
public MetaClass MetaClass { get; }
Property Value
Type | Description |
---|---|
MetaClass | The meta class. |
Methods
CreateAggregation(String, String, String, String, String)
Creates the aggregation.
Declaration
public MetaField CreateAggregation(string name, string friendlyName, string childMetaClassName, string elementContainerRefFieldFriendlyName, string defaultElementFieldFriendlyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.String | childMetaClassName | Name of the child meta class. |
System.String | elementContainerRefFieldFriendlyName | Friendly name of the element container reference field. |
System.String | defaultElementFieldFriendlyName | Friendly name of the default element field. |
Returns
Type | Description |
---|---|
MetaField |
CreateBackReference(String, String, String, String)
Creates the back reference.
Declaration
public MetaField CreateBackReference(string name, string friendlyName, string referenceClass, string referenceFieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | The friendly name of the reference. |
System.String | referenceClass | Name of the reference class. |
System.String | referenceFieldName | Name of the reference field. |
Returns
Type | Description |
---|---|
MetaField |
CreateCardField(String, String, Boolean)
Creates the card field.
Declaration
public MetaField CreateCardField(string name, string friendlyName, bool isNullable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateCheckBoxBoolean(String, String, Boolean, Nullable<Boolean>, String)
Creates the checkbox boolean meta field.
Declaration
public MetaField CreateCheckBoxBoolean(string name, string friendlyName, bool isNullable, bool? isChecked, string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Boolean> | isChecked | if set to |
System.String | label | The label. |
Returns
Type | Description |
---|---|
MetaField |
CreateCurrency(String, String, Boolean, Nullable<Decimal>, Boolean)
Creates the currency meta field.
Declaration
public MetaField CreateCurrency(string name, string friendlyName, bool isNullable, decimal? defaultValue, bool allowNegative)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Decimal> | defaultValue | The default value. |
System.Boolean | allowNegative | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateDate(String, String, Boolean)
Creates the date meta field.
Declaration
public MetaField CreateDate(string name, string friendlyName, bool isNullable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateDateTime(String, String, Boolean, Boolean)
Creates the date time meta field.
Declaration
public MetaField CreateDateTime(string name, string friendlyName, bool isNullable, bool useUserTimeZone)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Boolean | useUserTimeZone | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateDecimal(String, String, Boolean, Int32, Int32, Nullable<Decimal>)
Creates the decimal.
Declaration
public MetaField CreateDecimal(string name, string friendlyName, bool isNullable, int precision, int scale, decimal? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | precision | The precision. |
System.Int32 | scale | The scale. |
System.Nullable<System.Decimal> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateDecimal(String, String, Boolean, Nullable<Decimal>)
Creates the decimal.
Declaration
public MetaField CreateDecimal(string name, string friendlyName, bool isNullable, decimal? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Decimal> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
Remarks
Precision equals 18. Scale equals 4.
CreateDecimalPercent(String, String, Boolean, Int32, Int32, Nullable<Decimal>)
Creates the decimal percent.
Declaration
public MetaField CreateDecimalPercent(string name, string friendlyName, bool isNullable, int precision, int scale, decimal? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | precision | The precision. |
System.Int32 | scale | The scale. |
System.Nullable<System.Decimal> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateDecimalPercent(String, String, Boolean, Nullable<Decimal>)
Creates the decimal percent.
Declaration
public MetaField CreateDecimalPercent(string name, string friendlyName, bool isNullable, decimal? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Decimal> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
Remarks
Precision equals 18. Scale equals 4.
CreateDropDownBoolean(String, String, Boolean, Nullable<Boolean>, String, String)
Creates the drop down boolean meta field.
Declaration
public MetaField CreateDropDownBoolean(string name, string friendlyName, bool isNullable, bool? isChecked, string trueLabelText, string falseLabelText)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Boolean> | isChecked | if set to |
System.String | trueLabelText | The true label text. |
System.String | falseLabelText | The false label text. |
Returns
Type | Description |
---|---|
MetaField |
CreateDuration(String, String, Boolean, Nullable<Int32>)
Creates the duration.
Declaration
public MetaField CreateDuration(string name, string friendlyName, bool isNullable, int? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Int32> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateEmail(String, String, Boolean, Int32, Boolean)
Creates the E mail meta field.
Declaration
public MetaField CreateEmail(string name, string friendlyName, bool isNullable, int maxLength, bool isUnique)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | maxLength | Length of the max. |
System.Boolean | isUnique | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateEnumField(String, String, String, Boolean, String, Boolean)
Creates the enum field.
Declaration
public MetaField CreateEnumField(string name, string friendlyName, string enumName, bool isNullable, string defaultValue, bool enumEditable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.String | enumName | Name of the enum. |
System.Boolean | isNullable | if set to |
System.String | defaultValue | The default value. |
System.Boolean | enumEditable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateFile(String, String, Boolean, String)
Creates the file meta field.
Declaration
public MetaField CreateFile(string name, string friendlyName, bool isNullable, string fileNameRegexPattern)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.String | fileNameRegexPattern | The file name regex pattern. |
Returns
Type | Description |
---|---|
MetaField |
CreateFloat(String, String, Boolean, Nullable<Double>)
Creates the float meta field.
Declaration
public MetaField CreateFloat(string name, string friendlyName, bool isNullable, double? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Double> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateFloatPercent(String, String, Boolean, Nullable<Double>)
Creates the float percent.
Declaration
public MetaField CreateFloatPercent(string name, string friendlyName, bool isNullable, double? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Double> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateGuid(String, String, Boolean)
Creates the GUID meta field.
Declaration
public MetaField CreateGuid(string name, string friendlyName, bool isNullable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateHtml(String, String, Boolean)
Creates the HTML meta field.
Declaration
public MetaField CreateHtml(string name, string friendlyName, bool isNullable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateImage(String, String, Boolean, Int32, Int32, Boolean, String)
Creates the image meta field.
Declaration
public MetaField CreateImage(string name, string friendlyName, bool isNullable, int imageWidth, int imageHeight, bool showBorder, string fileNameRegexPattern)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | imageWidth | Width of the image. |
System.Int32 | imageHeight | Height of the image. |
System.Boolean | showBorder | if set to |
System.String | fileNameRegexPattern | The file name regex pattern. |
Returns
Type | Description |
---|---|
MetaField |
CreateInteger(String, String, Boolean, Nullable<Int32>)
Creates the integer meta field.
Declaration
public MetaField CreateInteger(string name, string friendlyName, bool isNullable, int? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Int32> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateIntegerPercent(String, String, Boolean, Nullable<Int32>)
Creates the integer percent.
Declaration
public MetaField CreateIntegerPercent(string name, string friendlyName, bool isNullable, int? defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Nullable<System.Int32> | defaultValue | The default value. |
Returns
Type | Description |
---|---|
MetaField |
CreateLongText(String, String, Boolean)
Creates the long text meta field.
Declaration
public MetaField CreateLongText(string name, string friendlyName, bool isNullable)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateReference(String, String, Boolean, String, Boolean)
Creates the reference meta field.
Declaration
public MetaField CreateReference(string name, string friendlyName, bool isNullable, string parentMetaClassName, bool cascadeDelete)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.String | parentMetaClassName | Name of the reference meta class. |
System.Boolean | cascadeDelete | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateReferencedField(String, String, String, String)
Creates the referenced field.
Declaration
public MetaField CreateReferencedField(string name, string friendlyName, string referenceFieldName, string referencedFieldName)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.String | referenceFieldName | Name of the reference field. |
System.String | referencedFieldName | Name of the referenced field. |
Returns
Type | Description |
---|---|
MetaField |
CreateText(String, String, Boolean, Int32, Boolean)
Creates the text meta field.
Declaration
public MetaField CreateText(string name, string friendlyName, bool isNullable, int maxLength, bool isUnique)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | maxLength | Length of the max. |
System.Boolean | isUnique | if set to |
Returns
Type | Description |
---|---|
MetaField |
CreateUrl(String, String, Boolean, Int32, Boolean, String)
Creates the URL meta field.
Declaration
public MetaField CreateUrl(string name, string friendlyName, bool isNullable, int maxLength, bool isUnique, string target)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.String | friendlyName | Name of the friendly. |
System.Boolean | isNullable | if set to |
System.Int32 | maxLength | Length of the max. |
System.Boolean | isUnique | if set to |
System.String | target | The URL target. |
Returns
Type | Description |
---|---|
MetaField |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the specified free managed resources.
Declaration
protected virtual void Dispose(bool freeManagedResources)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | freeManagedResources | if set to |
SaveChanges()
Saves the changes.
Declaration
public void SaveChanges()
SetSkipSchema(MetaField)
Sets SchemaAttribute.IsCreatable and SchemaAttribute.IsDeletable are equal to false.
Declaration
public MetaField SetSkipSchema(MetaField field)
Parameters
Type | Name | Description |
---|---|---|
MetaField | field | The field. |
Returns
Type | Description |
---|---|
MetaField |