TableOperationsT Class

Defines database operations for a modeled table.

Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.128 -- Release Build+cb657b646daac3e9cc5384ff42ed4530df50eab1
public class TableOperations<T> : ITableOperations
where T : class, new()
Inheritance
Object    TableOperationsT
Implements
ITableOperations

Type Parameters

T
Modeled table.

Constructors

Properties

ApplyRootQueryRestrictionToDeletes Gets or sets flag that determines if RootQueryRestriction should be applied to delete operations.
ApplyRootQueryRestrictionToUpdates Gets or sets flag that determines if RootQueryRestriction should be applied to update operations.
Connection Gets AdoDataConnection instance associated with this TableOperationsT used for database operations.
ExceptionHandler Gets or sets delegate used to handle table operation exceptions.
HasPrimaryKeyIdentityField Gets flag that determines if modeled table has a primary key that is an identity field.
PrimaryKeyCache Gets or sets primary key cache.
RootQueryRestriction Gets or sets root record restriction that applies to query table operations.
TableName Gets the table name defined for the modeled table, includes any escaping as defined in model.
TypeRegistry Gets or sets TypeRegistry instance used for evaluating encountered instances of the ValueExpressionAttributeBase on modeled table properties.
UnescapedTableName Gets the table name defined for the modeled table without any escape characters.
UseCaseSensitiveFieldNames Gets or sets flag that determines if field names should be treated as case-sensitive. Defaults to false.

Methods

AddNewOrUpdateRecord Adds the specified modeled table record to the database if the record has not defined any of its primary key values; otherwise, the database will be updated with the specified modeled table record.
AddNewRecord(DataRow) Adds the specified row to the database.
AddNewRecord(T) Adds the specified modeled table record to the database.
ApplyRecordDefaults Applies the default values on the specified modeled table record where any of the properties are marked with either DefaultValueAttribute or DefaultValueExpressionAttribute.
ApplyRecordDefaultsFunction Gets a delegate for the ApplyRecordDefaults(T) method for specified type T.
ApplyRecordUpdates Applies the update values on the specified modeled table record where any of the properties are marked with UpdateValueExpressionAttribute.
ApplyRecordUpdatesFunction Gets a delegate for the ApplyRecordUpdates(T) method for specified type T.
ClearPrimaryKeyCache Clears the primary key cache for this TableOperationsT instance.
DeleteRecord(DataRow) Deletes the record referenced by the specified row.
DeleteRecord(Object) Deletes the record referenced by the specified primaryKeys.
DeleteRecord(T) Deletes the specified modeled table record from the database.
DeleteRecord(RecordRestriction, NullableBoolean) Deletes the records referenced by the specified restriction.
DeleteRecordWhere Deletes the records referenced by the specified SQL filter expression and parameters.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FieldHasAttribute(String, Type) Determines if the specified field has an associated attribute.
FieldHasAttributeTAttribute(String) Determines if the specified field has an associated attribute.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetFieldNames Gets the field names for the table; if escaped is true, also includes any escaping as defined in model.
GetFieldType Gets the Type for the specified field.
GetFieldValue Gets the value for the specified field.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetInterpretedFieldValue Gets the interpreted value for the specified field, encrypting or returning any intermediate IDbDataParameter value as needed.
GetPageOfRecords Gets the specified page of records from the provided source records array.
GetPrimaryKeyCacheSize Calculates the size of the current primary key cache, in number of records.
GetPrimaryKeyFieldNames Get the primary key field names for the table; if escaped is true, also includes any escaping as defined in model.
GetPrimaryKeys(DataRow) Gets the primary key values from the specified row.
GetPrimaryKeys(T) Gets the primary key values from the specified record.
GetSearchRestrictions Generates a RecordRestriction based on recordFilters.
GetTypeGets the Type of the current instance.
(Inherited from Object)
LoadRecord(DataRow) Creates a new modeled table record queried from the specified row.
LoadRecord(Object) Creates a new modeled table record queried from the specified primaryKeys.
LoadRecordFunction Gets a delegate for the LoadRecord(DataRow) function for specified type T.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
NewRecord Creates a new modeled record instance, applying any modeled default values as specified by a DefaultValueAttribute or DefaultValueExpressionAttribute on the model properties.
NewRecordFunction Gets a delegate for the NewRecord function for specified type T.
QueryRecord(RecordRestriction) Queries database and returns a single modeled table record for the specified restriction.
QueryRecord(String, RecordRestriction) Queries database and returns a single modeled table record for the specified restriction, execution of query will apply orderByExpression.
QueryRecordCount Gets total record count for the modeled table.
QueryRecordCount(IRecordFilter) Gets the record count for the modeled table based on search parameter. Search executed against fields modeled with SearchableAttribute.
QueryRecordCount(RecordRestriction) Gets the record count for the specified restrictions - or - total record count for the modeled table if restrictions is null.
QueryRecordCountWhere Gets the record count for the modeled table for the specified SQL filter expression and parameters.
QueryRecords(RecordRestriction) Queries database and returns modeled table records for the specified restriction.
QueryRecords(String, RecordRestriction, Int32) Queries database and returns modeled table records for the specified parameters.
QueryRecords(String, Boolean, Int32, Int32) Queries database and returns modeled table records for the specified sorting and paging parameters.
QueryRecords(String, Boolean, Int32, Int32, IRecordFilter) Queries database and returns modeled table records for the specified sorting, paging and search parameters. Search executed against fields modeled with SearchableAttribute.
QueryRecords(String, Boolean, Int32, Int32, RecordRestriction) Queries database and returns modeled table records for the specified sorting and paging parameters.
QueryRecordsWhere Queries database and returns modeled table records for the specified SQL filter expression and parameters.
QueryRecordWhere Queries database and returns a single modeled table record for the specified SQL filter expression and parameters.
SearchRecords Locally searches retrieved table records after queried from database for the specified sorting and search parameters. Search executed against fields modeled with SearchableAttribute. Function only typically used for record models that apply the EncryptDataAttribute.
ToDataTable Converts the given collection of records into a DataTable.
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryGetFieldAttribute(String, Type, Attribute) Attempts to get the specified attributeType for a field.
TryGetFieldAttributeTAttribute(String, TAttribute) Attempts to get the specified attribute for a field.
UpdateRecord(DataRow, RecordRestriction) Updates the database with the specified row, any model properties marked with UpdateValueExpressionAttribute will be evaluated and applied before the record is provided to the data source.
UpdateRecord(T, RecordRestriction, NullableBoolean) Updates the database with the specified modeled table record, any model properties marked with UpdateValueExpressionAttribute will be evaluated and applied before the record is provided to the data source.
UpdateRecordWhere(DataRow, String, Object) Updates the database with the specified row referenced by the specified SQL filter expression and parameters, any model properties marked with UpdateValueExpressionAttribute will be evaluated and applied before the record is provided to the data source.
UpdateRecordWhere(T, String, Object) Updates the database with the specified modeled table record referenced by the specified SQL filter expression and parameters, any model properties marked with UpdateValueExpressionAttribute will be evaluated and applied before the record is provided to the data source.

See Also