Class SimpleObject

Implements operations for simple storage objects. (Inherits IStorageObject, System.ICloneable, System.Runtime.Serialization.ISerializable.)

Inheritance
System.Object
SimpleObject
Implements
System.ICloneable
System.Runtime.Serialization.ISerializable
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.Commerce.Storage
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public abstract class SimpleObject : IStorageObject, ICloneable, ISerializable

Constructors

SimpleObject()

Initializes a new instance of the SimpleObject class.

Declaration
public SimpleObject()

SimpleObject(SerializationInfo, StreamingContext)

Initializes a new instance of the SimpleObject class.

Declaration
protected SimpleObject(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The info.

System.Runtime.Serialization.StreamingContext context

The context.

Properties

FieldStorage

Gets the field storage.

Declaration
protected Hashtable FieldStorage { get; }
Property Value
Type Description
System.Collections.Hashtable

The field storage.

Item[String]

Gets or sets the System.Object with the specified field name.

Declaration
public virtual object this[string fieldName] { get; set; }
Parameters
Type Name Description
System.String fieldName
Property Value
Type Description
System.Object

ObjectState

Gets the state of the object.

Declaration
public MetaObjectState ObjectState { get; }
Property Value
Type Description
MetaObjectState

The state of the object.

TableName

Gets the name of the table.

Declaration
public virtual string TableName { get; }
Property Value
Type Description
System.String

The name of the table.

Methods

AcceptChanges()

Accepts the changes.

Declaration
public virtual void AcceptChanges()

ChangeState()

Changes the state.

Declaration
protected void ChangeState()

Clone()

Clone the object, and returning a reference to a cloned object.

Declaration
public object Clone()
Returns
Type Description
System.Object

Reference to the new cloned object.

CreateDeleteCommand()

Creates the delete command.

Declaration
protected abstract DataCommand CreateDeleteCommand()
Returns
Type Description
DataCommand

CreateInsertCommand()

Creates the insert command.

Declaration
protected abstract DataCommand CreateInsertCommand()
Returns
Type Description
DataCommand

CreateUpdateCommand()

Creates the update command.

Declaration
protected abstract DataCommand CreateUpdateCommand()
Returns
Type Description
DataCommand

Delete()

Deletes this instance.

Declaration
public virtual void Delete()

GetBool(String)

Gets the bool.

Declaration
public bool GetBool(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.Boolean

GetDateTime(String)

Gets the date time.

Declaration
public DateTime GetDateTime(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.DateTime

GetDecimal(String)

Gets the decimal.

Declaration
public decimal GetDecimal(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.Decimal

GetGuid(String)

Gets the GUID.

Declaration
public Guid GetGuid(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.Guid

GetInt(String)

Gets the int.

Declaration
public int GetInt(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.Int32

GetInt32(String)

Gets the int32.

Declaration
public int GetInt32(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.Int32

GetObjectData(SerializationInfo, StreamingContext)

Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The System.Runtime.Serialization.SerializationInfo to populate with data.

System.Runtime.Serialization.StreamingContext context

The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

Exceptions
Type Condition
System.Security.SecurityException

The caller does not have the required permission.

GetString(String)

Gets the string.

Declaration
public string GetString(string fieldName)
Parameters
Type Name Description
System.String fieldName

Name of the field.

Returns
Type Description
System.String

Load(DataRow)

Loads the specified row.

Declaration
public virtual void Load(DataRow row)
Parameters
Type Name Description
System.Data.DataRow row

The row.

Load(DataRowView)

Loads the specified row.

Declaration
public virtual void Load(DataRowView row)
Parameters
Type Name Description
System.Data.DataRowView row

The row.

Load(IDataReader)

Loads the specified reader.

Declaration
public virtual void Load(IDataReader reader)
Parameters
Type Name Description
System.Data.IDataReader reader

The reader.

OnSaved(DataResult)

Called when [saved].

Declaration
protected abstract void OnSaved(DataResult result)
Parameters
Type Name Description
DataResult result

The result.

Implements

System.ICloneable
System.Runtime.Serialization.ISerializable