NShape Reference
AdoNetStore Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape >

NShape Reference
AdoNetStore Class

Previous pageReturn to chapter overviewNext page

AdoNetStore is an implementation of Store that can be used for a wide range of data stores and SQL dialects. If this class can not cover all requirements on an application, it can either be sub-classed or a completely separate implementation of IRepository can be developed.

Syntax

public abstract class AdoNetStore : Store

Description

Usually an application does not call Store methods. Instead it creates an instance of a specialized store class, sets its properties and attaches it to a CachedRepository object (via its Store property). The functionality is then accessed via the IRepository interface of the CachedRepository object.

Public Properties

Name

Description

ConnectionString

Specifies the connection string for the database store.

ProductVersion

The version of the component.

Projectname

Specifies the name of the project.

ProviderName

Specifies the name of the ADO.NET provider used as listed in the system configuration.

Version

Specifies the main version of the storage format.

Public Methods

Name

Description

Close

Closes the project store.

Create

Creates a project store in the data source.

CreateDbCommands

Creates the actual SQL commands for the store database. This method has to be overridden.

CreateDbSchema

Creates a schema for the database based on the current DB commands.

DropDbSchema

Drops the schema of the database based on the current DB commands.

Erase

Deletes the project store in the data source.

Exists

Tests whether the project already exists in the data source.

GetCommand

Retrieves a command of the entity type and command type.

GetCreateTablesCommand

Retrieves a command for creating the database schema.

GetInsertSysCommandCommand

Retrieves a command text for inserting a command into the database.

GetInsertSysParameterCommand

Retrieves a command for inserting command parameters into the database.

GetSelectSysCommandsCommand

Retrieves a command for reading the specified command.

GetSelectSysParameterCommand

Retrieves a command for reading the specified command parameter.

LoadChildModelObjects

Loads child model objects of the indicated model object.

LoadChildShapes

Loads child shapes of the indicated shape.

LoadDesigns

Loads general designs or a project design.

LoadDiagrams

Loads diagrams of the current project.

LoadDiagramShapes

Loads shapes of the indicated diagram.

LoadModel

Loads the model of the project.

LoadModelModelObjects

Loads model objects of the indicated model.

LoadProjects

Loads projects stored in the store.

LoadTemplateModelObjects

Loads model objects of the indicated template.

LoadTemplates

Loads template definitions of the current project.

LoadTemplateShapes

Load shapes of the indicated template.

Open

Opens a project store in the data source.

SaveChanges

Commits all modifications in the cache to the data store.

SetCommand

Store the given an SQL command for the specified entity type and command type.

SetCreateTablesCommand

Set a create table command for creating the database schema.

Protected Methods

Name

Description

CreateCommand

Creates an ADO.NET command.

CreateParameter

Creates an ADO.NET command parameter.

DeleteEntities<TEntity>

Erases deleted entities of type TEntity from the data store.

DeleteShapeConnections

Erases deleted shape connections from the database.

Dispose

Implementation of System.ComponentModel.Control.Dispose.

EnsureDataSourceClosed

Closes the connection to the database if not yet closed.

EnsureDataSourceOpen

Opens the connection to the database if not yet opened.

InsertEntities<TEntity>

Inserts new objects into the data store.

InsertShapeConnections

Inserts new shape connections into the data store.

IsComposition

Tests wether a inner object entity should be stored as serialized string.

LoadEntities<TEntity>

Loads entities of the specified type from the data store.

LoadShapeConnections

Loads all shape connections from the data store.

LoadSysCommands

Loads the commands for loading and saving entities from the data store.

OpenCore

Base implementation of IRepository.Create and IRepository.Open.

UpdateEntities<TEntity>

Updates modified entities in the data store.

UpdateShapeOwners

Updates modified shape owners.

Derived Classes

Derived classes are:

SqlStore

Requirements

Namespace: Dataweb.NShape

Assembly: Dataweb.NShape

See Also

IStoreCache Interface