Show / Hide Table of Contents

Class AmorphousTypedRow

Represents a type-safe row of data when schema is known at compile-time that also implements IAmorphousData interface that allows this row to store "extra" data that does not comply with the current schema. Typed rows store data in instance fields, providing better performance and schema definition compile-time checking than DynamicRows at the expense of inability to define schema at runtime

Inheritance
System.Object
Row
TypedRow
AmorphousTypedRow
FormModel
Implements
IConfigurable
IConfigurationPersistent
System.IEquatable<Row>
System.Collections.Generic.IEnumerable<System.Object>
System.Collections.IEnumerable
IValidatable
IJSONWritable
IAmorphousData
Inherited Members
TypedRow.Schema
TypedRow.GetFieldValue(Schema.FieldDef)
TypedRow.SetFieldValue(Schema.FieldDef, Object)
Row.MakeRow(Schema, Type)
Row.TryFillFromJSON(Row, IJSONDataObject, SetFieldFunc)
Row.Item[String]
Row.Item[Int32]
Row.GetDataStoreKey(String)
Row.Configure(IConfigSectionNode)
Row.PersistConfiguration(ConfigSectionNode)
Row.Validate()
Row.Validate(String)
Row.ValidateField(String, String)
Row.ValidateField(String, Schema.FieldDef)
Row.Equals(Row)
Row.Equals(Object)
Row.GetHashCode()
Row.SimpleFilterPredicate(String, Boolean)
Row.IEnumerable.GetEnumerator()
Row.GetEnumerator()
Row.ConvertFieldValueToDef(Schema.FieldDef, Object)
Row.ApplyDefaultFieldValues(String, Boolean)
Row.CopyFields(Row, Boolean, Boolean, Func<String, Schema.FieldDef, Boolean>, Func<String, String, Boolean>)
Row.GetFieldValueDescription(String, String, Boolean)
Row.GetFieldValueDescription(Int32, String, Boolean)
Row.GetDisplayFieldValue(String, String, Func<Object, Object>)
Row.GetDisplayFieldValue(Int32, String, Func<Object, Object>)
Row.GetClientFieldValueList(Object, Schema.FieldDef, String, String)
Row.GetClientFieldDef(Object, Schema.FieldDef, String, String)
Row.GetClientFieldValue(Object, Schema.FieldDef, String, String)
Row.WriteAsJSON(TextWriter, Int32, JSONWritingOptions)
Row.CheckMinMax(FieldAttribute, String, IComparable)
Row.FilterJSONSerializerField(Schema.FieldDef, JSONWritingOptions, String)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.DataAccess.CRUD
Assembly: NFX.dll
Syntax
[Serializable]
public abstract class AmorphousTypedRow : TypedRow, IConfigurable, IConfigurationPersistent, IEquatable<Row>, IEnumerable<object>, IEnumerable, IValidatable, IJSONWritable, IAmorphousData

Constructors

AmorphousTypedRow()

Declaration
protected AmorphousTypedRow()

Properties

AmorphousData

Returns data that does not comply with known schema (dynamic data). The field names are NOT case-sensitive

Declaration
public IDictionary<string, object> AmorphousData { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.Object>

AmorphousDataEnabled

True by default for rows

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

Methods

AfterLoad(String)

Invoked to allow the row to hydrate its fields/state from AmorphousData bag. For example, this may be used to reconstruct some temporary object state that is not stored as a part of established business schema. The operation is performed per particular targetName (name of physical backend). Simply put, this method allows business code to "specify what to do after object gets loaded from THE PARTICULAR TARGET backend store". An example: suppose current MongoDB collection stores 3 fields for name, and we want to collapse First/Last/Middle name fields into one field. If we change rowschema then it will only contain 1 field which is not present in the database, however those 'older' fields will get populated into AmorphousData giving us an option to merge older 3 fields into 1 within AfterLoad() implementation

Declaration
public virtual void AfterLoad(string targetName)
Parameters
Type Name Description
System.String targetName

BeforeSave(String)

Invoked to allow the row to transform its state into AmorphousData bag. For example, this may be usefull to store extra data that is not a part of established business schema. The operation is performed per particular targetName (name of physical backend). Simply put, this method allows business code to "specify what to do before object gets saved in THE PARTICULAR TARGET backend store"

Declaration
public virtual void BeforeSave(string targetName)
Parameters
Type Name Description
System.String targetName

Implements

IConfigurable
IConfigurationPersistent
System.IEquatable<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
IValidatable
IJSONWritable
IAmorphousData

Extension Methods

CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T>)
CollectionUtils.ForEach<T>(IEnumerable<T>, Action<T, Int32>)
CollectionUtils.SkipLast<T>(IEnumerable<T>)
CollectionUtils.SkipLast<T>(IEnumerable<T>, Int32)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMin<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>)
CollectionUtils.FirstMax<TResult, TComparand>(IEnumerable<TResult>, Func<TResult, TComparand>, out TComparand)
CollectionUtils.FirstOrAnyOrDefault<TResult>(IEnumerable<TResult>, Func<TResult, Boolean>)
CollectionUtils.Distinct<TResult, TKey>(IEnumerable<TResult>, Func<TResult, TKey>)
DataUtils.Clone<TRow>(TRow, Boolean, Boolean, Func<String, Schema.FieldDef, Boolean>, Func<String, String, Boolean>)
MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
LookAheadExtensions.AsLookAheadEnumerable<T>(IEnumerable<T>)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
ErlSchemaUtils.ToErlObject(Row, String, String, Boolean)
ErlSchemaUtils.Update(Row, IErlObject, Schema, String, String, Registry<Schema>)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX